From: terencehill Date: Fri, 16 Oct 2015 21:02:48 +0000 (+0200) Subject: Fix Deutsch (Schweiz) displayed incorrectly in the language selector by changing... X-Git-Tag: xonotic-v0.8.2~1688^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=aa34526e0bfd636e1021b19127400e8fdaa0ce47;p=xonotic%2Fxonotic-data.pk3dir.git Fix Deutsch (Schweiz) displayed incorrectly in the language selector by changing the language entry format in language.txt (and by making the necessary changes to the parsers) --- diff --git a/check-translations.sh b/check-translations.sh index facee4a7b..34404877a 100755 --- a/check-translations.sh +++ b/check-translations.sh @@ -36,7 +36,7 @@ fi if [ x"$mode" = x"txt" ]; then { - echo "en English \"English\"" + echo "en English \"English\"" for X in common.*.po; do [ -f "$X" ] || continue if [ -n "$language" ]; then @@ -67,9 +67,9 @@ if [ x"$mode" = x"txt" ]; then if [ "$p" -lt 50 ]; then continue fi - item="$l $l \"$l (0%)\"" + item="$l $l \"$l\" 0%" fi - printf "%s\n" "$item" | sed -e "s/([0-9][0-9]*%)/($p%)/" + printf "%s\n" "$item" | sed -e "s/[0-9][0-9]*%/$p%/" done } | tr '"' '\t' | sort -k3 | tr '\t' '"' fi diff --git a/languages.txt b/languages.txt index af95bdef4..498080ea5 100644 --- a/languages.txt +++ b/languages.txt @@ -1,19 +1,19 @@ -ast Asturian "Asturianu (61%)" -de German "Deutsch (91%)" -de_CH German "Deutsch (Schweiz) (91%)" -en_AU en_AU "en_AU (78%)" -en English "English" -es Spanish "Español (68%)" -fr French "Français (98%)" -it Italian "Italiano (98%)" -hu Hungarian "Magyar (50%)" -nl Dutch "Nederlands (45%)" -pl Polish "Polski (61%)" -pt Portuguese "Português (42%)" -ro Romanian "Romana (90%)" -fi Finnish "Suomi (35%)" -el Greek "Ελληνική (26%)" -be Belarusian "Беларуская (65%)" -bg Bulgarian "Български (65%)" -ru Russian "Русский (93%)" -uk Ukrainian "Українська (60%)" +ast Asturian "Asturianu" 61% +de German "Deutsch" 91% +de_CH German "Deutsch (Schweiz)" 91% +en English "English" +en_AU English "English (Australia)" 78% +es Spanish "Español" 68% +fr French "Français" 98% +it Italian "Italiano" 98% +hu Hungarian "Magyar" 50% +nl Dutch "Nederlands" 45% +pl Polish "Polski" 61% +pt Portuguese "Português" 42% +ro Romanian "Romana" 90% +fi Finnish "Suomi" 35% +el Greek "Ελληνική" 26% +be Belarusian "Беларуская" 65% +bg Bulgarian "Български" 65% +ru Russian "Русский" 93% +uk Ukrainian "Українська" 60% diff --git a/qcsrc/menu/xonotic/languagelist.qc b/qcsrc/menu/xonotic/languagelist.qc index 0b7281dbf..66dbb8351 100644 --- a/qcsrc/menu/xonotic/languagelist.qc +++ b/qcsrc/menu/xonotic/languagelist.qc @@ -184,15 +184,10 @@ void XonoticLanguageList_getLanguages(entity me) continue; bufstr_set(buf, i * LANGPARM_COUNT + LANGPARM_ID, argv(0)); bufstr_set(buf, i * LANGPARM_COUNT + LANGPARM_NAME, argv(1)); - float k = strstrofs(argv(2), "(", 0); - if(k > 0) - if(substring(argv(2), strlen(argv(2)) - 1, 1) == ")") - { - string percent = substring(argv(2), k + 1, -2); - if(percent != "100%") - bufstr_set(buf, i * LANGPARM_COUNT + LANGPARM_PERCENTAGE, percent); - } - bufstr_set(buf, i * LANGPARM_COUNT + LANGPARM_NAME_LOCALIZED, (k < 0) ? argv(2) : substring(argv(2), 0, k - 1)); + bufstr_set(buf, i * LANGPARM_COUNT + LANGPARM_NAME_LOCALIZED, argv(2)); + string percent = argv(3); + if(percent && percent != "100%") + bufstr_set(buf, i * LANGPARM_COUNT + LANGPARM_PERCENTAGE, percent); ++i; } fclose(fh);