diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-04-09 15:42:36 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-04-09 15:42:36 +0200 |
| commit | b427aa1adca8fcfeca7f777499f0b4e1c84e3c6e (patch) | |
| tree | b096c6eb2a2bf3885436910894249452ccb1d813 /gui/src/renderer/containers | |
| parent | 88031a653167df93396433fcf53a1422c2f995fd (diff) | |
| parent | 6405e1eebbe12313bed10f3f8bd1a0f051e83d24 (diff) | |
| download | mullvadvpn-b427aa1adca8fcfeca7f777499f0b4e1c84e3c6e.tar.xz mullvadvpn-b427aa1adca8fcfeca7f777499f0b4e1c84e3c6e.zip | |
Merge branch 'multi-catalogue'
Diffstat (limited to 'gui/src/renderer/containers')
| -rw-r--r-- | gui/src/renderer/containers/ConnectPage.tsx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gui/src/renderer/containers/ConnectPage.tsx b/gui/src/renderer/containers/ConnectPage.tsx index dbbf898457..2e22ca9fab 100644 --- a/gui/src/renderer/containers/ConnectPage.tsx +++ b/gui/src/renderer/containers/ConnectPage.tsx @@ -4,7 +4,11 @@ import log from 'electron-log'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { sprintf } from 'sprintf-js'; -import { pgettext } from '../../shared/gettext'; +import { + countries, + messages, + relayLocations as relayLocationsLocalization, +} from '../../shared/gettext'; import Connect from '../components/Connect'; import AccountExpiry from '../lib/account-expiry'; import userInterfaceActions from '../redux/userinterface/actions'; @@ -26,8 +30,7 @@ function getRelayName( } else if ('country' in location) { const country = relayLocations.find(({ code }) => code === location.country); if (country) { - // TODO: translate - return country.name; + return countries.gettext(country.name); } } else if ('city' in location) { const [countryCode, cityCode] = location.city; @@ -35,8 +38,7 @@ function getRelayName( if (country) { const city = country.cities.find(({ code }) => code === cityCode); if (city) { - // TODO: translate - return city.name; + return relayLocationsLocalization.gettext(city.name); } } } else if ('hostname' in location) { @@ -51,7 +53,7 @@ function getRelayName( // TRANSLATORS: Available placeholders: // TRANSLATORS: %(city)s - a city name // TRANSLATORS: %(hostname)s - a hostname - pgettext('connect-container', '%(city)s (%(hostname)s)'), + messages.pgettext('connect-container', '%(city)s (%(hostname)s)'), { city: city.name, hostname, |
