diff options
-rw-r--r-- | setup_native/source/packinfo/spellchecker_selection.pl | 11 | ||||
-rw-r--r-- | setup_native/source/win32/customactions/sellang/sellang.cxx | 6 |
2 files changed, 13 insertions, 4 deletions
diff --git a/setup_native/source/packinfo/spellchecker_selection.pl b/setup_native/source/packinfo/spellchecker_selection.pl index 87f7cc204dcb..31750139743f 100644 --- a/setup_native/source/packinfo/spellchecker_selection.pl +++ b/setup_native/source/packinfo/spellchecker_selection.pl @@ -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; diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx index b6f7ec559ea0..06c4c029a4e6 100644 --- a/setup_native/source/win32/customactions/sellang/sellang.cxx +++ b/setup_native/source/win32/customactions/sellang/sellang.cxx @@ -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; }; |