summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/containers
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2019-04-09 15:42:36 +0200
committerAndrej Mihajlov <and@mullvad.net>2019-04-09 15:42:36 +0200
commitb427aa1adca8fcfeca7f777499f0b4e1c84e3c6e (patch)
treeb096c6eb2a2bf3885436910894249452ccb1d813 /gui/src/renderer/containers
parent88031a653167df93396433fcf53a1422c2f995fd (diff)
parent6405e1eebbe12313bed10f3f8bd1a0f051e83d24 (diff)
downloadmullvadvpn-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.tsx14
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,