feat: Add localizations

This commit is contained in:
Christian Pauly 2021-09-19 12:51:28 +02:00
parent cf712c79f9
commit bc64e09fbe
2 changed files with 11 additions and 5 deletions

View File

@ -1562,6 +1562,10 @@
"placeholders": {} "placeholders": {}
}, },
"addAccount": "Add account", "addAccount": "Add account",
"editBundlesForAccount": "Edit bundles for this account",
"addToBundle": "Add to bundle",
"removeFromBundle": "Remove from this bundle",
"bundleName": "Bundle name",
"enableMultiAccounts": "Enable multi accounts on this device", "enableMultiAccounts": "Enable multi accounts on this device",
"openInMaps": "Open in maps", "openInMaps": "Open in maps",
"@openInMaps": { "@openInMaps": {

View File

@ -437,16 +437,16 @@ class ChatListController extends State<ChatList> {
.clients[Matrix.of(context).getClientIndexByMatrixId(userId)]; .clients[Matrix.of(context).getClientIndexByMatrixId(userId)];
final action = await showConfirmationDialog<EditBundleAction>( final action = await showConfirmationDialog<EditBundleAction>(
context: context, context: context,
title: 'Edit bundles for this account', title: L10n.of(context).editBundlesForAccount,
actions: [ actions: [
AlertDialogAction( AlertDialogAction(
key: EditBundleAction.addToBundle, key: EditBundleAction.addToBundle,
label: 'Add to bundle', label: L10n.of(context).addToBundle,
), ),
if (Matrix.of(context).activeBundle != null) if (Matrix.of(context).activeBundle != null)
AlertDialogAction( AlertDialogAction(
key: EditBundleAction.removeFromBundle, key: EditBundleAction.removeFromBundle,
label: 'Remove from this bundle', label: L10n.of(context).removeFromBundle,
), ),
], ],
); );
@ -455,8 +455,10 @@ class ChatListController extends State<ChatList> {
case EditBundleAction.addToBundle: case EditBundleAction.addToBundle:
final bundle = await showTextInputDialog( final bundle = await showTextInputDialog(
context: context, context: context,
title: 'Bundle name', title: L10n.of(context).bundleName,
textFields: [DialogTextField(hintText: 'Bundle name')]); textFields: [
DialogTextField(hintText: L10n.of(context).bundleName)
]);
if (bundle.isEmpty && bundle.single.isEmpty) return; if (bundle.isEmpty && bundle.single.isEmpty) return;
await showFutureLoadingDialog( await showFutureLoadingDialog(
context: context, context: context,