bump product version to 6.4.3.1
[LibreOffice.git] / external / liblangtag / langtag-valencia.patch.0
blobdc28043042e4cdc76254fb4b381e60611fa2035e
1 --- liblangtag/lt-tag.c
2 +++ liblangtag/lt-tag.c
3 @@ -2009,11 +2009,23 @@
4         if (ctag->region)
5                 lt_string_append_printf(string, "_%s",
6                                         lt_region_get_tag(ctag->region));
7 -       if (ctag->script) {
8 +       if (ctag->script)
9                 mod = lt_script_convert_to_modifier(ctag->script);
10 -               if (mod)
11 -                       lt_string_append_printf(string, "@%s", mod);
12 +       if (!mod && ctag->variants)
13 +       {
14 +               lt_list_t* l;
15 +               for (l = ctag->variants; l != NULL; l = lt_list_next(l)) {
16 +                       lt_variant_t *variant = lt_list_value(l);
17 +                       const char *s = lt_variant_get_tag(variant);
18 +                       if (lt_strcmp0(s, "valencia") == 0) {
19 +                               mod = "valencia";
20 +                               break;
21 +                       }
22 +               }
23         }
24 +       if (mod)
25 +               lt_string_append_printf(string, "@%s", mod);
27         lt_tag_unref(ctag);
29    bail: