diff options
| -rw-r--r-- | gui/locales/messages.pot | 6 | ||||
| -rw-r--r-- | gui/src/renderer/components/DaitaSettings.tsx | 20 |
2 files changed, 17 insertions, 9 deletions
diff --git a/gui/locales/messages.pot b/gui/locales/messages.pot index 174688cf27..31110d0b33 100644 --- a/gui/locales/messages.pot +++ b/gui/locales/messages.pot @@ -152,7 +152,7 @@ msgstr "" msgid "Enable" msgstr "" -msgid "Enable \"Direct only\"" +msgid "Enable \"%(directOnly)s\"" msgstr "" msgid "Enable anyway" @@ -2066,11 +2066,11 @@ msgid "%(wireguard)s settings" msgstr "" msgctxt "wireguard-settings-view" -msgid "Attention: Be cautious if you have a limited data plan as this feature will increase your network traffic. This feature can only be used with WireGuard." +msgid "Attention: Be cautious if you have a limited data plan as this feature will increase your network traffic. This feature can only be used with %(wireguard)s." msgstr "" msgctxt "wireguard-settings-view" -msgid "By enabling “Direct only” you will have to manually select a server that is %(daita)s-enabled. This can cause you to end up in a blocked state until you have selected a compatible server in the “Select location” view." +msgid "By enabling “%(directOnly)s” you will have to manually select a server that is %(daita)s-enabled. This can cause you to end up in a blocked state until you have selected a compatible server in the “Select location” view." msgstr "" msgctxt "wireguard-settings-view" diff --git a/gui/src/renderer/components/DaitaSettings.tsx b/gui/src/renderer/components/DaitaSettings.tsx index 2d09a3996e..4ddfe6a853 100644 --- a/gui/src/renderer/components/DaitaSettings.tsx +++ b/gui/src/renderer/components/DaitaSettings.tsx @@ -104,9 +104,12 @@ export default function DaitaSettings() { )} </StyledHeaderSubTitle> <StyledHeaderSubTitle> - {messages.pgettext( - 'wireguard-settings-view', - 'Attention: Be cautious if you have a limited data plan as this feature will increase your network traffic. This feature can only be used with WireGuard.', + {sprintf( + messages.pgettext( + 'wireguard-settings-view', + 'Attention: Be cautious if you have a limited data plan as this feature will increase your network traffic. This feature can only be used with %(wireguard)s.', + ), + { wireguard: strings.wireguard }, )} </StyledHeaderSubTitle> </React.Fragment>, @@ -155,6 +158,8 @@ function DaitaToggle() { hideConfirmationDialog(); }, []); + const directOnlyString = messages.gettext('Direct only'); + return ( <> <AriaInputGroup> @@ -177,7 +182,7 @@ function DaitaToggle() { <AriaInputGroup> <Cell.Container disabled={!daita || unavailable}> <AriaLabel> - <Cell.InputLabel>{messages.gettext('Direct only')}</Cell.InputLabel> + <Cell.InputLabel>{directOnlyString}</Cell.InputLabel> </AriaLabel> <InfoButton> <DirectOnlyModalMessage /> @@ -208,7 +213,7 @@ function DaitaToggle() { key="confirm" onClick={confirmEnableDirectOnly} color={SmallButtonColor.blue}> - {messages.gettext('Enable "Direct only"')} + {sprintf(messages.gettext('Enable "%(directOnly)s"'), { directOnly: directOnlyString })} </SmallButton>, <SmallButton key="cancel" onClick={hideConfirmationDialog} color={SmallButtonColor.blue}> {messages.pgettext('wireguard-settings-view', 'Cancel')} @@ -231,15 +236,18 @@ function DaitaToggle() { } function DirectOnlyModalMessage() { + const directOnlyString = messages.gettext('Direct only'); + return ( <ModalMessage> {sprintf( messages.pgettext( 'wireguard-settings-view', - 'By enabling “Direct only” you will have to manually select a server that is %(daita)s-enabled. This can cause you to end up in a blocked state until you have selected a compatible server in the “Select location” view.', + 'By enabling “%(directOnly)s” you will have to manually select a server that is %(daita)s-enabled. This can cause you to end up in a blocked state until you have selected a compatible server in the “Select location” view.', ), { daita: strings.daita, + directOnly: directOnlyString, }, )} </ModalMessage> |
