Skip to content

Commit 8a044a4

Browse files
committed
profile: Translate
Signed-off-by: Zixuan James Li <[email protected]>
1 parent d2d7dfc commit 8a044a4

9 files changed

+35
-6
lines changed

assets/l10n/app_en.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
"@profileButtonSendDirectMessage": {
5757
"description": "Label for button in profile screen to navigate to DMs with the shown user."
5858
},
59+
"errorShowUserProfile": "Could not show user profile.",
60+
"@errorShowUserProfile": {
61+
"description": "Message that appears on the user profile page when the profile cannot be shown."
62+
},
5963
"permissionsNeededTitle": "Permissions needed",
6064
"@permissionsNeededTitle": {
6165
"description": "Title for dialog asking the user to grant additional permissions."

lib/generated/l10n/zulip_localizations.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ abstract class ZulipLocalizations {
187187
/// **'Send direct message'**
188188
String get profileButtonSendDirectMessage;
189189

190+
/// Message that appears on the user profile page when the profile cannot be shown.
191+
///
192+
/// In en, this message translates to:
193+
/// **'Could not show user profile.'**
194+
String get errorShowUserProfile;
195+
190196
/// Title for dialog asking the user to grant additional permissions.
191197
///
192198
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
5252
@override
5353
String get profileButtonSendDirectMessage => 'Send direct message';
5454

55+
@override
56+
String get errorShowUserProfile => 'Could not show user profile.';
57+
5558
@override
5659
String get permissionsNeededTitle => 'Permissions needed';
5760

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
5252
@override
5353
String get profileButtonSendDirectMessage => 'Send direct message';
5454

55+
@override
56+
String get errorShowUserProfile => 'Could not show user profile.';
57+
5558
@override
5659
String get permissionsNeededTitle => 'Permissions needed';
5760

lib/generated/l10n/zulip_localizations_fr.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
5252
@override
5353
String get profileButtonSendDirectMessage => 'Send direct message';
5454

55+
@override
56+
String get errorShowUserProfile => 'Could not show user profile.';
57+
5558
@override
5659
String get permissionsNeededTitle => 'Permissions needed';
5760

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
5252
@override
5353
String get profileButtonSendDirectMessage => 'ダイレクトメッセージを送信';
5454

55+
@override
56+
String get errorShowUserProfile => 'Could not show user profile.';
57+
5558
@override
5659
String get permissionsNeededTitle => 'Permissions needed';
5760

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
5252
@override
5353
String get profileButtonSendDirectMessage => 'Wyślij wiadomość bezpośrednią';
5454

55+
@override
56+
String get errorShowUserProfile => 'Could not show user profile.';
57+
5558
@override
5659
String get permissionsNeededTitle => 'Wymagane uprawnienia';
5760

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
5252
@override
5353
String get profileButtonSendDirectMessage => 'Отправить личное сообщение';
5454

55+
@override
56+
String get errorShowUserProfile => 'Could not show user profile.';
57+
5558
@override
5659
String get permissionsNeededTitle => 'Требуются разрешения';
5760

lib/widgets/profile.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,18 @@ class _ProfileErrorPage extends StatelessWidget {
121121

122122
@override
123123
Widget build(BuildContext context) {
124+
final zulipLocalizations = ZulipLocalizations.of(context);
124125
return Scaffold(
125-
appBar: ZulipAppBar(title: const Text('Error')),
126-
body: const SingleChildScrollView(
126+
appBar: ZulipAppBar(title: Text(zulipLocalizations.errorDialogTitle)),
127+
body: SingleChildScrollView(
127128
child: Padding(
128-
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 32),
129+
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 32),
129130
child: Row(
130131
mainAxisAlignment: MainAxisAlignment.center,
131132
children: [
132-
Icon(Icons.error),
133-
SizedBox(width: 4),
134-
Text('Could not show user profile.'),
133+
const Icon(Icons.error),
134+
const SizedBox(width: 4),
135+
Text(zulipLocalizations.errorShowUserProfile),
135136
]))));
136137
}
137138
}

0 commit comments

Comments
 (0)