[Libreoffice-commits] core.git: external/liblangtag
Caolán McNamara
caolanm at redhat.com
Wed May 24 12:44:27 UTC 2017
external/liblangtag/UnpackedTarball_langtag.mk | 1
external/liblangtag/langtag-valencia.patch.0 | 29 +++++++++++++++++++++++++
2 files changed, 30 insertions(+)
New commits:
commit 18ef85fb86a4b0f356cb1d94270b2b6c6dab9161
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 24 11:50:09 2017 +0100
liblangtag#10 support roundtripping ca at valencia
Change-Id: I67932541fbb14316798fe94b64b4b32a3d1c29f6
Reviewed-on: https://gerrit.libreoffice.org/37984
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/external/liblangtag/UnpackedTarball_langtag.mk b/external/liblangtag/UnpackedTarball_langtag.mk
index d8fccf261512..32cfd8685ab9 100644
--- a/external/liblangtag/UnpackedTarball_langtag.mk
+++ b/external/liblangtag/UnpackedTarball_langtag.mk
@@ -26,6 +26,7 @@ endif
$(eval $(call gb_UnpackedTarball_add_patches,langtag, \
$(if $(SYSTEM_LIBXML),,external/liblangtag/langtag-libtool-rpath.patch.0) \
external/liblangtag/clang-cl.patch.0 \
+ external/liblangtag/langtag-valencia.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/liblangtag/langtag-valencia.patch.0 b/external/liblangtag/langtag-valencia.patch.0
new file mode 100644
index 000000000000..dc28043042e4
--- /dev/null
+++ b/external/liblangtag/langtag-valencia.patch.0
@@ -0,0 +1,29 @@
+--- liblangtag/lt-tag.c
++++ liblangtag/lt-tag.c
+@@ -2009,11 +2009,23 @@
+ if (ctag->region)
+ lt_string_append_printf(string, "_%s",
+ lt_region_get_tag(ctag->region));
+- if (ctag->script) {
++ if (ctag->script)
+ mod = lt_script_convert_to_modifier(ctag->script);
+- if (mod)
+- lt_string_append_printf(string, "@%s", mod);
++ if (!mod && ctag->variants)
++ {
++ lt_list_t* l;
++ for (l = ctag->variants; l != NULL; l = lt_list_next(l)) {
++ lt_variant_t *variant = lt_list_value(l);
++ const char *s = lt_variant_get_tag(variant);
++ if (lt_strcmp0(s, "valencia") == 0) {
++ mod = "valencia";
++ break;
++ }
++ }
+ }
++ if (mod)
++ lt_string_append_printf(string, "@%s", mod);
++
+ lt_tag_unref(ctag);
+
+ bail:
More information about the Libreoffice-commits
mailing list