summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2024-04-12 14:41:27 +0200
committerOskar Nyberg <oskar@mullvad.net>2024-04-12 14:41:27 +0200
commitbe0a46a83ea131caad8c0a972ae337a86871b3a5 (patch)
tree652b81719e7d43f4f2fedbeba61277743c94c1fe
parent0f38aede02ef25869d81893f8742329ebb22b3a2 (diff)
parentfe15f605ef4d05a6c655209f0a10196141ce6021 (diff)
downloadmullvadvpn-be0a46a83ea131caad8c0a972ae337a86871b3a5.tar.xz
mullvadvpn-be0a46a83ea131caad8c0a972ae337a86871b3a5.zip
Merge branch 'add-missing-translation-labels-in-api-access-methods-des-642'
-rw-r--r--gui/locales/messages.pot12
-rw-r--r--gui/src/renderer/components/ApiAccessMethods.tsx12
-rw-r--r--gui/src/renderer/components/EditApiAccessMethod.tsx10
3 files changed, 26 insertions, 8 deletions
diff --git a/gui/locales/messages.pot b/gui/locales/messages.pot
index da18e9b021..1873be2038 100644
--- a/gui/locales/messages.pot
+++ b/gui/locales/messages.pot
@@ -129,6 +129,9 @@ msgstr ""
msgid "Dismiss"
msgstr ""
+msgid "Edit"
+msgstr ""
+
msgid "Enable"
msgstr ""
@@ -224,6 +227,9 @@ msgstr ""
msgid "TCP"
msgstr ""
+msgid "Test"
+msgstr ""
+
#. Warning shown in dialog to users when they enable setting that increases
#. network latency (decreases performance).
#. Warning text in a dialog that is displayed after a setting is toggled.
@@ -248,6 +254,9 @@ msgstr ""
msgid "UNSECURED CONNECTION"
msgstr ""
+msgid "Use"
+msgstr ""
+
msgid "Username"
msgstr ""
@@ -383,8 +392,9 @@ msgctxt "api-access-methods-view"
msgid "Authentication"
msgstr ""
+#. %(save)s - Will be replaced with the translation for the word "Save".
msgctxt "api-access-methods-view"
-msgid "Clicking “Save” changes the in use method."
+msgid "Clicking “%(save)s” changes the in use method."
msgstr ""
msgctxt "api-access-methods-view"
diff --git a/gui/src/renderer/components/ApiAccessMethods.tsx b/gui/src/renderer/components/ApiAccessMethods.tsx
index ccec1ce823..78f0a11e77 100644
--- a/gui/src/renderer/components/ApiAccessMethods.tsx
+++ b/gui/src/renderer/components/ApiAccessMethods.tsx
@@ -200,11 +200,15 @@ function ApiAccessMethod(props: ApiAccessMethodProps) {
const items: Array<ContextMenuItem> = [
{
type: 'item' as const,
- label: 'Use',
+ label: messages.gettext('Use'),
disabled: props.inUse,
onClick: setApiAccessMethod,
},
- { type: 'item' as const, label: 'Test', onClick: () => testApiAccessMethod(props.method.id) },
+ {
+ type: 'item' as const,
+ label: messages.gettext('Test'),
+ onClick: () => testApiAccessMethod(props.method.id),
+ },
];
// Edit and Delete shouldn't be available for direct and bridges.
@@ -213,7 +217,7 @@ function ApiAccessMethod(props: ApiAccessMethodProps) {
{ type: 'separator' as const },
{
type: 'item' as const,
- label: 'Edit',
+ label: messages.gettext('Edit'),
onClick: () =>
history.push(
generateRoutePath(RoutePath.editApiAccessMethods, { id: props.method.id }),
@@ -221,7 +225,7 @@ function ApiAccessMethod(props: ApiAccessMethodProps) {
},
{
type: 'item' as const,
- label: 'Delete',
+ label: messages.gettext('Delete'),
onClick: showRemoveConfirmation,
},
);
diff --git a/gui/src/renderer/components/EditApiAccessMethod.tsx b/gui/src/renderer/components/EditApiAccessMethod.tsx
index 59a5f2ff37..2c53842543 100644
--- a/gui/src/renderer/components/EditApiAccessMethod.tsx
+++ b/gui/src/renderer/components/EditApiAccessMethod.tsx
@@ -198,9 +198,13 @@ function getTestingDialogSubTitle(type: ModalAlertType, newMethod: boolean, name
),
{ name },
)
- : messages.pgettext(
- 'api-access-methods-view',
- 'Clicking “Save” changes the in use method.',
+ : sprintf(
+ // TRANSLATORS: %(save)s - Will be replaced with the translation for the word "Save".
+ messages.pgettext(
+ 'api-access-methods-view',
+ 'Clicking “%(save)s” changes the in use method.',
+ ),
+ { save: messages.gettext('Save') },
);
default:
return undefined;