diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt
index 32bd5579577a..67b9c0abadf7 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/ConnectScreen.kt
@@ -630,16 +630,13 @@ private fun ConnectionCardHeader(
}
}
+@Composable
private fun GeoIpLocation?.asString(): String {
- return if (this == null) ""
- else {
- buildString {
- append(country)
- if (!city.isNullOrBlank()) {
- append(", ")
- append(city)
- }
- }
+ val city = this?.city
+ return when {
+ this == null -> ""
+ city.isNullOrBlank() -> country
+ else -> stringResource(R.string.country_comma_city, country, city)
}
}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/RelayListContent.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/RelayListContent.kt
index ddb9ac99b2b7..e7f5465781df 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/RelayListContent.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/location/RelayListContent.kt
@@ -154,9 +154,14 @@ private fun RecentListItem(
onUpdateBottomSheetState: (LocationBottomSheetState) -> Unit,
) {
val subtitle =
- when (listItem.item) {
- is RelayItem.Location.Relay -> "${listItem.cityName}, ${listItem.countryName}"
- is RelayItem.Location.City -> listItem.countryName
+ when (val relayItem = listItem.item) {
+ is RelayItem.Location.Relay ->
+ stringResource(
+ R.string.country_comma_city,
+ relayItem.countryName,
+ relayItem.cityName,
+ )
+ is RelayItem.Location.City -> relayItem.countryName
is RelayItem.Location.Country,
is RelayItem.CustomList -> null
}
diff --git a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/RelayListItem.kt b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/RelayListItem.kt
index f7781187cd87..b1d4c643d6f4 100644
--- a/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/RelayListItem.kt
+++ b/android/lib/ui/component/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/component/relaylist/RelayListItem.kt
@@ -112,21 +112,6 @@ sealed interface RelayListItem {
override val depth: Int = 0
override val contentType = RelayListItemContentType.RECENT_LIST_ITEM
override val canExpand: Boolean = false
-
- val countryName: String? =
- when (item) {
- is RelayItem.CustomList -> null
- is RelayItem.Location.City -> item.countryName
- is RelayItem.Location.Country -> item.name
- is RelayItem.Location.Relay -> item.countryName
- }
- val cityName: String? =
- when (item) {
- is RelayItem.CustomList -> null
- is RelayItem.Location.City -> item.name
- is RelayItem.Location.Country -> null
- is RelayItem.Location.Relay -> item.cityName
- }
}
data object RecentsListFooter : RelayListItem {
diff --git a/android/lib/ui/resource/src/main/res/values-ar/strings.xml b/android/lib/ui/resource/src/main/res/values-ar/strings.xml
index 084469aeac33..ab62df9d4ab7 100644
--- a/android/lib/ui/resource/src/main/res/values-ar/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-ar/strings.xml
@@ -105,6 +105,7 @@
تم نسخ رقم حساب Mullvad إلى الحافظة
نسخ
نسخ رقم الحساب
+ %1$s، %2$s
إنشاء
فشل إنشاء الحساب
تم إنشاء \"%1$s\"
diff --git a/android/lib/ui/resource/src/main/res/values-da/strings.xml b/android/lib/ui/resource/src/main/res/values-da/strings.xml
index 121df62ce5d1..c301d45c96d7 100644
--- a/android/lib/ui/resource/src/main/res/values-da/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-da/strings.xml
@@ -105,6 +105,7 @@
Kopierede Mullvad-kontonummer til udklipsholder
Kopiér
Kopiér kontonummer
+ %1$s, %2$s
Opret
Oprettelse af konto mislykkedes
\"%1$s\" blev oprettet
diff --git a/android/lib/ui/resource/src/main/res/values-de/strings.xml b/android/lib/ui/resource/src/main/res/values-de/strings.xml
index 908041a77e38..71ccd8a1a731 100644
--- a/android/lib/ui/resource/src/main/res/values-de/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-de/strings.xml
@@ -105,6 +105,7 @@
Mullvad-Kontonummer wurde in die Zwischenablage kopiert
Kopieren
Kontonummer kopieren
+ %1$s, %2$s
Erstellen
Kontoerstellung fehlgeschlagen
„%1$s“ wurde erstellt
diff --git a/android/lib/ui/resource/src/main/res/values-es/strings.xml b/android/lib/ui/resource/src/main/res/values-es/strings.xml
index 97b203911638..cf07e81f558d 100644
--- a/android/lib/ui/resource/src/main/res/values-es/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-es/strings.xml
@@ -105,6 +105,7 @@
El número de cuenta de Mullvad se copió en el Portapapeles
Copiar
Copiar número de cuenta
+ %1$s, %2$s
Crear
Error al crear la cuenta
Se ha creado «%1$s»
diff --git a/android/lib/ui/resource/src/main/res/values-fa/strings.xml b/android/lib/ui/resource/src/main/res/values-fa/strings.xml
index 70d2712a986b..8ac91a22e3ee 100644
--- a/android/lib/ui/resource/src/main/res/values-fa/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-fa/strings.xml
@@ -105,6 +105,7 @@
شمارهٔ حساب Mullvad در کلیپبورد کپی شد
کپی
کپی کردن شمارهٔ حساب
+ %1$s, %2$s
ایجاد کردن
ایجاد حساب کاربری ناموفق بود
%1$s ایجاد شد
diff --git a/android/lib/ui/resource/src/main/res/values-fi/strings.xml b/android/lib/ui/resource/src/main/res/values-fi/strings.xml
index 80e73c291d13..47c52e82cc0f 100644
--- a/android/lib/ui/resource/src/main/res/values-fi/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-fi/strings.xml
@@ -105,6 +105,7 @@
Mullvad-tilin numero kopioitu leikepöydälle
Kopioi
Kopioi tilin numero
+ %1$s, %2$s
Luo
Tilin luominen epäonnistui
\"%1$s\" luotiin
diff --git a/android/lib/ui/resource/src/main/res/values-fr/strings.xml b/android/lib/ui/resource/src/main/res/values-fr/strings.xml
index 36d2c811db78..680d2e0ae725 100644
--- a/android/lib/ui/resource/src/main/res/values-fr/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-fr/strings.xml
@@ -105,6 +105,7 @@
Numéro de compte Mullvad copié dans le presse-papiers
Copier
Copier le numéro de compte
+ %1$s, %2$s
Créer
Échec de la création du compte
« %1$s » a été créé
diff --git a/android/lib/ui/resource/src/main/res/values-it/strings.xml b/android/lib/ui/resource/src/main/res/values-it/strings.xml
index 278ff21236db..60f42053b959 100644
--- a/android/lib/ui/resource/src/main/res/values-it/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-it/strings.xml
@@ -105,6 +105,7 @@
Numero account di Mullvad copiato negli appunti
Copia
Copia numero di account
+ %1$s, %2$s
Crea
Creazione dell\'account non riuscita
\"%1$s\" creato
diff --git a/android/lib/ui/resource/src/main/res/values-ja/strings.xml b/android/lib/ui/resource/src/main/res/values-ja/strings.xml
index 8b9cfcca69b5..b067e7928418 100644
--- a/android/lib/ui/resource/src/main/res/values-ja/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-ja/strings.xml
@@ -105,6 +105,7 @@
Mullvadアカウント番号をクリップボードにコピーしました
コピー
アカウント番号のコピー
+ %1$s、%2$s
作成
アカウントを作成できませんでした
\"%1$s\" が作成されました
diff --git a/android/lib/ui/resource/src/main/res/values-ko/strings.xml b/android/lib/ui/resource/src/main/res/values-ko/strings.xml
index eaed1ef702b8..82553c4f85ab 100644
--- a/android/lib/ui/resource/src/main/res/values-ko/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-ko/strings.xml
@@ -105,6 +105,7 @@
클립보드에 Mullvad 계정 번호 복사됨
복사
계정 번호 복사
+ %1$s, %2$s
생성
계정을 생성하지 못했습니다
\"%1$s\"이(가) 생성되었습니다
diff --git a/android/lib/ui/resource/src/main/res/values-my/strings.xml b/android/lib/ui/resource/src/main/res/values-my/strings.xml
index f106925c29ea..9d411e967675 100644
--- a/android/lib/ui/resource/src/main/res/values-my/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-my/strings.xml
@@ -105,6 +105,7 @@
Mullvad အကောင့်နံပါတ်ကို ကလစ်ဘုတ်တွင် ကူးထားပါသည်
ကူးယူရန်
အကောင့်နံပါတ်ကို ကူးရန်
+ %1$s၊ %2$s
ဖန်တီးမည်
အကောင့်ဖန်တီးခြင်း မအောင်မြင်ပါ
\"%1$s\" ကို ဖန်တီးလိုက်ပြီ
diff --git a/android/lib/ui/resource/src/main/res/values-nb/strings.xml b/android/lib/ui/resource/src/main/res/values-nb/strings.xml
index ec19947d05da..3f7ebd03bb34 100644
--- a/android/lib/ui/resource/src/main/res/values-nb/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-nb/strings.xml
@@ -105,6 +105,7 @@
Kopierte Mullvad-kontonummer til utklippstavlen
Kopier
Kopier kontonummer
+ %1$s, %2$s
Opprett
Opprettelse av konto mislyktes
«%1$s» ble opprettet
diff --git a/android/lib/ui/resource/src/main/res/values-nl/strings.xml b/android/lib/ui/resource/src/main/res/values-nl/strings.xml
index 67b06fa61408..dd60f98fea21 100644
--- a/android/lib/ui/resource/src/main/res/values-nl/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-nl/strings.xml
@@ -105,6 +105,7 @@
Mullvad-accountnummer gekopieerd naar klembord
Kopiëren
Accountnummer kopiëren
+ %1$s, %2$s
Maken
Account maken is mislukt
\"%1$s\" is gemaakt
diff --git a/android/lib/ui/resource/src/main/res/values-pl/strings.xml b/android/lib/ui/resource/src/main/res/values-pl/strings.xml
index e8a11b3af20a..ac30becd5982 100644
--- a/android/lib/ui/resource/src/main/res/values-pl/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-pl/strings.xml
@@ -105,6 +105,7 @@
Skopiowano numer konta Mullvad do schowka
Kopiuj
Kopiuj numer konta
+ %1$s, %2$s
Utwórz
Nie udało się utworzyć konta
Utworzono „%1$s”
diff --git a/android/lib/ui/resource/src/main/res/values-pt/strings.xml b/android/lib/ui/resource/src/main/res/values-pt/strings.xml
index 981e42625944..a0d3d7391943 100644
--- a/android/lib/ui/resource/src/main/res/values-pt/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-pt/strings.xml
@@ -105,6 +105,7 @@
Número de conta Mullvad copiado para a área de transferência
Copiar
Copiar número de conta
+ %1$s, %2$s
Criar
Falha ao criar conta
\"%1$s\" foi criada
diff --git a/android/lib/ui/resource/src/main/res/values-ru/strings.xml b/android/lib/ui/resource/src/main/res/values-ru/strings.xml
index 3f5c1d1141a1..c481e0ac04e2 100644
--- a/android/lib/ui/resource/src/main/res/values-ru/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-ru/strings.xml
@@ -105,6 +105,7 @@
Номер учетной записи Mullvad скопирован в буфер обмена
Копировать
Копировать номер учетной записи
+ %1$s, %2$s
Создать
Не удалось создать учетную запись
Список «%1$s» создан
diff --git a/android/lib/ui/resource/src/main/res/values-sv/strings.xml b/android/lib/ui/resource/src/main/res/values-sv/strings.xml
index 8843e651adf7..9d0f53d7b943 100644
--- a/android/lib/ui/resource/src/main/res/values-sv/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-sv/strings.xml
@@ -105,6 +105,7 @@
Kopierade Mullvad-kontonummer till urklipp
Kopiera
Kopiera kontonummer
+ %1$s, %2$s
Skapa
Det gick inte att skapa konto
\"%1$s\" har skapats
diff --git a/android/lib/ui/resource/src/main/res/values-th/strings.xml b/android/lib/ui/resource/src/main/res/values-th/strings.xml
index 7073ba392def..b43892b38a2d 100644
--- a/android/lib/ui/resource/src/main/res/values-th/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-th/strings.xml
@@ -105,6 +105,7 @@
คัดลอกหมายเลขบัญชี Mullvad ไปยังคลิปบอร์ดแล้ว
คัดลอก
คัดลอกหมายเลขบัญชี
+ %1$s, %2$s
สร้าง
การสร้างบัญชีล้มเหลว
\"%1$s\" ถูกสร้างแล้ว
diff --git a/android/lib/ui/resource/src/main/res/values-tr/strings.xml b/android/lib/ui/resource/src/main/res/values-tr/strings.xml
index 51566b343157..9c69bea8e98e 100644
--- a/android/lib/ui/resource/src/main/res/values-tr/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-tr/strings.xml
@@ -105,6 +105,7 @@
Mullvad hesap numarası panoya kopyalandı
Kopyala
Hesap numarasını kopyala
+ %1$s, %2$s
Oluştur
Hesap oluşturulamadı
\"%1$s\" oluşturuldu
diff --git a/android/lib/ui/resource/src/main/res/values-zh-rCN/strings.xml b/android/lib/ui/resource/src/main/res/values-zh-rCN/strings.xml
index 50f5701d6734..cfa9be97888a 100644
--- a/android/lib/ui/resource/src/main/res/values-zh-rCN/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-zh-rCN/strings.xml
@@ -105,6 +105,7 @@
已将 Mullvad 帐号复制到剪贴板
复制
复制帐号
+ %2$s%1$s
创建
创建帐户失败
“%1$s”已创建
diff --git a/android/lib/ui/resource/src/main/res/values-zh-rTW/strings.xml b/android/lib/ui/resource/src/main/res/values-zh-rTW/strings.xml
index 2e659cf06d90..5b7bac13c64f 100644
--- a/android/lib/ui/resource/src/main/res/values-zh-rTW/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values-zh-rTW/strings.xml
@@ -105,6 +105,7 @@
已將 Mullvad 帳號複製到剪貼簿
複製
複製帳號
+ %2$s%1$s
建立
建立帳戶失敗
已建立「%1$s」
diff --git a/android/lib/ui/resource/src/main/res/values/strings.xml b/android/lib/ui/resource/src/main/res/values/strings.xml
index 558467810a84..acc53c8b41d5 100644
--- a/android/lib/ui/resource/src/main/res/values/strings.xml
+++ b/android/lib/ui/resource/src/main/res/values/strings.xml
@@ -372,6 +372,8 @@
Multihop
Multihop routes your traffic into one WireGuard server and out another, making it harder to trace. This results in increased latency but increases anonymity online.
%1$s via %2$s
+ %1$s, %2$s
+ %1$s, %2$s, %3$s
Entry
Exit
Clear input
diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/tunnelstate/TunnelStateNotificationAction.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/tunnelstate/TunnelStateNotificationAction.kt
index 83d3604575d5..b799de0943cc 100644
--- a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/tunnelstate/TunnelStateNotificationAction.kt
+++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/tunnelstate/TunnelStateNotificationAction.kt
@@ -19,7 +19,7 @@ internal fun Notification.Tunnel.toNotification(context: Context) =
NotificationCompat.Builder(context, channelId.value)
.setContentIntent(contentIntent(context))
.setContentTitle(state.contentTitleResourceId(context))
- .setContentText(state.contentText())
+ .setContentText(state.contentText(context))
.setSmallIcon(R.drawable.small_logo_white)
.apply { actions.forEach { addAction(it.toCompatAction(context)) } }
.setOngoing(ongoing)
@@ -62,17 +62,20 @@ private fun NotificationTunnelState.contentTitleResourceId(context: Context): St
context.getString(R.string.legacy_always_on_vpn_error_notification_title)
}
-private fun NotificationTunnelState.contentText(): CharSequence? {
+private fun NotificationTunnelState.contentText(context: Context): CharSequence? {
val location =
when (this) {
is NotificationTunnelState.Connected -> location
is NotificationTunnelState.Connecting -> location
else -> null
}
- return if (location != null) {
- "${location.country}, ${location.city}, ${location.hostname}"
- } else {
- null
+ return location?.let {
+ context.getString(
+ R.string.country_comma_city_comma_relay,
+ location.country,
+ location.city,
+ location.hostname,
+ )
}
}
diff --git a/desktop/packages/mullvad-vpn/locales/messages.pot b/desktop/packages/mullvad-vpn/locales/messages.pot
index 3bcc945ea587..d87a482bd2f0 100644
--- a/desktop/packages/mullvad-vpn/locales/messages.pot
+++ b/desktop/packages/mullvad-vpn/locales/messages.pot
@@ -2727,6 +2727,9 @@ msgstr ""
msgid "%1$s was removed from \"%2$s\""
msgstr ""
+msgid "%1$s, %2$s, %3$s"
+msgstr ""
+
msgid "%s (Entry)"
msgstr ""