From ae06ab5860b007e94d63891d679e5c40b9292a8a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 20 Aug 2024 16:32:42 +0200 Subject: fix(rtl): Fix list of RTL languages Signed-off-by: Joas Schilling --- lib/private/L10N/Factory.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'lib/private') diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index a74781a2ed0..ea6360efdf0 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -58,10 +58,17 @@ class Factory implements IFactory { 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko' ]; + /** + * Keep in sync with `build/translation-checker.php` + */ public const RTL_LANGUAGES = [ - 'ae', 'ar', 'arc', 'arz', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', - 'ha', 'he', 'khw', 'ks', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', - 'ur', 'uzs', 'yi', + 'ar', // Arabic + 'fa', // Persian + 'he', // Hebrew + 'ps', // Pashto, + 'ug', // 'Uyghurche / Uyghur + 'ur_PK', // Urdu + 'uz', // Uzbek Afghan ]; private ICache $cache; @@ -371,8 +378,7 @@ class Factory implements IFactory { } - public function getLanguageDirectionFromLocale(string $locale): string - { + public function getLanguageDirectionFromLocale(string $locale): string { if (in_array($locale, self::RTL_LANGUAGES)) { return 'rtl'; } -- cgit v1.2.3