Skip to content

Commit

Permalink
add Welsh and readd Turkish languages
Browse files Browse the repository at this point in the history
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19276 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
stoecker committed Jan 1, 2025
1 parent 9a3f040 commit 95285a4
Show file tree
Hide file tree
Showing 86 changed files with 16 additions and 10 deletions.
Binary file modified nodist/trans/ar.lang
Binary file not shown.
Binary file modified nodist/trans/ast.lang
Binary file not shown.
Binary file modified nodist/trans/be.lang
Binary file not shown.
Binary file modified nodist/trans/bg.lang
Binary file not shown.
Binary file modified nodist/trans/ca-valencia.lang
Binary file not shown.
Binary file modified nodist/trans/ca.lang
Binary file not shown.
Binary file modified nodist/trans/cs.lang
Binary file not shown.
Binary file added nodist/trans/cy.lang
Binary file not shown.
Binary file modified nodist/trans/da.lang
Binary file not shown.
Binary file modified nodist/trans/de.lang
Binary file not shown.
Binary file modified nodist/trans/el.lang
Binary file not shown.
Binary file modified nodist/trans/en.lang
Binary file not shown.
Binary file modified nodist/trans/en_AU.lang
Binary file not shown.
Binary file modified nodist/trans/en_GB.lang
Binary file not shown.
Binary file modified nodist/trans/es.lang
Binary file not shown.
Binary file modified nodist/trans/et.lang
Binary file not shown.
Binary file modified nodist/trans/fa.lang
Binary file not shown.
Binary file modified nodist/trans/fi.lang
Binary file not shown.
Binary file modified nodist/trans/fr.lang
Binary file not shown.
Binary file modified nodist/trans/gl.lang
Binary file not shown.
Binary file modified nodist/trans/hu.lang
Binary file not shown.
Binary file modified nodist/trans/id.lang
Binary file not shown.
Binary file modified nodist/trans/is.lang
Binary file not shown.
Binary file modified nodist/trans/it.lang
Binary file not shown.
Binary file modified nodist/trans/ja.lang
Binary file not shown.
Binary file modified nodist/trans/km.lang
Binary file not shown.
Binary file modified nodist/trans/ko.lang
Binary file not shown.
Binary file modified nodist/trans/lt.lang
Binary file not shown.
Binary file modified nodist/trans/mr.lang
Binary file not shown.
Binary file modified nodist/trans/nb.lang
Binary file not shown.
Binary file modified nodist/trans/nl.lang
Binary file not shown.
Binary file modified nodist/trans/pl.lang
Binary file not shown.
Binary file modified nodist/trans/pt.lang
Binary file not shown.
Binary file modified nodist/trans/pt_BR.lang
Binary file not shown.
Binary file modified nodist/trans/ru.lang
Binary file not shown.
Binary file modified nodist/trans/sk.lang
Binary file not shown.
Binary file modified nodist/trans/sr-latin.lang
Binary file not shown.
Binary file modified nodist/trans/sv.lang
Binary file not shown.
Binary file modified nodist/trans/uk.lang
Binary file not shown.
Binary file added nodist/trans/vi.lang
Binary file not shown.
Binary file modified nodist/trans/zh_CN.lang
Binary file not shown.
Binary file modified nodist/trans/zh_TW.lang
Binary file not shown.
Binary file modified resources/data/ar.lang
Binary file not shown.
Binary file modified resources/data/ast.lang
Binary file not shown.
Binary file modified resources/data/be.lang
Binary file not shown.
Binary file modified resources/data/bg.lang
Binary file not shown.
Binary file modified resources/data/ca-valencia.lang
Binary file not shown.
Binary file modified resources/data/ca.lang
Binary file not shown.
Binary file modified resources/data/cs.lang
Binary file not shown.
Binary file added resources/data/cy.lang
Binary file not shown.
Binary file modified resources/data/da.lang
Binary file not shown.
Binary file modified resources/data/de.lang
Binary file not shown.
Binary file modified resources/data/el.lang
Binary file not shown.
Binary file modified resources/data/en.lang
Binary file not shown.
Binary file modified resources/data/en_AU.lang
Binary file not shown.
Binary file modified resources/data/en_GB.lang
Binary file not shown.
Binary file modified resources/data/es.lang
Binary file not shown.
Binary file modified resources/data/et.lang
Binary file not shown.
Binary file modified resources/data/fa.lang
Binary file not shown.
Binary file modified resources/data/fi.lang
Binary file not shown.
Binary file modified resources/data/fr.lang
Binary file not shown.
Binary file modified resources/data/gl.lang
Binary file not shown.
Binary file modified resources/data/hu.lang
Binary file not shown.
Binary file modified resources/data/id.lang
Binary file not shown.
Binary file modified resources/data/is.lang
Binary file not shown.
Binary file modified resources/data/it.lang
Binary file not shown.
Binary file modified resources/data/ja.lang
Binary file not shown.
Binary file modified resources/data/km.lang
Binary file not shown.
Binary file modified resources/data/ko.lang
Binary file not shown.
Binary file modified resources/data/lt.lang
Binary file not shown.
Binary file modified resources/data/mr.lang
Binary file not shown.
Binary file modified resources/data/nb.lang
Binary file not shown.
Binary file modified resources/data/nl.lang
Binary file not shown.
Binary file modified resources/data/pl.lang
Binary file not shown.
Binary file modified resources/data/pt.lang
Binary file not shown.
Binary file modified resources/data/pt_BR.lang
Binary file not shown.
Binary file modified resources/data/ru.lang
Binary file not shown.
Binary file modified resources/data/sk.lang
Binary file not shown.
Binary file modified resources/data/sr-latin.lang
Binary file not shown.
Binary file modified resources/data/sv.lang
Binary file not shown.
Binary file added resources/data/tr.lang
Binary file not shown.
Binary file modified resources/data/uk.lang
Binary file not shown.
Binary file added resources/data/vi.lang
Binary file not shown.
Binary file modified resources/data/zh_CN.lang
Binary file not shown.
Binary file modified resources/data/zh_TW.lang
Binary file not shown.
26 changes: 16 additions & 10 deletions src/org/openstreetmap/josm/tools/I18n.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private I18n() {
/**
* Enumeration of possible plural modes. It allows us to identify and implement logical conditions of
* plural forms defined on <a href="https://help.launchpad.net/Translations/PluralForms">Launchpad</a>.
* See <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html">CLDR</a>
* See <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html">CLDR</a>
* for another complete list.
* @see #pluralEval
*/
Expand All @@ -61,28 +61,31 @@ private enum PluralMode {
/** Plural = Greater than 1. For some latin languages (French, Brazilian Portuguese) */
MODE_GREATERONE,
/* Special mode for
* <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ar">Arabic</a>.*/
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ar">Arabic</a>.*/
MODE_AR,
/** Special mode for
* <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cs">Czech</a>. */
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cs">Czech</a>. */
MODE_CS,
/** Special mode for
* <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#pl">Polish</a>. */
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#pl">Polish</a>. */
MODE_PL,
/* Special mode for
* <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ro">Romanian</a>.*
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ro">Romanian</a>.*
MODE_RO,*/
/** Special mode for
* <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#lt">Lithuanian</a>. */
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#lt">Lithuanian</a>. */
MODE_LT,
/** Special mode for
* <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ru">Russian</a>. */
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ru">Russian</a>. */
MODE_RU,
/** Special mode for
* <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sk">Slovak</a>. */
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sk">Slovak</a>. */
MODE_CY,
/** Special mode for
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cy">Welsh</a>. */
MODE_SK,
/* Special mode for
* <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sl">Slovenian</a>.*
* <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sl">Slovenian</a>.*
MODE_SL,*/
}

Expand All @@ -104,6 +107,7 @@ private enum PluralMode {
languages.put("ca", PluralMode.MODE_NOTONE);
languages.put("ca@valencia", PluralMode.MODE_NOTONE);
languages.put("cs", PluralMode.MODE_CS);
languages.put("cy", PluralMode.MODE_CY);
languages.put("da", PluralMode.MODE_NOTONE);
languages.put("de", PluralMode.MODE_NOTONE);
languages.put("el", PluralMode.MODE_NOTONE);
Expand Down Expand Up @@ -138,7 +142,7 @@ private enum PluralMode {
//languages.put("sl", PluralMode.MODE_SL);
languages.put("sr@latin", PluralMode.MODE_RU);
languages.put("sv", PluralMode.MODE_NOTONE);
//languages.put("tr", PluralMode.MODE_NONE);
languages.put("tr", PluralMode.MODE_NONE);
languages.put("uk", PluralMode.MODE_RU);
//languages.put("vi", PluralMode.MODE_NONE);
languages.put("zh_CN", PluralMode.MODE_NONE);
Expand Down Expand Up @@ -676,6 +680,8 @@ private static int pluralEval(long n) {
&& ((n % 10) <= 4)) && (((n % 100) < 10) || ((n % 100) >= 20))) ? 1 : 2);
case MODE_SK:
return (n == 1) ? 1 : (((n >= 2) && (n <= 4)) ? 2 : 0);
case MODE_CY:
return (n == 1) ? 0 : ((n == 2) ? 1 : (n != 8 && n != 11) ? 2 : 3);
//case MODE_SL:
// return (((n % 100) == 1) ? 1 : (((n % 100) == 2) ? 2 : ((((n % 100) == 3)
// || ((n % 100) == 4)) ? 3 : 0)));
Expand Down

0 comments on commit 95285a4

Please sign in to comment.