1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Tools Added support for translation validation in CI, and added support for plural translations

This commit is contained in:
Laurent Cozic
2019-12-10 21:10:47 +00:00
parent 554c46182a
commit b5d5d02a9c
4 changed files with 56 additions and 1 deletions

View File

@ -317,4 +317,9 @@ function _(s, ...args) {
}
}
module.exports = { _, supportedLocales, countryDisplayName, localeStrings, setLocale, supportedLocalesToLanguages, defaultLocale, closestSupportedLocale, languageCode, countryCodeOnly };
function _n(singular, plural, n, ...args) {
if (n > 1) return _(plural, ...args);
return _(singular, ...args);
}
module.exports = { _, _n, supportedLocales, countryDisplayName, localeStrings, setLocale, supportedLocalesToLanguages, defaultLocale, closestSupportedLocale, languageCode, countryCodeOnly };