[Libreoffice-commits] core.git: setup_native/source
Eike Rathke
erack at redhat.com
Mon Sep 2 04:59:18 PDT 2013
setup_native/source/packinfo/spellchecker_selection.pl | 11 ++++++++---
setup_native/source/win32/customactions/sellang/sellang.cxx | 6 +++++-
2 files changed, 13 insertions(+), 4 deletions(-)
New commits:
commit 81c54e607b1e79f20b35ca6f57ec2da8ed4185dd
Author: Eike Rathke <erack at redhat.com>
Date: Mon Sep 2 13:56:51 2013 +0200
prepare to accept partial BCP47 (lll-Ssss-CC-vvvvvvvv)
Change-Id: I3c65cb43696a829f29ab573b7b6e424a39d1a547
diff --git a/setup_native/source/packinfo/spellchecker_selection.pl b/setup_native/source/packinfo/spellchecker_selection.pl
index 87f7cc2..3175013 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 b6f7ec5..06c4c02 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;
};
More information about the Libreoffice-commits
mailing list