Merge pull request #983 from PrivateBin/slovak
enable use of Slovak translations
This commit is contained in:
commit
160207b25a
|
@ -1,7 +1,7 @@
|
||||||
# PrivateBin version history
|
# PrivateBin version history
|
||||||
|
|
||||||
* **1.4.1 (not yet released)**
|
* **1.4.1 (not yet released)**
|
||||||
* ADDED: Translations for Turkish
|
* ADDED: Translations for Turkish, Slovak and Greek
|
||||||
* CHANGED: Avoid `SUPER` privilege for setting the `sql_mode` for MariaDB/MySQL (#919)
|
* CHANGED: Avoid `SUPER` privilege for setting the `sql_mode` for MariaDB/MySQL (#919)
|
||||||
* FIXED: Revert to CREATE INDEX without IF NOT EXISTS clauses, to support MySQL (#943)
|
* FIXED: Revert to CREATE INDEX without IF NOT EXISTS clauses, to support MySQL (#943)
|
||||||
* FIXED: Apply table prefix to indexes as well, to support multiple instances sharing a single database (#943)
|
* FIXED: Apply table prefix to indexes as well, to support multiple instances sharing a single database (#943)
|
||||||
|
|
|
@ -57,3 +57,5 @@
|
||||||
* Patriccollu di Santa Maria è Sichè - Corsican
|
* Patriccollu di Santa Maria è Sichè - Corsican
|
||||||
* Markus Mikkonen - Finnish
|
* Markus Mikkonen - Finnish
|
||||||
* Emir Ensar Rahmanlar - Turkish
|
* Emir Ensar Rahmanlar - Turkish
|
||||||
|
* Stevo984 - Slovak
|
||||||
|
* Christos Karamolegkos - Greek
|
|
@ -627,7 +627,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||||
* @prop {string[]}
|
* @prop {string[]}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
const supportedLanguages = ['bg', 'ca', 'co', 'cs', 'de', 'el', 'es', 'et', 'fi', 'fr', 'he', 'hu', 'id', 'it', 'jbo', 'lt', 'no', 'nl', 'pl', 'pt', 'oc', 'ru', 'sl', 'tr', 'uk', 'zh'];
|
const supportedLanguages = ['bg', 'ca', 'co', 'cs', 'de', 'el', 'es', 'et', 'fi', 'fr', 'he', 'hu', 'id', 'it', 'jbo', 'lt', 'no', 'nl', 'pl', 'pt', 'oc', 'ru', 'sk', 'sl', 'tr', 'uk', 'zh'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* built in language
|
* built in language
|
||||||
|
@ -803,7 +803,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||||
switch (language)
|
switch (language)
|
||||||
{
|
{
|
||||||
case 'cs':
|
case 'cs':
|
||||||
return n === 1 ? 0 : (n >= 2 && n <=4 ? 1 : 2);
|
case 'sk':
|
||||||
|
return n === 1 ? 0 : (n >= 2 && n <= 4 ? 1 : 2);
|
||||||
case 'co':
|
case 'co':
|
||||||
case 'fr':
|
case 'fr':
|
||||||
case 'oc':
|
case 'oc':
|
||||||
|
@ -818,13 +819,13 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||||
case 'lt':
|
case 'lt':
|
||||||
return n % 10 === 1 && n % 100 !== 11 ? 0 : ((n % 10 >= 2 && n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
return n % 10 === 1 && n % 100 !== 11 ? 0 : ((n % 10 >= 2 && n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
||||||
case 'pl':
|
case 'pl':
|
||||||
return n === 1 ? 0 : (n % 10 >= 2 && n %10 <=4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
return n === 1 ? 0 : (n % 10 >= 2 && n %10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
||||||
case 'ru':
|
case 'ru':
|
||||||
case 'uk':
|
case 'uk':
|
||||||
return n % 10 === 1 && n % 100 !== 11 ? 0 : (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
return n % 10 === 1 && n % 100 !== 11 ? 0 : (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
|
||||||
case 'sl':
|
case 'sl':
|
||||||
return n % 100 === 1 ? 1 : (n % 100 === 2 ? 2 : (n % 100 === 3 || n % 100 === 4 ? 3 : 0));
|
return n % 100 === 1 ? 1 : (n % 100 === 2 ? 2 : (n % 100 === 3 || n % 100 === 4 ? 3 : 0));
|
||||||
// bg, ca, de, en, es, et, fi, hu, it, nl, no, pt
|
// bg, ca, de, el, en, es, et, fi, hu, it, nl, no, pt
|
||||||
default:
|
default:
|
||||||
return n !== 1 ? 1 : 0;
|
return n !== 1 ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
13
lib/I18n.php
13
lib/I18n.php
|
@ -316,7 +316,8 @@ class I18n
|
||||||
{
|
{
|
||||||
switch (self::$_language) {
|
switch (self::$_language) {
|
||||||
case 'cs':
|
case 'cs':
|
||||||
return $n == 1 ? 0 : ($n >= 2 && $n <= 4 ? 1 : 2);
|
case 'sk':
|
||||||
|
return $n === 1 ? 0 : ($n >= 2 && $n <= 4 ? 1 : 2);
|
||||||
case 'co':
|
case 'co':
|
||||||
case 'fr':
|
case 'fr':
|
||||||
case 'oc':
|
case 'oc':
|
||||||
|
@ -331,15 +332,15 @@ class I18n
|
||||||
case 'lt':
|
case 'lt':
|
||||||
return $n % 10 === 1 && $n % 100 !== 11 ? 0 : (($n % 10 >= 2 && $n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
return $n % 10 === 1 && $n % 100 !== 11 ? 0 : (($n % 10 >= 2 && $n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
||||||
case 'pl':
|
case 'pl':
|
||||||
return $n == 1 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
return $n === 1 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
||||||
case 'ru':
|
case 'ru':
|
||||||
case 'uk':
|
case 'uk':
|
||||||
return $n % 10 == 1 && $n % 100 != 11 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
return $n % 10 === 1 && $n % 100 != 11 ? 0 : ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20) ? 1 : 2);
|
||||||
case 'sl':
|
case 'sl':
|
||||||
return $n % 100 == 1 ? 1 : ($n % 100 == 2 ? 2 : ($n % 100 == 3 || $n % 100 == 4 ? 3 : 0));
|
return $n % 100 === 1 ? 1 : ($n % 100 === 2 ? 2 : ($n % 100 === 3 || $n % 100 === 4 ? 3 : 0));
|
||||||
// bg, ca, de, en, es, et, fi, hu, it, nl, no, pt
|
// bg, ca, de, el, en, es, et, fi, hu, it, nl, no, pt
|
||||||
default:
|
default:
|
||||||
return $n != 1 ? 1 : 0;
|
return $n !== 1 ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-2.3.6.js" integrity="sha512-N1GGPjbqLbwK821ZN7C925WuTwU4aDxz2CEEOXQ6/s6m6MBwVj8fh5fugiE2hzsm0xud3q7jpjZQ4ILnpMREYQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-2.3.6.js" integrity="sha512-N1GGPjbqLbwK821ZN7C925WuTwU4aDxz2CEEOXQ6/s6m6MBwVj8fh5fugiE2hzsm0xud3q7jpjZQ4ILnpMREYQ==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LCmpvUm4PYfWg/L4mGqxxXkb8WOAZE5S8rfbyVLoWzahiOIYlS5Zje6c+o7GgpFKmi/7tMOOdzzf2kzT7KhPTQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-sQhu+q8ayRj0LO80orHnhEudlTf5Qx+Yhb/+U84ixMvSdwijuLEHGiEuWctqUPOFSe56L6aeq6z7K0ONpbgaew==" crossorigin="anonymous"></script>
|
||||||
<!-- icon -->
|
<!-- icon -->
|
||||||
<link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
|
<link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
|
||||||
<link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />
|
<link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />
|
||||||
|
|
|
@ -51,7 +51,7 @@ endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-2.3.6.js" integrity="sha512-N1GGPjbqLbwK821ZN7C925WuTwU4aDxz2CEEOXQ6/s6m6MBwVj8fh5fugiE2hzsm0xud3q7jpjZQ4ILnpMREYQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-2.3.6.js" integrity="sha512-N1GGPjbqLbwK821ZN7C925WuTwU4aDxz2CEEOXQ6/s6m6MBwVj8fh5fugiE2hzsm0xud3q7jpjZQ4ILnpMREYQ==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LCmpvUm4PYfWg/L4mGqxxXkb8WOAZE5S8rfbyVLoWzahiOIYlS5Zje6c+o7GgpFKmi/7tMOOdzzf2kzT7KhPTQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-sQhu+q8ayRj0LO80orHnhEudlTf5Qx+Yhb/+U84ixMvSdwijuLEHGiEuWctqUPOFSe56L6aeq6z7K0ONpbgaew==" crossorigin="anonymous"></script>
|
||||||
<!-- icon -->
|
<!-- icon -->
|
||||||
<link rel="apple-touch-icon" href="img/apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
|
<link rel="apple-touch-icon" href="img/apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
|
||||||
<link rel="icon" type="image/png" href="img/favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />
|
<link rel="icon" type="image/png" href="img/favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />
|
||||||
|
|
Loading…
Reference in New Issue