Skip to content

Commit 4effb82

Browse files
committed
l10n: Update translations from Weblate, except skip zh_Hans
Cherry-picked from 5466452, which was in the v0.0.29 preview beta. The cherry-pick required fixup only in rerunning `tools/check l10n --fix`, which changed the set of English fallback strings included in the new `de` translation. This update required adjustment; straight from the Weblate branch, l10n generation (`tools/check l10n --fix`) failed: Arb file for a fallback, zh, does not exist, even though the following locale(s) exist: [zh_Hans]. When locales specify a script code or country code, a base locale (without the script code or country code) should exist as the fallback. Please create a {fileName}_zh.arb file. The app_zh_Hans.arb file had only two translations in it; it exists at the moment precisely in order to test this sort of workflow. For the release, I just removed it and reran generation. (We'll include it properly in a future change.)
1 parent df51b3f commit 4effb82

9 files changed

+829
-15
lines changed

assets/l10n/app_de.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

assets/l10n/app_en_GB.arb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"topicValidationErrorMandatoryButEmpty": "Topics are required in this organisation.",
3+
"@topicValidationErrorMandatoryButEmpty": {
4+
"description": "Topic validation error when topic is required but was empty."
5+
}
6+
}

assets/l10n/app_pl.arb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,5 +1006,15 @@
10061006
"example": "4.0"
10071007
}
10081008
}
1009+
},
1010+
"composeBoxEnterTopicOrSkipHintText": "Wpisz tytuł wątku (pomiń aby uzyskać “{defaultTopicName}”)",
1011+
"@composeBoxEnterTopicOrSkipHintText": {
1012+
"description": "Hint text for topic input widget in compose box when topics are optional.",
1013+
"placeholders": {
1014+
"defaultTopicName": {
1015+
"type": "String",
1016+
"example": "general chat"
1017+
}
1018+
}
10091019
}
10101020
}

assets/l10n/app_uk.arb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@actionSheetOptionFollowTopic": {
88
"description": "Label for following a topic on action sheet."
99
},
10-
"actionSheetOptionUnstarMessage": "Зняти позначку зірочки з повідомлення",
10+
"actionSheetOptionUnstarMessage": "Зняти позначку зірки з повідомлення",
1111
"@actionSheetOptionUnstarMessage": {
1212
"description": "Label for unstar button on action sheet."
1313
},
@@ -51,11 +51,11 @@
5151
"@errorSharingFailed": {
5252
"description": "Error message when sharing a message failed."
5353
},
54-
"errorStarMessageFailedTitle": "Не вдалося позначити повідомлення зірочкою",
54+
"errorStarMessageFailedTitle": "Не вдалося позначити повідомлення зіркою",
5555
"@errorStarMessageFailedTitle": {
5656
"description": "Error title when starring a message failed."
5757
},
58-
"errorUnstarMessageFailedTitle": "Не вдалося зняти позначку зірочки з повідомлення",
58+
"errorUnstarMessageFailedTitle": "Не вдалося зняти позначку зірки з повідомлення",
5959
"@errorUnstarMessageFailedTitle": {
6060
"description": "Error title when unstarring a message failed."
6161
},
@@ -157,7 +157,7 @@
157157
"@permissionsDeniedReadExternalStorage": {
158158
"description": "Message for dialog asking the user to grant permissions for external storage read access."
159159
},
160-
"actionSheetOptionStarMessage": "Позначити повідомлення зірочкою",
160+
"actionSheetOptionStarMessage": "Вибрати повідомлення",
161161
"@actionSheetOptionStarMessage": {
162162
"description": "Label for star button on action sheet."
163163
},
@@ -315,7 +315,7 @@
315315
}
316316
}
317317
},
318-
"composeBoxGroupDmContentHint": "Група повідомлень",
318+
"composeBoxGroupDmContentHint": "Написати групі",
319319
"@composeBoxGroupDmContentHint": {
320320
"description": "Hint text for content input when sending a message to a group."
321321
},
@@ -691,7 +691,7 @@
691691
"@mentionsPageTitle": {
692692
"description": "Page title for the 'Mentions' message view."
693693
},
694-
"starredMessagesPageTitle": "Повідомлення, позначені зірочкою",
694+
"starredMessagesPageTitle": "Вибрані повідомлення",
695695
"@starredMessagesPageTitle": {
696696
"description": "Page title for the 'Starred messages' message view."
697697
},
@@ -955,7 +955,7 @@
955955
"@recentDmConversationsPageTitle": {
956956
"description": "Title for the page with a list of DM conversations."
957957
},
958-
"combinedFeedPageTitle": "Комбінована стрічка",
958+
"combinedFeedPageTitle": "Об'єднана стрічка",
959959
"@combinedFeedPageTitle": {
960960
"description": "Page title for the 'Combined feed' message view."
961961
},

lib/generated/l10n/zulip_localizations.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
66
import 'package:intl/intl.dart' as intl;
77

88
import 'zulip_localizations_ar.dart';
9+
import 'zulip_localizations_de.dart';
910
import 'zulip_localizations_en.dart';
1011
import 'zulip_localizations_ja.dart';
1112
import 'zulip_localizations_nb.dart';
@@ -102,6 +103,8 @@ abstract class ZulipLocalizations {
102103
static const List<Locale> supportedLocales = <Locale>[
103104
Locale('en'),
104105
Locale('ar'),
106+
Locale('de'),
107+
Locale('en', 'GB'),
105108
Locale('ja'),
106109
Locale('nb'),
107110
Locale('pl'),
@@ -1409,6 +1412,7 @@ class _ZulipLocalizationsDelegate
14091412
@override
14101413
bool isSupported(Locale locale) => <String>[
14111414
'ar',
1415+
'de',
14121416
'en',
14131417
'ja',
14141418
'nb',
@@ -1423,10 +1427,24 @@ class _ZulipLocalizationsDelegate
14231427
}
14241428

14251429
ZulipLocalizations lookupZulipLocalizations(Locale locale) {
1430+
// Lookup logic when language+country codes are specified.
1431+
switch (locale.languageCode) {
1432+
case 'en':
1433+
{
1434+
switch (locale.countryCode) {
1435+
case 'GB':
1436+
return ZulipLocalizationsEnGb();
1437+
}
1438+
break;
1439+
}
1440+
}
1441+
14261442
// Lookup logic when only language code is specified.
14271443
switch (locale.languageCode) {
14281444
case 'ar':
14291445
return ZulipLocalizationsAr();
1446+
case 'de':
1447+
return ZulipLocalizationsDe();
14301448
case 'en':
14311449
return ZulipLocalizationsEn();
14321450
case 'ja':

0 commit comments

Comments
 (0)