mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Added flags
This commit is contained in:
parent
f66be08d1d
commit
70adbe5e76
28
README.md
28
README.md
@ -160,20 +160,20 @@ This translation will apply to the three applications - desktop, mobile and term
|
|||||||
Current translations:
|
Current translations:
|
||||||
|
|
||||||
<!-- LOCALE-TABLE-AUTO-GENERATED -->
|
<!-- LOCALE-TABLE-AUTO-GENERATED -->
|
||||||
Language | Code | Last translator | Percent done
|
| Language | Code | Last translator | Percent done
|
||||||
---|---|---|---
|
---|---|---|---|---
|
||||||
Croatian | hr_HR | Hrvoje Mandić <trbuhom@net.hr> | 72%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/hr.png) | Croatian | hr_HR | Hrvoje Mandić <trbuhom@net.hr> | 72%
|
||||||
Deutsch | de_DE | Tobias Strobel <git@strobeltobias.de> | 92%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/de.png) | Deutsch | de_DE | Tobias Strobel <git@strobeltobias.de> | 92%
|
||||||
English | en_GB | | 100%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/gb.png) | English | en_GB | | 100%
|
||||||
Español | es_ES | Lucas Vieites | 80%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/es.png) | Español | es_ES | Lucas Vieites | 80%
|
||||||
Español (Costa Rica) | es_CR | | 68%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/cr.png) | Español (Costa Rica) | es_CR | | 68%
|
||||||
Français | fr_FR | Laurent Cozic | 100%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/fr.png) | Français | fr_FR | Laurent Cozic | 100%
|
||||||
Italiano | it_IT | | 76%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/it.png) | Italiano | it_IT | | 76%
|
||||||
Nederlands | nl_BE | | 90%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/be.png) | Nederlands | nl_BE | | 90%
|
||||||
Português (Brasil) | pt_BR | | 74%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/br.png) | Português (Brasil) | pt_BR | | 74%
|
||||||
Русский | ru_RU | Artyom Karlov <artyom.karlov@gmail.com> | 96%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/ru.png) | Русский | ru_RU | Artyom Karlov <artyom.karlov@gmail.com> | 96%
|
||||||
中文 (简体) | zh_CN | RCJacH <RCJacH@outlook.com> | 76%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/cn.png) | 中文 (简体) | zh_CN | RCJacH <RCJacH@outlook.com> | 76%
|
||||||
日本語 | ja_JP | | 74%
|
![](https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/jp.png) | 日本語 | ja_JP | | 74%
|
||||||
<!-- LOCALE-TABLE-AUTO-GENERATED -->
|
<!-- LOCALE-TABLE-AUTO-GENERATED -->
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
|
@ -297,4 +297,4 @@ function _(s, ...args) {
|
|||||||
return sprintf(result, ...args);
|
return sprintf(result, ...args);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { _, supportedLocales, countryDisplayName, localeStrings, setLocale, supportedLocalesToLanguages, defaultLocale, closestSupportedLocale, languageCode };
|
module.exports = { _, supportedLocales, countryDisplayName, localeStrings, setLocale, supportedLocalesToLanguages, defaultLocale, closestSupportedLocale, languageCode, countryCodeOnly };
|
@ -18,7 +18,7 @@ const rnDir = rootDir + '/ReactNativeClient';
|
|||||||
const electronDir = rootDir + '/ElectronClient/app';
|
const electronDir = rootDir + '/ElectronClient/app';
|
||||||
|
|
||||||
const { execCommand } = require('./tool-utils.js');
|
const { execCommand } = require('./tool-utils.js');
|
||||||
const { countryDisplayName } = require('lib/locale.js');
|
const { countryDisplayName, countryCodeOnly } = require('lib/locale.js');
|
||||||
|
|
||||||
function parsePoFile(filePath) {
|
function parsePoFile(filePath) {
|
||||||
const content = fs.readFileSync(filePath);
|
const content = fs.readFileSync(filePath);
|
||||||
@ -140,11 +140,12 @@ async function translationStatus(isDefault, poFile) {
|
|||||||
|
|
||||||
function translationStatusToMdTable(status) {
|
function translationStatusToMdTable(status) {
|
||||||
let output = [];
|
let output = [];
|
||||||
output.push(['Language', 'Code', 'Last translator', 'Percent done'].join(' | '));
|
output.push([' ', 'Language', 'Code', 'Last translator', 'Percent done'].join(' | '));
|
||||||
output.push(['---', '---', '---', '---'].join('|'));
|
output.push(['---', '---', '---', '---', '---'].join('|'));
|
||||||
for (let i = 0; i < status.length; i++) {
|
for (let i = 0; i < status.length; i++) {
|
||||||
const stat = status[i];
|
const stat = status[i];
|
||||||
output.push([stat.languageName, stat.locale, stat.translatorName, stat.percentDone + '%'].join(' | '));
|
const flagUrl = 'https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/' + countryCodeOnly(stat.locale).toLowerCase() + '.png';
|
||||||
|
output.push(['![](' + flagUrl + ')', stat.languageName, stat.locale, stat.translatorName, stat.percentDone + '%'].join(' | '));
|
||||||
}
|
}
|
||||||
return output.join('\n');
|
return output.join('\n');
|
||||||
}
|
}
|
||||||
@ -156,7 +157,8 @@ async function updateReadmeWithStats(stats) {
|
|||||||
mdTable = mdTableMarkerOpen + mdTable + mdTableMarkerClose;
|
mdTable = mdTableMarkerOpen + mdTable + mdTableMarkerClose;
|
||||||
|
|
||||||
let content = await fs.readFile(rootDir + '/README.md', 'utf-8');
|
let content = await fs.readFile(rootDir + '/README.md', 'utf-8');
|
||||||
const regex = new RegExp(mdTableMarkerOpen + '.*?' + mdTableMarkerClose);
|
// [^]* matches any character including new lines
|
||||||
|
const regex = new RegExp(mdTableMarkerOpen + '[^]*?' + mdTableMarkerClose);
|
||||||
content = content.replace(regex, mdTable);
|
content = content.replace(regex, mdTable);
|
||||||
await fs.writeFile(rootDir + '/README.md', content);
|
await fs.writeFile(rootDir + '/README.md', content);
|
||||||
}
|
}
|
||||||
|
@ -343,6 +343,7 @@ sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th> </th>
|
||||||
<th>Language</th>
|
<th>Language</th>
|
||||||
<th>Code</th>
|
<th>Code</th>
|
||||||
<th>Last translator</th>
|
<th>Last translator</th>
|
||||||
@ -351,72 +352,84 @@ sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/hr.png" alt=""></td>
|
||||||
<td>Croatian</td>
|
<td>Croatian</td>
|
||||||
<td>hr_HR</td>
|
<td>hr_HR</td>
|
||||||
<td>Hrvoje Mandić <a href="mailto:trbuhom@net.hr">trbuhom@net.hr</a></td>
|
<td>Hrvoje Mandić <a href="mailto:trbuhom@net.hr">trbuhom@net.hr</a></td>
|
||||||
<td>72%</td>
|
<td>72%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/de.png" alt=""></td>
|
||||||
<td>Deutsch</td>
|
<td>Deutsch</td>
|
||||||
<td>de_DE</td>
|
<td>de_DE</td>
|
||||||
<td>Tobias Strobel <a href="mailto:git@strobeltobias.de">git@strobeltobias.de</a></td>
|
<td>Tobias Strobel <a href="mailto:git@strobeltobias.de">git@strobeltobias.de</a></td>
|
||||||
<td>92%</td>
|
<td>92%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/gb.png" alt=""></td>
|
||||||
<td>English</td>
|
<td>English</td>
|
||||||
<td>en_GB</td>
|
<td>en_GB</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>100%</td>
|
<td>100%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/es.png" alt=""></td>
|
||||||
<td>Español</td>
|
<td>Español</td>
|
||||||
<td>es_ES</td>
|
<td>es_ES</td>
|
||||||
<td>Lucas Vieites</td>
|
<td>Lucas Vieites</td>
|
||||||
<td>80%</td>
|
<td>80%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/cr.png" alt=""></td>
|
||||||
<td>Español (Costa Rica)</td>
|
<td>Español (Costa Rica)</td>
|
||||||
<td>es_CR</td>
|
<td>es_CR</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>68%</td>
|
<td>68%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/fr.png" alt=""></td>
|
||||||
<td>Français</td>
|
<td>Français</td>
|
||||||
<td>fr_FR</td>
|
<td>fr_FR</td>
|
||||||
<td>Laurent Cozic</td>
|
<td>Laurent Cozic</td>
|
||||||
<td>100%</td>
|
<td>100%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/it.png" alt=""></td>
|
||||||
<td>Italiano</td>
|
<td>Italiano</td>
|
||||||
<td>it_IT</td>
|
<td>it_IT</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>76%</td>
|
<td>76%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/be.png" alt=""></td>
|
||||||
<td>Nederlands</td>
|
<td>Nederlands</td>
|
||||||
<td>nl_BE</td>
|
<td>nl_BE</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>90%</td>
|
<td>90%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/br.png" alt=""></td>
|
||||||
<td>Português (Brasil)</td>
|
<td>Português (Brasil)</td>
|
||||||
<td>pt_BR</td>
|
<td>pt_BR</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>74%</td>
|
<td>74%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/ru.png" alt=""></td>
|
||||||
<td>Русский</td>
|
<td>Русский</td>
|
||||||
<td>ru_RU</td>
|
<td>ru_RU</td>
|
||||||
<td>Artyom Karlov <a href="mailto:artyom.karlov@gmail.com">artyom.karlov@gmail.com</a></td>
|
<td>Artyom Karlov <a href="mailto:artyom.karlov@gmail.com">artyom.karlov@gmail.com</a></td>
|
||||||
<td>96%</td>
|
<td>96%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/cn.png" alt=""></td>
|
||||||
<td>中文 (简体)</td>
|
<td>中文 (简体)</td>
|
||||||
<td>zh_CN</td>
|
<td>zh_CN</td>
|
||||||
<td>RCJacH <a href="mailto:RCJacH@outlook.com">RCJacH@outlook.com</a></td>
|
<td>RCJacH <a href="mailto:RCJacH@outlook.com">RCJacH@outlook.com</a></td>
|
||||||
<td>76%</td>
|
<td>76%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/jp.png" alt=""></td>
|
||||||
<td>日本語</td>
|
<td>日本語</td>
|
||||||
<td>ja_JP</td>
|
<td>ja_JP</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
Loading…
Reference in New Issue
Block a user