diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt index e96fc662216d..1b82861e76c2 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt @@ -92,7 +92,9 @@ import net.mullvad.mullvadvpn.compose.transitions.SelectLocationTransition import net.mullvad.mullvadvpn.compose.util.CollectSideEffectWithLifecycle import net.mullvad.mullvadvpn.compose.util.RunOnKeyChange import net.mullvad.mullvadvpn.compose.util.showSnackbarImmediately +import net.mullvad.mullvadvpn.lib.model.CustomList import net.mullvad.mullvadvpn.lib.model.CustomListId +import net.mullvad.mullvadvpn.lib.model.CustomListName import net.mullvad.mullvadvpn.lib.model.RelayItem import net.mullvad.mullvadvpn.lib.model.RelayItemId import net.mullvad.mullvadvpn.lib.theme.AppTheme @@ -365,6 +367,7 @@ fun SelectLocationScreen( bottomSheetState = ShowCustomListsEntryBottomSheet( listItem.parentId, + listItem.parentName, listItem.item ) } @@ -589,7 +592,8 @@ private fun BottomSheets( CustomListEntryBottomSheet( sheetState = sheetState, onBackgroundColor = onBackgroundColor, - customListId = bottomSheetState.parentId, + customListId = bottomSheetState.customListId, + customListName = bottomSheetState.customListName, item = bottomSheetState.item, onRemoveLocationFromList = onRemoveLocationFromList, closeBottomSheet = onCloseBottomSheet @@ -784,6 +788,7 @@ private fun CustomListEntryBottomSheet( onBackgroundColor: Color, sheetState: SheetState, customListId: CustomListId, + customListName: CustomListName, item: RelayItem.Location, onRemoveLocationFromList: (location: RelayItem.Location, customListId: CustomListId) -> Unit, closeBottomSheet: (animate: Boolean) -> Unit @@ -794,7 +799,8 @@ private fun CustomListEntryBottomSheet( modifier = Modifier.testTag(SELECT_LOCATION_LOCATION_BOTTOM_SHEET_TEST_TAG) ) { HeaderCell( - text = stringResource(id = R.string.remove_location_from_list, item.name), + text = + stringResource(id = R.string.remove_location_from_list, item.name, customListName), background = Color.Unspecified ) HorizontalDivider(color = onBackgroundColor) @@ -902,7 +908,8 @@ sealed interface BottomSheetState { data class ShowCustomListsBottomSheet(val editListEnabled: Boolean) : BottomSheetState data class ShowCustomListsEntryBottomSheet( - val parentId: CustomListId, + val customListId: CustomListId, + val customListName: CustomListName, val item: RelayItem.Location ) : BottomSheetState diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/SelectLocationUiState.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/SelectLocationUiState.kt index 5d6b683116e0..88d557c5327c 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/SelectLocationUiState.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/SelectLocationUiState.kt @@ -1,6 +1,7 @@ package net.mullvad.mullvadvpn.compose.state import net.mullvad.mullvadvpn.lib.model.CustomListId +import net.mullvad.mullvadvpn.lib.model.CustomListName import net.mullvad.mullvadvpn.lib.model.RelayItem typealias ModelOwnership = net.mullvad.mullvadvpn.lib.model.Ownership @@ -60,6 +61,7 @@ sealed interface RelayListItem { data class CustomListEntryItem( val parentId: CustomListId, + val parentName: CustomListName, val item: RelayItem.Location, override val expanded: Boolean, override val depth: Int = 0 diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/SelectLocationViewModel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/SelectLocationViewModel.kt index a219bb976b77..1cd17b9ba170 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/SelectLocationViewModel.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/SelectLocationViewModel.kt @@ -214,7 +214,7 @@ class SelectLocationViewModel( if (expanded) { addAll( customList.locations.flatMap { - createCustomListEntry(parent = customList.id, item = it, 1, isExpanded) + createCustomListEntry(parent = customList, item = it, 1, isExpanded) } ) } @@ -240,15 +240,16 @@ class SelectLocationViewModel( } private fun createCustomListEntry( - parent: CustomListId, + parent: RelayItem.CustomList, item: RelayItem.Location, depth: Int = 1, isExpanded: (String) -> Boolean, ): List = buildList { - val expanded = isExpanded(item.id.expandKey(parent)) + val expanded = isExpanded(item.id.expandKey(parent.id)) add( RelayListItem.CustomListEntryItem( - parentId = parent, + parentId = parent.id, + parentName = parent.customList.name, item = item, expanded = expanded, depth diff --git a/android/lib/resource/src/main/res/values-da/strings.xml b/android/lib/resource/src/main/res/values-da/strings.xml index fce34db4d827..e0b659e6bdbe 100644 --- a/android/lib/resource/src/main/res/values-da/strings.xml +++ b/android/lib/resource/src/main/res/values-da/strings.xml @@ -254,7 +254,6 @@ Indløs Indløs kupon Fjern - Fjern %1$s fra listen Lejet Kun lejet Rapporter et problem diff --git a/android/lib/resource/src/main/res/values-de/strings.xml b/android/lib/resource/src/main/res/values-de/strings.xml index 66b4d5f2fc1f..629767ff5196 100644 --- a/android/lib/resource/src/main/res/values-de/strings.xml +++ b/android/lib/resource/src/main/res/values-de/strings.xml @@ -254,7 +254,6 @@ Einlösen Gutschein einlösen Entfernen - %1$s aus Liste entfernen Gemietet Nur gemietet Problem melden diff --git a/android/lib/resource/src/main/res/values-es/strings.xml b/android/lib/resource/src/main/res/values-es/strings.xml index 9699706e89fd..7393802fdcb8 100644 --- a/android/lib/resource/src/main/res/values-es/strings.xml +++ b/android/lib/resource/src/main/res/values-es/strings.xml @@ -254,7 +254,6 @@ Canjear Canjear cupón Quitar - Quitar %1$s de la lista Alquilados Solo alquilados Informar de un problema diff --git a/android/lib/resource/src/main/res/values-fi/strings.xml b/android/lib/resource/src/main/res/values-fi/strings.xml index 82baf522c94a..180a7b30f1d8 100644 --- a/android/lib/resource/src/main/res/values-fi/strings.xml +++ b/android/lib/resource/src/main/res/values-fi/strings.xml @@ -254,7 +254,6 @@ Lunasta Lunasta kuponki Poista - Poista %1$s luettelosta Vuokrattu Vain vuokratut Raportoi ongelma diff --git a/android/lib/resource/src/main/res/values-fr/strings.xml b/android/lib/resource/src/main/res/values-fr/strings.xml index 2f4006cecb45..7b3f5d310d63 100644 --- a/android/lib/resource/src/main/res/values-fr/strings.xml +++ b/android/lib/resource/src/main/res/values-fr/strings.xml @@ -254,7 +254,6 @@ Échanger Échanger un bon Supprimer - Supprimer %1$s de la liste Loué Loués uniquement Signaler un problème diff --git a/android/lib/resource/src/main/res/values-it/strings.xml b/android/lib/resource/src/main/res/values-it/strings.xml index 7e2d43c6793f..de9cd8624010 100644 --- a/android/lib/resource/src/main/res/values-it/strings.xml +++ b/android/lib/resource/src/main/res/values-it/strings.xml @@ -254,7 +254,6 @@ Riscatta Riscatta voucher Rimuovi - Rimuovi %1$s dall\'elenco Noleggiato Solo noleggiati Segnala un problema diff --git a/android/lib/resource/src/main/res/values-ja/strings.xml b/android/lib/resource/src/main/res/values-ja/strings.xml index 2dccaeb446f1..073314044fe0 100644 --- a/android/lib/resource/src/main/res/values-ja/strings.xml +++ b/android/lib/resource/src/main/res/values-ja/strings.xml @@ -254,7 +254,6 @@ 使用する バウチャーを使用する 削除 - %1$s をリストから削除する レンタルサーバー レンタルサーバーのみ 問題を報告する diff --git a/android/lib/resource/src/main/res/values-ko/strings.xml b/android/lib/resource/src/main/res/values-ko/strings.xml index 56d97600223d..03f3aa8827d1 100644 --- a/android/lib/resource/src/main/res/values-ko/strings.xml +++ b/android/lib/resource/src/main/res/values-ko/strings.xml @@ -254,7 +254,6 @@ 사용 바우처 사용 제거 - 목록에서 %1$s 제거 대여 대여만 문제 신고 diff --git a/android/lib/resource/src/main/res/values-my/strings.xml b/android/lib/resource/src/main/res/values-my/strings.xml index 43333a80288d..f4cd5ccb373c 100644 --- a/android/lib/resource/src/main/res/values-my/strings.xml +++ b/android/lib/resource/src/main/res/values-my/strings.xml @@ -254,7 +254,6 @@ လဲယူရန် ဘောက်ချာဖြင့် လဲယူရန် ဖယ်ရှားရန် - %1$s ကို စာရင်းမှ ဖယ်ရှားပါ အငှား အငှားသီးသန့် ပြဿနာ ရီပို့တ်လုပ်ရန် diff --git a/android/lib/resource/src/main/res/values-nb/strings.xml b/android/lib/resource/src/main/res/values-nb/strings.xml index af8fd509ff02..4e589e3f5669 100644 --- a/android/lib/resource/src/main/res/values-nb/strings.xml +++ b/android/lib/resource/src/main/res/values-nb/strings.xml @@ -254,7 +254,6 @@ Løs inn Løs inn kupong Fjern - Fjern %1$s fra listen Leid Kun leid Rapporter et problem diff --git a/android/lib/resource/src/main/res/values-nl/strings.xml b/android/lib/resource/src/main/res/values-nl/strings.xml index 8ea1498751de..85a19a18e7f8 100644 --- a/android/lib/resource/src/main/res/values-nl/strings.xml +++ b/android/lib/resource/src/main/res/values-nl/strings.xml @@ -254,7 +254,6 @@ Inwisselen Voucher inwisselen Verwijderen - %1$s verwijderen uit lijst Gehuurd Alleen gehuurde Een probleem rapporteren diff --git a/android/lib/resource/src/main/res/values-pl/strings.xml b/android/lib/resource/src/main/res/values-pl/strings.xml index 2065ca4fbe8e..bb0aeec233ad 100644 --- a/android/lib/resource/src/main/res/values-pl/strings.xml +++ b/android/lib/resource/src/main/res/values-pl/strings.xml @@ -254,7 +254,6 @@ Zrealizuj Zrealizuj kupon Usuń - Usuń lokalizację %1$s z listy Wynajmowane Wyłącznie wynajmowane Zgłoś problem diff --git a/android/lib/resource/src/main/res/values-pt/strings.xml b/android/lib/resource/src/main/res/values-pt/strings.xml index a56dd91a24c8..9cb78e05c351 100644 --- a/android/lib/resource/src/main/res/values-pt/strings.xml +++ b/android/lib/resource/src/main/res/values-pt/strings.xml @@ -254,7 +254,6 @@ Reclamar Reclamar voucher Remover - Remover %1$s da lista Alugado Apenas alugado Reportar um problema diff --git a/android/lib/resource/src/main/res/values-ru/strings.xml b/android/lib/resource/src/main/res/values-ru/strings.xml index 56d6882dec61..53b61a0259c3 100644 --- a/android/lib/resource/src/main/res/values-ru/strings.xml +++ b/android/lib/resource/src/main/res/values-ru/strings.xml @@ -254,7 +254,6 @@ Погасить Погасить ваучер Удалить - Удалить местоположение %1$s из списка Арендованные Только арендованные Сообщение о проблеме diff --git a/android/lib/resource/src/main/res/values-sv/strings.xml b/android/lib/resource/src/main/res/values-sv/strings.xml index 75aaa1a44c1a..cbc73402cdf4 100644 --- a/android/lib/resource/src/main/res/values-sv/strings.xml +++ b/android/lib/resource/src/main/res/values-sv/strings.xml @@ -254,7 +254,6 @@ Lös in Lös in kupong Ta bort - Ta bort %1$s från listan Hyrd Endast hyrd Rapportera ett problem diff --git a/android/lib/resource/src/main/res/values-th/strings.xml b/android/lib/resource/src/main/res/values-th/strings.xml index 08ae5c334c90..4c132297f89d 100644 --- a/android/lib/resource/src/main/res/values-th/strings.xml +++ b/android/lib/resource/src/main/res/values-th/strings.xml @@ -254,7 +254,6 @@ แลกรับ แลกบัตรกำนัล ลบ - ลบ %1$s ออกจากรายการ เช่า เช่าเท่านั้น รายงานปัญหา diff --git a/android/lib/resource/src/main/res/values-tr/strings.xml b/android/lib/resource/src/main/res/values-tr/strings.xml index 66d83e9feca3..a4ba9b5203ef 100644 --- a/android/lib/resource/src/main/res/values-tr/strings.xml +++ b/android/lib/resource/src/main/res/values-tr/strings.xml @@ -254,7 +254,6 @@ Kullan Kuponu kullan Kaldır - %1$s konumunu listeden kaldır Kiralananlar Sadece kiralananlar Bir sorun bildir diff --git a/android/lib/resource/src/main/res/values-zh-rCN/strings.xml b/android/lib/resource/src/main/res/values-zh-rCN/strings.xml index de62b76cb3c6..08c607b501c0 100644 --- a/android/lib/resource/src/main/res/values-zh-rCN/strings.xml +++ b/android/lib/resource/src/main/res/values-zh-rCN/strings.xml @@ -254,7 +254,6 @@ 兑换 兑换优惠券 移除 - 从列表中移除%1$s 租用 仅租用 报告问题 diff --git a/android/lib/resource/src/main/res/values-zh-rTW/strings.xml b/android/lib/resource/src/main/res/values-zh-rTW/strings.xml index ce923a148dd0..f001562989ed 100644 --- a/android/lib/resource/src/main/res/values-zh-rTW/strings.xml +++ b/android/lib/resource/src/main/res/values-zh-rTW/strings.xml @@ -254,7 +254,6 @@ 兌換 兌換憑證 移除 - 從清單中移除 %1$s 租用 僅租用 回報問題 diff --git a/android/lib/resource/src/main/res/values/strings.xml b/android/lib/resource/src/main/res/values/strings.xml index 531a9b046b94..c5b884b745a7 100644 --- a/android/lib/resource/src/main/res/values/strings.xml +++ b/android/lib/resource/src/main/res/values/strings.xml @@ -310,7 +310,7 @@ Discard changes? Discard Add %s to list - Remove %s from list + Remove %s from %s %s was added to \"%s\" %s (added) Edit name diff --git a/gui/locales/messages.pot b/gui/locales/messages.pot index 0b2154711ffb..85d289b38d4b 100644 --- a/gui/locales/messages.pot +++ b/gui/locales/messages.pot @@ -2405,7 +2405,7 @@ msgstr "" msgid "Remove" msgstr "" -msgid "Remove %s from list" +msgid "Remove %s from %s" msgstr "" msgid "Remove custom port"