mirror of
https://github.com/penpot/penpot.git
synced 2025-05-09 22:56:38 +02:00
🎉 Add new langs (gl, ja_jp, pt_pt, hr)
This commit is contained in:
parent
5463671db1
commit
59e6ef5609
2 changed files with 22 additions and 6 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue