From 175d14224eeb5f43108d2bd4a6442ade2290b70e Mon Sep 17 00:00:00 2001 From: El RIDO Date: Fri, 16 Apr 2021 18:27:12 +0200 Subject: [PATCH] set plurals for and credit Estonian translation --- CHANGELOG.md | 1 + CREDITS.md | 1 + js/privatebin.js | 6 +++--- lib/I18n.php | 4 ++-- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 201fb81..a67fdc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # PrivateBin version history * **1.4 (not yet released)** + * ADDED: Translation for Estonian * **1.3.5 (2021-04-05)** * ADDED: Translation for Hebrew, Lithuanian, Indonesian and Catalan * ADDED: Make the project info configurable (#681) diff --git a/CREDITS.md b/CREDITS.md index 8b24f16..1aabf6f 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -50,3 +50,4 @@ Sébastien Sauvage - original idea and main developer * Moo - Lithuanian * whenwesober - Indonesian * retiolus - Catalan +* sarnane - Estonian diff --git a/js/privatebin.js b/js/privatebin.js index 42cdd96..e549dd6 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -601,7 +601,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { * @prop {string[]} * @readonly */ - const supportedLanguages = ['bg', 'cs', 'de', 'es', 'fr', 'he', 'hu', 'it', 'lt', 'no', 'nl', 'pl', 'pt', 'oc', 'ru', 'sl', 'uk', 'zh']; + const supportedLanguages = ['bg', 'ca', 'cs', 'de', 'es', 'et', 'fr', 'he', 'hu', 'id', 'it', 'lt', 'no', 'nl', 'pl', 'pt', 'oc', 'ru', 'sl', 'uk', 'zh']; /** * built in language @@ -767,7 +767,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { /** * per language functions to use to determine the plural form * - * @see {@link http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html} + * @see {@link https://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html} * @name I18n.getPluralForm * @function * @param {int} n @@ -795,7 +795,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { return n % 10 === 1 && n % 100 !== 11 ? 0 : (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2); case 'sl': return n % 100 === 1 ? 1 : (n % 100 === 2 ? 2 : (n % 100 === 3 || n % 100 === 4 ? 3 : 0)); - // bg, ca, de, en, es, hu, it, nl, no, pt + // bg, ca, de, en, es, et, hu, it, nl, no, pt default: return n !== 1 ? 1 : 0; } diff --git a/lib/I18n.php b/lib/I18n.php index ea7d07f..50bf0cc 100644 --- a/lib/I18n.php +++ b/lib/I18n.php @@ -305,7 +305,7 @@ class I18n /** * determines the plural form to use based on current language and given number * - * From: http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html + * From: https://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html * * @access protected * @static @@ -334,7 +334,7 @@ class I18n return $n % 10 == 1 && $n % 100 != 11 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2); case 'sl': return $n % 100 == 1 ? 1 : ($n % 100 == 2 ? 2 : ($n % 100 == 3 || $n % 100 == 4 ? 3 : 0)); - // bg, ca, de, en, es, hu, it, nl, no, pt + // bg, ca, de, en, es, et, hu, it, nl, no, pt default: return $n != 1 ? 1 : 0; } diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index a86faf3..ffea872 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -72,7 +72,7 @@ endif; ?> - + diff --git a/tpl/page.php b/tpl/page.php index 6dd4331..e58617d 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -50,7 +50,7 @@ endif; ?> - +