-
-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Interslavic translation (via #2373)
- Loading branch information
Showing
4 changed files
with
612 additions
and
375 deletions.
There are no files selected for viewing
208 changes: 208 additions & 0 deletions
208
allure-generator/src/main/javascript/translations/isv.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
{ | ||
"chart": { | ||
"duration": { | ||
"empty": "Nema informacije", | ||
"name": "Trvanje testov" | ||
}, | ||
"severity": { | ||
"name": "Važnost testov" | ||
}, | ||
"status": { | ||
"name": "Statusy testov" | ||
}, | ||
"trend": { | ||
"empty": "Nema informacije" | ||
} | ||
}, | ||
"component": { | ||
"markToggle": { | ||
"hideCases": "Skryj rezultaty označene kako \"{{mark}}\"", | ||
"showCases": "Pokaži rezultaty označene kako \"{{mark}}\"" | ||
}, | ||
"statusToggle": { | ||
"hideCases": "Skryj rezultaty so statusom \"{{status}}\"", | ||
"showCases": "Pokaži rezultaty so statusom \"{{status}}\"" | ||
}, | ||
"tree": { | ||
"download": "Daunloduj CSV", | ||
"empty": "Nema informacije", | ||
"filter": "Statusy", | ||
"filter-marks": "Označenja", | ||
"filtered": { | ||
"shown_0": "{{count}} pokazany", | ||
"shown_1": "{{count}} pokazane", | ||
"shown_2": "{{count}} pokazane", | ||
"total_0": "{{count}} test vsěgo", | ||
"total_1": "{{count}} testy vsěgo", | ||
"total_2": "{{count}} testov vsěgo" | ||
}, | ||
"groups": "Pokaži informaciju o grupah", | ||
"time": { | ||
"max": { | ||
"name": "Najvyše dolgy", | ||
"tooltip": "Koliko časa trval najvyše dolgy test v grupě" | ||
}, | ||
"sum": { | ||
"name": "V sumě", | ||
"tooltip": "Suma trvanij vsih testov v grupě" | ||
}, | ||
"total": { | ||
"name": "Cělo", | ||
"tooltip": "Čas od početka prvogo testa do konca poslědnogo" | ||
} | ||
}, | ||
"unknown": "<Nema>" | ||
}, | ||
"widgetStatus": { | ||
"showAll": "Pokaži vsečto", | ||
"total_0": "{{count}} element vsěgo", | ||
"total_1": "{{count}} elementa vsěgo", | ||
"total_2": "{{count}} elementov vsěgo" | ||
} | ||
}, | ||
"controls": { | ||
"backto": "Vzad do", | ||
"clipboard": "Kopiruj do klipborda", | ||
"clipboardError": "Pogrěška. Věrojetno, vaša prěgledka (brauzer) ne podpira kopirovanje do klipborda.", | ||
"clipboardSuccess": "Tekst byl skopirovany", | ||
"collapse": "Minimizuj", | ||
"expand": "Razširi", | ||
"fullscreen": "Na cěly ekran", | ||
"language": "Izměni jezyk" | ||
}, | ||
"errors": { | ||
"missedAttachment": "Priloga ne najdena", | ||
"notFound": "Ne najdeno" | ||
}, | ||
"marks": { | ||
"flaky": "Nestabilny", | ||
"newBroken": "Iznova slomjeny", | ||
"newFailed": "Iznova neuspěšny", | ||
"newPassed": "Iznova uspěšny", | ||
"retriesStatusChange": "Status měnjal se od proby do proby" | ||
}, | ||
"sorter": { | ||
"duration": "trvanje", | ||
"name": "nazva", | ||
"order": "poredok", | ||
"status": "status" | ||
}, | ||
"status": { | ||
"broken": "Slomjeny", | ||
"failed": "Neuspěšny", | ||
"passed": "Uspěšny", | ||
"skipped": "Propuščeny", | ||
"unknown": "Neznany" | ||
}, | ||
"tab": { | ||
"categories": { | ||
"name": "Kategorije" | ||
}, | ||
"graph": { | ||
"name": "Diagramy" | ||
}, | ||
"overview": { | ||
"name": "Prěgled" | ||
}, | ||
"suites": { | ||
"name": "Komplety testov" | ||
}, | ||
"timeline": { | ||
"name": "Hronologija", | ||
"selected_0": "Izbrany {{count}} test ({{percent}}%) s trvanjem vyše od {{duration}}", | ||
"selected_1": "Izbrane {{count}} testy ({{percent}}%) s trvanjem vyše od {{duration}}", | ||
"selected_2": "Izbrane {{count}} testov ({{percent}}%) s trvanjem vyše od {{duration}}" | ||
} | ||
}, | ||
"testResult": { | ||
"categories": { | ||
"name": "Kategorije" | ||
}, | ||
"description": { | ||
"name": "Opis" | ||
}, | ||
"duration": { | ||
"name": "Trvanje" | ||
}, | ||
"execution": { | ||
"body": "Tělo testa", | ||
"name": "Izpolnjenje", | ||
"setup": "Prigotovjenje", | ||
"teardown": "Zaključenje" | ||
}, | ||
"history": { | ||
"name": "Historija", | ||
"successRate": "Procent uspěha" | ||
}, | ||
"links": { | ||
"name": "Linky" | ||
}, | ||
"overview": { | ||
"name": "Prěgled" | ||
}, | ||
"owner": { | ||
"name": "Vlastnik" | ||
}, | ||
"parameters": { | ||
"name": "Parametry" | ||
}, | ||
"retries": { | ||
"empty": "Nema informacije o minulyh probah testa", | ||
"name": "Minule proby" | ||
}, | ||
"severity": { | ||
"name": "Važnost" | ||
}, | ||
"stats": { | ||
"count": { | ||
"attachments_0": "{{count}} priloga", | ||
"attachments_1": "{{count}} prilogy", | ||
"attachments_2": "{{count}} prilog", | ||
"parameters_0": "{{count}} parametr", | ||
"parameters_1": "{{count}} parametry", | ||
"parameters_2": "{{count}} parametrov", | ||
"steps_0": "{{count}} vloženy krok", | ||
"steps_1": "{{count}} vložene kroky", | ||
"steps_2": "{{count}} vloženyh krokov" | ||
} | ||
}, | ||
"status": { | ||
"empty": "Nema dodatnoj informacije o statusu", | ||
"trace": "Pokaži dodatnu informaciju" | ||
} | ||
}, | ||
"widget": { | ||
"categories": { | ||
"name": "Kategorije" | ||
}, | ||
"environment": { | ||
"empty": "Nema informacije o obsrědině", | ||
"name": "Obsrědina", | ||
"showAll": "Pokaži vsečto" | ||
}, | ||
"executors": { | ||
"empty": "Nema informacije o izpolniteljah", | ||
"name": "Sistemy izpolnjenja testov", | ||
"unknown": "Neznano" | ||
}, | ||
"launches": { | ||
"empty": "Nema informacije o puščenjah", | ||
"name": "Puščenja testov" | ||
}, | ||
"suites": { | ||
"name": "Komplety testov" | ||
}, | ||
"summary": { | ||
"aggregatedName": "Agregovany raport", | ||
"launches_0": "puščenje testov", | ||
"launches_1": "puščenja testov", | ||
"launches_2": "puščenij testov", | ||
"testResults_0": "testovy scenarij", | ||
"testResults_1": "testove scenarije", | ||
"testResults_2": "testovyh scenarijev" | ||
}, | ||
"trend": { | ||
"name": "Trend" | ||
} | ||
} | ||
} |
105 changes: 56 additions & 49 deletions
105
allure-generator/src/main/javascript/utils/translation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,56 @@ | ||
import i18next from "i18next"; | ||
import gtag from "./gtag"; | ||
import settings from "./settings"; | ||
|
||
export const LANGUAGES = [ | ||
{ id: "en", title: "English" }, | ||
{ id: "ru", title: "Русский" }, | ||
{ id: "zh", title: "中文" }, | ||
{ id: "de", title: "Deutsch" }, | ||
{ id: "nl", title: "Nederlands" }, | ||
{ id: "he", title: "Hebrew" }, | ||
{ id: "br", title: "Brazil" }, | ||
{ id: "pl", title: "Polski" }, | ||
{ id: "ja", title: "日本語" }, | ||
{ id: "es", title: "Español" }, | ||
{ id: "kr", title: "한국어" }, | ||
{ id: "fr", title: "Français" }, | ||
{ id: "az", title: "Azərbaycanca" }, | ||
{ id: "tr", title: "Türkçe" }, | ||
]; | ||
|
||
LANGUAGES.map((lang) => lang.id).forEach((lang) => | ||
addTranslation(lang, require(`../translations/${lang}`)), | ||
); | ||
|
||
export function initTranslations() { | ||
return new Promise((resolve, reject) => { | ||
const language = settings.get("language"); | ||
i18next.init( | ||
{ | ||
lng: language, | ||
interpolation: { | ||
escapeValue: false, | ||
}, | ||
fallbackLng: "en", | ||
}, | ||
(err) => (err ? reject(err) : resolve()), | ||
); | ||
gtag("init_language", { language: language || "en" }); | ||
}); | ||
} | ||
|
||
export function addTranslation(lang, json) { | ||
i18next.on("initialized", () => { | ||
i18next.services.resourceStore.addResourceBundle(lang, i18next.options.ns[0], json, true, true); | ||
}); | ||
} | ||
|
||
export default i18next; | ||
import i18next from "i18next"; | ||
import gtag from "./gtag"; | ||
import settings from "./settings"; | ||
|
||
export const LANGUAGES = [ | ||
{ id: "en", title: "English" }, | ||
{ id: "ru", title: "Русский" }, | ||
{ id: "zh", title: "中文" }, | ||
{ id: "de", title: "Deutsch" }, | ||
{ id: "nl", title: "Nederlands" }, | ||
{ id: "he", title: "Hebrew" }, | ||
{ id: "br", title: "Brazil" }, | ||
{ id: "pl", title: "Polski" }, | ||
{ id: "ja", title: "日本語" }, | ||
{ id: "es", title: "Español" }, | ||
{ id: "kr", title: "한국어" }, | ||
{ id: "fr", title: "Français" }, | ||
{ id: "az", title: "Azərbaycanca" }, | ||
{ id: "tr", title: "Türkçe" }, | ||
{ id: "isv", abbr: "Ⱄ", title: "Medžuslovjansky" }, | ||
]; | ||
|
||
LANGUAGES.map((lang) => lang.id).forEach((lang) => | ||
addTranslation(lang, require(`../translations/${lang}`)), | ||
); | ||
|
||
export function initTranslations() { | ||
return new Promise((resolve, reject) => { | ||
const language = settings.get("language"); | ||
i18next.init( | ||
{ | ||
lng: language, | ||
interpolation: { | ||
escapeValue: false, | ||
}, | ||
fallbackLng: "en", | ||
}, | ||
(err) => (err ? reject(err) : resolve()), | ||
); | ||
|
||
i18next.on("initialized", () => { | ||
const pluralResolver = i18next.services.pluralResolver; | ||
pluralResolver.addRule("isv", pluralResolver.getRule("be")); | ||
}); | ||
|
||
gtag("init_language", { language: language || "en" }); | ||
}); | ||
} | ||
|
||
export function addTranslation(lang, json) { | ||
i18next.on("initialized", () => { | ||
i18next.services.resourceStore.addResourceBundle(lang, i18next.options.ns[0], json, true, true); | ||
}); | ||
} | ||
|
||
export default i18next; |
Oops, something went wrong.