Kaydet (Commit) 81c54e60 authored tarafından Eike Rathke's avatar Eike Rathke

prepare to accept partial BCP47 (lll-Ssss-CC-vvvvvvvv)

Change-Id: I3c65cb43696a829f29ab573b7b6e424a39d1a547
üst f408102b
......@@ -15,9 +15,14 @@ my $max = 0;
while (<>) {
next if /^\s*(#.*)?$/;
/^ \s* ([a-z]{2}(?:-[A-Z]{2})?) \s* = \s*
\"(EMPTY|[a-z]{2}(?:-[A-Z]{2})?(?:,[a-z]{2}(?:-[A-Z]{2})?)*)\" \s* $/x
or die "bad input line \"$_\"";
# Accept combinations of lll-Ssss-CC-vvvvvvvv
# XXX NOTE: when changing this also adapt
# setup_native/source/win32/customactions/sellang/sellang.cxx
# struct InstallLocalized{ char lang[sizeof(...)]; }
/^ \s* ([a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2})?(?:-[a-z]{5,8})?) \s* = \s*
\"(EMPTY|[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2})?(?:-[a-z]{5,8})?
(?:,[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2})?(?:-[a-z]{5,8})?)*)\" \s* $/x
or die "unexpected input line \"$_\"";
my $lang = $1;
$lang =~ tr/-/_/;
my $dicts = $2;
......
......@@ -202,8 +202,12 @@ present_in_ui_langs(const char *lang)
namespace {
/* TODO-BCP47: unlimit this, and if possible change from '_' to '-' separator
* to ease things. */
// XXX NOTE: the sizeof needs to follow what is accepted in
// setup_native/source/packinfo/spellchecker_selection.pl
struct InstallLocalized {
char lang[sizeof("xx_XX")];
char lang[sizeof("lll_Ssss_CC_vvvvvvvv")];
bool install;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment