From 89df4a54ec3b6f2d3522f0bcd87ddc50417cb336 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Mon, 7 Nov 2022 07:12:40 +0100 Subject: [PATCH] enable and credit Thai translation --- CHANGELOG.md | 2 +- CREDITS.md | 1 + js/privatebin.js | 3 ++- lib/I18n.php | 1 + tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c3950..d8ac2cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ * **1.4.1 (not yet released)** * ADDED: script for data storage backend migrations (#1012) - * ADDED: Translations for Turkish, Slovak and Greek + * ADDED: Translations for Turkish, Slovak, Greek and Thai * ADDED: S3 Storage backend (#994) * CHANGED: Switched to Jdenticons as the default for comment icons (#793) * CHANGED: Avoid `SUPER` privilege for setting the `sql_mode` for MariaDB/MySQL (#919) diff --git a/CREDITS.md b/CREDITS.md index eb5f152..7a19c5f 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -62,3 +62,4 @@ * Emir Ensar Rahmanlar - Turkish * Stevo984 - Slovak * Christos Karamolegkos - Greek +* jaideejung007 - Thai diff --git a/js/privatebin.js b/js/privatebin.js index fe326b4..5171477 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -627,7 +627,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { * @prop {string[]} * @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', 'sk', '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', 'th', 'tr', 'uk', 'zh']; /** * built in language @@ -815,6 +815,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { return n === 1 ? 0 : (n === 2 ? 1 : ((n < 0 || n > 10) && (n % 10 === 0) ? 2 : 3)); case 'id': case 'jbo': + case 'th': return 0; case 'lt': return n % 10 === 1 && n % 100 !== 11 ? 0 : ((n % 10 >= 2 && n % 100 < 10 || n % 100 >= 20) ? 1 : 2); diff --git a/lib/I18n.php b/lib/I18n.php index c3c635f..5c46938 100644 --- a/lib/I18n.php +++ b/lib/I18n.php @@ -328,6 +328,7 @@ class I18n return $n === 1 ? 0 : ($n === 2 ? 1 : (($n < 0 || $n > 10) && ($n % 10 === 0) ? 2 : 3)); case 'id': case 'jbo': + case 'th': return 0; case 'lt': return $n % 10 === 1 && $n % 100 !== 11 ? 0 : (($n % 10 >= 2 && $n % 100 < 10 || $n % 100 >= 20) ? 1 : 2); diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 3dd4913..b3441a7 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -73,7 +73,7 @@ endif; ?> - + diff --git a/tpl/page.php b/tpl/page.php index f91cb7d..42380ab 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -51,7 +51,7 @@ endif; ?> - +