From 63f2d367eca0a4db76570e60ad2002ede93bd19d Mon Sep 17 00:00:00 2001 From: Larry Aasen Date: Mon, 23 Sep 2024 07:55:27 -0400 Subject: [PATCH] Code clean up. --- CHANGELOG.md | 1 + README.md | 1 + example/lib/main_messages.dart | 2 ++ lib/src/upgrade_messages.dart | 11 +---------- test/upgrader_test.dart | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8c55300..ae506cba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 11.2.0 - [432] On CupertinoAlertDialog configured CupertinoActionButton isDefaultAction property for the Update button. Thanks to @lukemmtt for the change. +- Added new language translations for Pashto ('ps'). (thanks to @isshort) - Removed old travis.yaml CI file. ## 11.1.0 diff --git a/README.md b/README.md index 2d653537..983ab974 100644 --- a/README.md +++ b/README.md @@ -401,6 +401,7 @@ Languages supported: * Norwegian ('nb') * Persian ('fa') * Polish ('pl') +* Pashto ('ps') * Portuguese ('pt') * Russian ('ru') * Spanish ('es') diff --git a/example/lib/main_messages.dart b/example/lib/main_messages.dart index 34a68138..5228fcd4 100644 --- a/example/lib/main_messages.dart +++ b/example/lib/main_messages.dart @@ -59,6 +59,7 @@ class MyApp extends StatelessWidget { Locale('nl', ''), // Dutch, no country code Locale('pt', ''), // Portuguese, no country code Locale('pl', ''), // Polish, no country code + Locale('ps', ''), // Pashto, no country code Locale('ru', ''), // Russian, no country code Locale('sv', ''), // Swedish, no country code Locale('ta', ''), // Tamil, no country code @@ -157,6 +158,7 @@ class DemoLocalizationsDelegate 'nl', 'pt', 'pl', + 'ps', 'ru', 'sv', 'ta', diff --git a/lib/src/upgrade_messages.dart b/lib/src/upgrade_messages.dart index 06310768..839612a2 100644 --- a/lib/src/upgrade_messages.dart +++ b/lib/src/upgrade_messages.dart @@ -1,6 +1,4 @@ -/* - * Copyright (c) 2020-2022 Larry Aasen. All rights reserved. - */ +// Copyright (c) 2020-2024 Larry Aasen. All rights reserved. import 'dart:ui'; @@ -135,7 +133,6 @@ class UpgraderMessages { message = 'نسخه‌ی جدیدی از {{appName}} موجود است! نسخه‌ی {{currentAppStoreVersion}} در دسترس است ولی شما همچنان از نسخه‌ی {{currentInstalledVersion}} استفاده می‌کنید.'; break; - case 'fil': message = 'May bagong bersyon ang {{appName}} na pwede nang magamit! Ang bersyong {{currentAppStoreVersion}} ay pwede nang magamit. Ikaw ay kasalukuyang gumagamit ng bersyong {{currentInstalledVersion}}.'; @@ -387,9 +384,6 @@ class UpgraderMessages { String message; switch (languageCode) { case 'ar': - //only minor change here, removing the character at the left top of the arabic word (لاحقاً) - // before: message = 'لاحقاً'; - //now: message = 'لاحقا'; break; case 'bn': @@ -407,7 +401,6 @@ class UpgraderMessages { case 'fa': message = 'بعدا'; break; - case 'fil': message = 'MAMAYA'; break; @@ -526,7 +519,6 @@ class UpgraderMessages { case 'fa': message = 'بروزرسانی'; break; - case 'fil': message = 'I-UPDATE NA NGAYON'; break; @@ -646,7 +638,6 @@ class UpgraderMessages { case 'fa': message = 'آیا بروزرسانی می‌کنید؟'; break; - case 'fil': message = 'Gusto mo bang i-update ito ngayon?'; break; diff --git a/test/upgrader_test.dart b/test/upgrader_test.dart index 19b01a05..a2de35af 100644 --- a/test/upgrader_test.dart +++ b/test/upgrader_test.dart @@ -1137,7 +1137,6 @@ void main() { verifyMessages(UpgraderMessages(code: 'da'), 'da'); verifyMessages(UpgraderMessages(code: 'es'), 'es'); verifyMessages(UpgraderMessages(code: 'fa'), 'fa'); - verifyMessages(UpgraderMessages(code: 'ps'), 'ps'); verifyMessages(UpgraderMessages(code: 'fil'), 'fil'); verifyMessages(UpgraderMessages(code: 'fr'), 'fr'); verifyMessages(UpgraderMessages(code: 'de'), 'de'); @@ -1157,6 +1156,7 @@ void main() { verifyMessages(UpgraderMessages(code: 'mn'), 'mn'); verifyMessages(UpgraderMessages(code: 'nb'), 'nb'); verifyMessages(UpgraderMessages(code: 'nl'), 'nl'); + verifyMessages(UpgraderMessages(code: 'ps'), 'ps'); verifyMessages(UpgraderMessages(code: 'pt'), 'pt'); verifyMessages(UpgraderMessages(code: 'pl'), 'pl'); verifyMessages(UpgraderMessages(code: 'ru'), 'ru');