Skip to content

Update translations from Weblate with app_zh.arb added, support zh-Hant-TW #1520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/l10n/app_de.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions assets/l10n/app_en_GB.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"topicValidationErrorMandatoryButEmpty": "Topics are required in this organisation.",
"@topicValidationErrorMandatoryButEmpty": {
"description": "Topic validation error when topic is required but was empty."
}
}
72 changes: 69 additions & 3 deletions assets/l10n/app_pl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}
}
},
"errorCouldNotFetchMessageSource": "Nie można uzyskać źródłowej wiadomości",
"errorCouldNotFetchMessageSource": "Nie można uzyskać źródłowej wiadomości.",
"@errorCouldNotFetchMessageSource": {
"description": "Error message when the source of a message could not be fetched."
},
Expand Down Expand Up @@ -377,11 +377,11 @@
"@topicValidationErrorMandatoryButEmpty": {
"description": "Topic validation error when topic is required but was empty."
},
"errorInvalidResponse": "Nieprawidłowa odpowiedź serwera",
"errorInvalidResponse": "Nieprawidłowa odpowiedź serwera.",
"@errorInvalidResponse": {
"description": "Error message when an API call returned an invalid response."
},
"errorVideoPlayerFailed": "Nie da rady odtworzyć wideo",
"errorVideoPlayerFailed": "Nie da rady odtworzyć wideo.",
"@errorVideoPlayerFailed": {
"description": "Error message when a video fails to play."
},
Expand Down Expand Up @@ -1006,5 +1006,71 @@
"example": "4.0"
}
}
},
"composeBoxEnterTopicOrSkipHintText": "Wpisz tytuł wątku (pomiń aby uzyskać “{defaultTopicName}”)",
"@composeBoxEnterTopicOrSkipHintText": {
"description": "Hint text for topic input widget in compose box when topics are optional.",
"placeholders": {
"defaultTopicName": {
"type": "String",
"example": "general chat"
}
}
},
"actionSheetOptionEditMessage": "Zmień wiadomość",
"@actionSheetOptionEditMessage": {
"description": "Label for the 'Edit message' button in the message action sheet."
},
"errorMessageEditNotSaved": "Nie zapisano wiadomości",
"@errorMessageEditNotSaved": {
"description": "Error message for compose box when a message edit could not be saved."
},
"errorCouldNotEditMessageTitle": "Nie można zmienić wiadomości",
"@errorCouldNotEditMessageTitle": {
"description": "Error title when an exception prevented us from opening the compose box for editing a message."
},
"composeBoxBannerLabelEditMessage": "Zmień wiadomość",
"@composeBoxBannerLabelEditMessage": {
"description": "Label text for the compose-box banner when you are editing a message."
},
"editAlreadyInProgressMessage": "Operacja zmiany w toku. Zaczekaj na jej zakończenie.",
"@editAlreadyInProgressMessage": {
"description": "Error message when a message edit cannot be saved because there is another edit already in progress."
},
"savingMessageEditLabel": "ZAPIS ZMIANY…",
"@savingMessageEditLabel": {
"description": "Text on a message in the message list saying that a message edit request is processing. (Use ALL CAPS for cased alphabets: Latin, Greek, Cyrillic, etc.)"
},
"savingMessageEditFailedLabel": "NIE ZAPISANO ZMIANY",
"@savingMessageEditFailedLabel": {
"description": "Text on a message in the message list saying that a message edit request failed. (Use ALL CAPS for cased alphabets: Latin, Greek, Cyrillic, etc.)"
},
"discardDraftConfirmationDialogTitle": "Czy chcesz przerwać szykowanie wpisu?",
"@discardDraftConfirmationDialogTitle": {
"description": "Title for a confirmation dialog for discarding message text that was typed into the compose box."
},
"discardDraftConfirmationDialogMessage": "Miej na uwadze, że przechodząc do zmiany wiadomości wyczyścisz okno nowej wiadomości.",
"@discardDraftConfirmationDialogMessage": {
"description": "Message for a confirmation dialog for discarding message text that was typed into the compose box."
},
"discardDraftConfirmationDialogConfirmButton": "Odrzuć",
"@discardDraftConfirmationDialogConfirmButton": {
"description": "Label for the 'Discard' button on a confirmation dialog for discarding message text that was typed into the compose box."
},
"composeBoxBannerButtonCancel": "Anuluj",
"@composeBoxBannerButtonCancel": {
"description": "Label text for the 'Cancel' button in the compose-box banner when you are editing a message."
},
"preparingEditMessageContentInput": "Przygotowywanie…",
"@preparingEditMessageContentInput": {
"description": "Hint text for content input when the compose box is preparing to edit a message."
},
"editAlreadyInProgressTitle": "Nie udało się zapisać zmiany",
"@editAlreadyInProgressTitle": {
"description": "Error title when a message edit cannot be saved because there is another edit already in progress."
},
"composeBoxBannerButtonSave": "Zapisz",
"@composeBoxBannerButtonSave": {
"description": "Label text for the 'Save' button in the compose-box banner when you are editing a message."
}
}
14 changes: 7 additions & 7 deletions assets/l10n/app_uk.arb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@actionSheetOptionFollowTopic": {
"description": "Label for following a topic on action sheet."
},
"actionSheetOptionUnstarMessage": "Зняти позначку зірочки з повідомлення",
"actionSheetOptionUnstarMessage": "Зняти позначку зірки з повідомлення",
"@actionSheetOptionUnstarMessage": {
"description": "Label for unstar button on action sheet."
},
Expand Down Expand Up @@ -51,11 +51,11 @@
"@errorSharingFailed": {
"description": "Error message when sharing a message failed."
},
"errorStarMessageFailedTitle": "Не вдалося позначити повідомлення зірочкою",
"errorStarMessageFailedTitle": "Не вдалося позначити повідомлення зіркою",
"@errorStarMessageFailedTitle": {
"description": "Error title when starring a message failed."
},
"errorUnstarMessageFailedTitle": "Не вдалося зняти позначку зірочки з повідомлення",
"errorUnstarMessageFailedTitle": "Не вдалося зняти позначку зірки з повідомлення",
"@errorUnstarMessageFailedTitle": {
"description": "Error title when unstarring a message failed."
},
Expand Down Expand Up @@ -157,7 +157,7 @@
"@permissionsDeniedReadExternalStorage": {
"description": "Message for dialog asking the user to grant permissions for external storage read access."
},
"actionSheetOptionStarMessage": "Позначити повідомлення зірочкою",
"actionSheetOptionStarMessage": "Вибрати повідомлення",
"@actionSheetOptionStarMessage": {
"description": "Label for star button on action sheet."
},
Expand Down Expand Up @@ -315,7 +315,7 @@
}
}
},
"composeBoxGroupDmContentHint": "Група повідомлень",
"composeBoxGroupDmContentHint": "Написати групі",
"@composeBoxGroupDmContentHint": {
"description": "Hint text for content input when sending a message to a group."
},
Expand Down Expand Up @@ -691,7 +691,7 @@
"@mentionsPageTitle": {
"description": "Page title for the 'Mentions' message view."
},
"starredMessagesPageTitle": "Повідомлення, позначені зірочкою",
"starredMessagesPageTitle": "Вибрані повідомлення",
"@starredMessagesPageTitle": {
"description": "Page title for the 'Starred messages' message view."
},
Expand Down Expand Up @@ -955,7 +955,7 @@
"@recentDmConversationsPageTitle": {
"description": "Title for the page with a list of DM conversations."
},
"combinedFeedPageTitle": "Комбінована стрічка",
"combinedFeedPageTitle": "Об'єднана стрічка",
"@combinedFeedPageTitle": {
"description": "Page title for the 'Combined feed' message view."
},
Expand Down
1 change: 1 addition & 0 deletions assets/l10n/app_zh.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
10 changes: 10 additions & 0 deletions assets/l10n/app_zh_Hans.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"chooseAccountButtonAddAnAccount": "新增帐户",
"@chooseAccountButtonAddAnAccount": {
"description": "Label for ChooseAccountPage button to add an account"
},
"aboutPageAppVersion": "应用版本",
"@aboutPageAppVersion": {
"description": "Label for Zulip app version in About Zulip page"
}
}
1 change: 1 addition & 0 deletions assets/l10n/app_zh_Hant_TW.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
47 changes: 47 additions & 0 deletions lib/generated/l10n/zulip_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;

