0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-11 01:28:30 -05:00

🎉 Add new langs (gl, ja_jp, pt_pt, hr)

This commit is contained in:
Andrey Antukh 2022-10-20 00:02:24 +02:00
parent 5463671db1
commit 59e6ef5609
2 changed files with 22 additions and 6 deletions

View file

@ -44,11 +44,23 @@ marked.use({renderer});
// Templates
function readLocales() {
const langs = ["ar", "ca", "de", "el", "en", "eu", "it", "es", "fa", "fr", "he", "nb_NO", "pl", "pt_BR", "ro", "ru", "tr", "zh_CN", "zh_Hant"];
const langs = ["ar", "ca", "de", "el", "en", "eu", "it", "es",
"fa", "fr", "he", "nb_NO", "pl", "pt_BR", "ro",
"ru", "tr", "zh_CN", "zh_Hant", "hr", "gl", "pt_PT",
// this happens when file does not matches correct
// iso code for the language.
["ja_jp", "jpn_JP"]
];
const result = {};
for (let lang of langs) {
const content = fs.readFileSync(`./translations/${lang}.po`, {encoding:"utf-8"});
let filename = `${lang}.po`;
if (l.isArray(lang)) {
filename = `${lang[1]}.po`;
lang = lang[0]
}
const content = fs.readFileSync(`./translations/${filename}`, {encoding:"utf-8"});
lang = lang.toLowerCase();

View file

@ -24,20 +24,24 @@
[{:label "English" :value "en"}
{:label "Español" :value "es"}
{:label "Català" :value "ca"}
{:label "Français (community)" :value "fr"}
{:label "Deutsch (community)" :value "de"}
{:label "Italiano (community)" :value "it"}
{:label "Euskera (community)" :value "eu"}
{:label "Français (community)" :value "fr"}
{:label "Gallego (Community)" :value "gl"}
{:label "Hrvatski (Community)" :value "hr"}
{:label "Italiano (community)" :value "it"}
{:label "Norsk - Bokmål (community)" :value "nb_no"}
{:label "Portuguese - Brazil (community)" :value "pt_br"}
{:label "Polski (community)" :value "pl"}
{:label "Русский (community)" :value "ru"}
{:label "Portuguese - Brazil (community)" :value "pt_br"}
{:label "Portuguese - Portugal (community)" :value "pt_pt"}
{:label "Rumanian (community)" :value "ro"}
{:label "Türkçe (community)" :value "tr"}
{:label "Ελληνική γλώσσα (community)" :value "el"}
{:label "Русский (community)" :value "ru"}
{:label "עִבְרִית (community)" :value "he"}
{:label "عربي/عربى (community)" :value "ar"}
{:label "فارسی (community)" :value "fa"}
{:label "日本語 (Community)" :value "ja_jp"}
{:label "简体中文 (community)" :value "zh_cn"}
{:label "繁體中文 (community)" :value "zh_hant"}])