mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
chore(locales): updated missing locales; added Polish pluralization rules
This commit is contained in:
+23
@@ -3,12 +3,35 @@ import plLang from './locales/pl.json';
|
|||||||
|
|
||||||
import { createI18n } from 'vue-i18n';
|
import { createI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
function customRule(choice: number, choicesLength: number) {
|
||||||
|
if (choice === 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const teen = choice > 10 && choice < 20;
|
||||||
|
const endsWithOne = choice % 10 === 1;
|
||||||
|
|
||||||
|
if (!teen && endsWithOne) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!teen && choice % 10 >= 2 && choice % 10 <= 4) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
return choicesLength < 4 ? 2 : 3;
|
||||||
|
}
|
||||||
|
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
locale: 'pl',
|
locale: 'pl',
|
||||||
legacy: false,
|
legacy: false,
|
||||||
warnHtmlMessage: false,
|
warnHtmlMessage: false,
|
||||||
fallbackLocale: 'pl',
|
fallbackLocale: 'pl',
|
||||||
|
|
||||||
|
pluralizationRules: {
|
||||||
|
pl: customRule
|
||||||
|
},
|
||||||
|
|
||||||
messages: {
|
messages: {
|
||||||
en: enLang,
|
en: enLang,
|
||||||
pl: plLang
|
pl: plLang
|
||||||
|
|||||||
+12
-1
@@ -593,7 +593,18 @@
|
|||||||
"tablice-link": "Timetable summary board <br> (by Thundo)",
|
"tablice-link": "Timetable summary board <br> (by Thundo)",
|
||||||
"bottom-info": "Show full history in the Journal tab",
|
"bottom-info": "Show full history in the Journal tab",
|
||||||
"btn-show-internal-routes": "Show internal routes",
|
"btn-show-internal-routes": "Show internal routes",
|
||||||
"btn-hide-internal-routes": "Hide internal routes"
|
"btn-hide-internal-routes": "Hide internal routes",
|
||||||
|
"top-list": {
|
||||||
|
"header": "RECORDS ON THE SCENERY",
|
||||||
|
"mode-likes": "DISP. RATING",
|
||||||
|
"mode-dispatchers": "DUTY COUNT",
|
||||||
|
"scope-name": "GENERAL",
|
||||||
|
"scope-hash": "CURRENT HASH",
|
||||||
|
|
||||||
|
"place": "{n}. place",
|
||||||
|
"like-count": "Rating: {n}",
|
||||||
|
"dispatch-count": "No duties | 1 duty | Duties: {n}"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"availability": {
|
"availability": {
|
||||||
"title": "Availability",
|
"title": "Availability",
|
||||||
|
|||||||
+5
-2
@@ -580,13 +580,16 @@
|
|||||||
"bottom-info": "Pokaż pełną historię w zakładce Dziennika",
|
"bottom-info": "Pokaż pełną historię w zakładce Dziennika",
|
||||||
"btn-show-internal-routes": "Pokazuj szlaki wewnętrzne",
|
"btn-show-internal-routes": "Pokazuj szlaki wewnętrzne",
|
||||||
"btn-hide-internal-routes": "Ukrywaj szlaki wewnętrzne",
|
"btn-hide-internal-routes": "Ukrywaj szlaki wewnętrzne",
|
||||||
|
|
||||||
"top-list": {
|
"top-list": {
|
||||||
"header": "REKORDY NA SCENERII",
|
"header": "REKORDY NA SCENERII",
|
||||||
"mode-likes": "OCENA DR",
|
"mode-likes": "OCENA DR",
|
||||||
"mode-dispatchers": "LICZBA DYŻURÓW",
|
"mode-dispatchers": "LICZBA DYŻURÓW",
|
||||||
"scope-name": "OGÓLNIE",
|
"scope-name": "OGÓLNIE",
|
||||||
"scope-hash": "OBECNY HASH"
|
"scope-hash": "OBECNY HASH",
|
||||||
|
|
||||||
|
"place": "{n}. miejsce",
|
||||||
|
"like-count": "Ocena: {n}",
|
||||||
|
"dispatch-count": "Brak dyżurów | 1 dyżur | Dyżury: {n}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"availability": {
|
"availability": {
|
||||||
|
|||||||
Reference in New Issue
Block a user