import 'zulip_localizations_ar.dart';
import 'zulip_localizations_de.dart';
import 'zulip_localizations_en.dart';
import 'zulip_localizations_ja.dart';
import 'zulip_localizations_nb.dart';
import 'zulip_localizations_pl.dart';
import 'zulip_localizations_ru.dart';
import 'zulip_localizations_sk.dart';
import 'zulip_localizations_uk.dart';
import 'zulip_localizations_zh.dart';

// ignore_for_file: type=lint

Expand Down Expand Up @@ -102,12 +104,21 @@ abstract class ZulipLocalizations {
static const List<Locale> supportedLocales = <Locale>[
Locale('en'),
Locale('ar'),
Locale('de'),
Locale('en', 'GB'),
Locale('ja'),
Locale('nb'),
Locale('pl'),
Locale('ru'),
Locale('sk'),
Locale('uk'),
Locale('zh'),
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'),
Locale.fromSubtags(
languageCode: 'zh',
countryCode: 'TW',
scriptCode: 'Hant',
),
];

/// Title for About Zulip page.
Expand Down Expand Up @@ -1409,24 +1420,58 @@ class _ZulipLocalizationsDelegate
@override
bool isSupported(Locale locale) => <String>[
'ar',
'de',
'en',
'ja',
'nb',
'pl',
'ru',
'sk',
'uk',
'zh',
].contains(locale.languageCode);

@override
bool shouldReload(_ZulipLocalizationsDelegate old) => false;
}

ZulipLocalizations lookupZulipLocalizations(Locale locale) {
// Lookup logic when language+script+country codes are specified.
switch (locale.toString()) {
case 'zh_Hant_TW':
return ZulipLocalizationsZhHantTw();
}

// Lookup logic when language+script codes are specified.
switch (locale.languageCode) {
case 'zh':
{
switch (locale.scriptCode) {
case 'Hans':
return ZulipLocalizationsZhHans();
}
break;
}
}

// Lookup logic when language+country codes are specified.
switch (locale.languageCode) {
case 'en':
{
switch (locale.countryCode) {
case 'GB':
return ZulipLocalizationsEnGb();
}
break;
}
}

// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'ar':
return ZulipLocalizationsAr();
case 'de':
return ZulipLocalizationsDe();
case 'en':
return ZulipLocalizationsEn();
case 'ja':
Expand All @@ -1441,6 +1486,8 @@ ZulipLocalizations lookupZulipLocalizations(Locale locale) {
return ZulipLocalizationsSk();
case 'uk':
return ZulipLocalizationsUk();
case 'zh':
return ZulipLocalizationsZh();
}

throw FlutterError(
Expand Down
Loading