From 5a9bcea3a919af84e275dc77c80ea270272a4663 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Tue, 9 Mar 2021 05:54:06 +0100 Subject: [PATCH] set plurals for and credit Indonesian translation --- CHANGELOG.md | 2 +- CREDITS.md | 1 + js/privatebin.js | 2 ++ lib/I18n.php | 2 ++ tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e8b8eb6..35c2a00e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # PrivateBin version history * **1.4 (not yet released)** - * ADDED: Translation for Hebrew and Lithuanian + * ADDED: Translation for Hebrew, Lithuanian and Indonesian * CHANGED: Upgrading libraries to: DOMpurify 2.0.14 * **1.3.4 (2020-03-22)** * CHANGED: Minimum required PHP version is 5.6, due to a change in the identicon library and to use php's native hash_equals() diff --git a/CREDITS.md b/CREDITS.md index ec593035..c750b870 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -48,3 +48,4 @@ Sébastien Sauvage - original idea and main developer * AndriiZ - Ukrainian * Yaron Shahrabani - Hebrew * Moo - Lithuanian +* whenwesober - Indonesian diff --git a/js/privatebin.js b/js/privatebin.js index 20e8c5e8..de8cb4dd 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -784,6 +784,8 @@ jQuery.PrivateBin = (function($, RawDeflate) { return n > 1 ? 1 : 0; case 'he': return n === 1 ? 0 : (n === 2 ? 1 : ((n < 0 || n > 10) && (n % 10 === 0) ? 2 : 3)); + case 'id': + return 0; case 'lt': return n % 10 === 1 && n % 100 !== 11 ? 0 : ((n % 10 >= 2 && n % 100 < 10 || n % 100 >= 20) ? 1 : 2); case 'pl': diff --git a/lib/I18n.php b/lib/I18n.php index f9fbd6ea..45e8dd52 100644 --- a/lib/I18n.php +++ b/lib/I18n.php @@ -323,6 +323,8 @@ class I18n return $n > 1 ? 1 : 0; case 'he': return $n === 1 ? 0 : ($n === 2 ? 1 : (($n < 0 || $n > 10) && ($n % 10 === 0) ? 2 : 3)); + case 'id': + return 0; case 'lt': return $n % 10 === 1 && $n % 100 !== 11 ? 0 : (($n % 10 >= 2 && $n % 100 < 10 || $n % 100 >= 20) ? 1 : 2); case 'pl': diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 18ef595f..c28b44dc 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 aade5bd2..49098111 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -50,7 +50,7 @@ endif; ?> - +