diff options
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, |
