From 2847bbc45d53cff73bf4d8eb876ef8ca126e7a8c Mon Sep 17 00:00:00 2001 From: atnaguzin Date: Fri, 16 Dec 2016 12:21:15 +0300 Subject: [PATCH] added ru plural formula, updated template for edited privatebin.js --- js/privatebin.js | 2 ++ tpl/bootstrap-compact.php | 2 +- tpl/bootstrap-dark-page.php | 2 +- tpl/bootstrap-dark.php | 2 +- tpl/bootstrap-page.php | 2 +- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 2cd135c..3a53ac0 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -414,6 +414,8 @@ $(function() { return (n > 1 ? 1 : 0); case 'pl': return (n === 1 ? 0 : n%10 >= 2 && n %10 <=4 && (n%100 < 10 || n%100 >= 20) ? 1 : 2); + case 'ru': + return (n % 10 === 1 && n % 100 !== 11 ? 0 : (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2)); // en, de default: return (n !== 1 ? 1 : 0); diff --git a/tpl/bootstrap-compact.php b/tpl/bootstrap-compact.php index 2289293..2546b09 100644 --- a/tpl/bootstrap-compact.php +++ b/tpl/bootstrap-compact.php @@ -52,7 +52,7 @@ if ($MARKDOWN): - + diff --git a/tpl/bootstrap-dark-page.php b/tpl/bootstrap-dark-page.php index ad7d025..3a6415c 100644 --- a/tpl/bootstrap-dark-page.php +++ b/tpl/bootstrap-dark-page.php @@ -52,7 +52,7 @@ if ($MARKDOWN): - + diff --git a/tpl/bootstrap-dark.php b/tpl/bootstrap-dark.php index 1a827d3..b202036 100644 --- a/tpl/bootstrap-dark.php +++ b/tpl/bootstrap-dark.php @@ -53,7 +53,7 @@ if ($MARKDOWN): - + diff --git a/tpl/bootstrap-page.php b/tpl/bootstrap-page.php index 7e5b9cf..7e1545e 100644 --- a/tpl/bootstrap-page.php +++ b/tpl/bootstrap-page.php @@ -52,7 +52,7 @@ if ($MARKDOWN): - + diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 47738e8..65e391d 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -53,7 +53,7 @@ if ($MARKDOWN): - + diff --git a/tpl/page.php b/tpl/page.php index a171fca..ef2bcb2 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -47,7 +47,7 @@ if ($MARKDOWN): - +