From 7430a917356d1a783328349413ad7bd27e643a0e Mon Sep 17 00:00:00 2001 From: "b.aboud" <57720463+badees99@users.noreply.github.com> Date: Tue, 6 Aug 2024 17:34:15 +0200 Subject: [PATCH 1/3] added central kordi to the rtl language regex --- pkgs/intl/lib/src/intl/bidi.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/intl/lib/src/intl/bidi.dart b/pkgs/intl/lib/src/intl/bidi.dart index ef04a0f0..70b90643 100644 --- a/pkgs/intl/lib/src/intl/bidi.dart +++ b/pkgs/intl/lib/src/intl/bidi.dart @@ -109,7 +109,7 @@ class Bidi { } static final _rtlLocaleRegex = RegExp( - r'^(ar|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_]' + r'^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_]' r'(Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))' r'($|-|_)', caseSensitive: false); From 05c7f73af19dd013d090a7066622da148ba5c4ea Mon Sep 17 00:00:00 2001 From: "b.aboud" <57720463+badees99@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:11:53 +0200 Subject: [PATCH 2/3] updated bidi_utils_test for ckb(sorani Kordi) in isRtlLanguage check --- pkgs/intl/test/bidi_utils_test.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/intl/test/bidi_utils_test.dart b/pkgs/intl/test/bidi_utils_test.dart index 956608b9..58636cb1 100644 --- a/pkgs/intl/test/bidi_utils_test.dart +++ b/pkgs/intl/test/bidi_utils_test.dart @@ -31,6 +31,7 @@ void main() { expect(Bidi.isRtlLanguage('az-Arab'), isTrue); expect(Bidi.isRtlLanguage('az-ARAB-IR'), isTrue); expect(Bidi.isRtlLanguage('az_arab_IR'), isTrue); + expect(Bidi.isRtlLanguage('ckb'), isTrue); Intl.withLocale('en_US', () { expect(Bidi.isRtlLanguage(), isFalse); }); From 4b6ad07c61989542062e343f43db0391fae8649b Mon Sep 17 00:00:00 2001 From: "b.aboud" <57720463+badees99@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:18:13 +0200 Subject: [PATCH 3/3] chore: Change log update --- pkgs/intl/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/intl/CHANGELOG.md b/pkgs/intl/CHANGELOG.md index 7a919fba..470e30a0 100644 --- a/pkgs/intl/CHANGELOG.md +++ b/pkgs/intl/CHANGELOG.md @@ -9,6 +9,7 @@ * Require `package:web` `^0.5.0`. * Support compiling to WASM. * Update to and account for `package:lints` `^4.0.0`. + * rtl Detection fix in `bidi.dart` for Kordi Sorani "ckb". ## 0.19.0 * Update to CLDR v44.