Skip to content

Commit 58a811f

Browse files
committed
Merge branch 'auto-connect-lockdown-mode-title-is-not-translated-droid-1257'
2 parents ed5b060 + b6f7850 commit 58a811f

File tree

6 files changed

+20
-6
lines changed

6 files changed

+20
-6
lines changed

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt

+10-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
2121
import androidx.compose.material3.Icon
2222
import androidx.compose.material3.IconButton
2323
import androidx.compose.material3.LargeTopAppBar
24+
import androidx.compose.material3.LocalTextStyle
2425
import androidx.compose.material3.MaterialTheme
2526
import androidx.compose.material3.MediumTopAppBar
2627
import androidx.compose.material3.Surface
@@ -38,6 +39,7 @@ import androidx.compose.ui.platform.testTag
3839
import androidx.compose.ui.res.painterResource
3940
import androidx.compose.ui.res.pluralStringResource
4041
import androidx.compose.ui.res.stringResource
42+
import androidx.compose.ui.text.style.LineBreak
4143
import androidx.compose.ui.text.style.TextOverflow
4244
import androidx.compose.ui.tooling.preview.Preview
4345
import androidx.compose.ui.unit.dp
@@ -276,7 +278,14 @@ fun MullvadLargeTopBar(
276278
scrollBehavior: TopAppBarScrollBehavior? = null
277279
) {
278280
LargeTopAppBar(
279-
title = { Text(text = title, maxLines = 2, overflow = TextOverflow.Ellipsis) },
281+
title = {
282+
Text(
283+
text = title,
284+
maxLines = 2,
285+
overflow = TextOverflow.Ellipsis,
286+
style = LocalTextStyle.current.copy(lineBreak = LineBreak.Heading)
287+
)
288+
},
280289
navigationIcon = navigationIcon,
281290
scrollBehavior = scrollBehavior,
282291
colors =

android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/AutoConnectAndLockdownModeScreen.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fun AutoConnectAndLockdownMode(navigator: DestinationsNavigator) {
8484
fun AutoConnectAndLockdownModeScreen(onBackClick: () -> Unit = {}) {
8585
val context = LocalContext.current
8686
ScaffoldWithLargeTopBarAndButton(
87-
appBarTitle = stringResource(id = R.string.auto_connect_and_lockdown_mode_two_lines),
87+
appBarTitle = stringResource(id = R.string.auto_connect_and_lockdown_mode),
8888
navigationIcon = { NavigateBackIconButton(onNavigateBack = onBackClick) },
8989
buttonTitle = stringResource(id = R.string.go_to_vpn_settings),
9090
onButtonClick = { context.openVpnSettings() },

android/lib/resource/src/main/res/values/strings.xml

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
<string name="allow_lan_footer">Allows access to other devices on the same network for sharing, printing etc.</string>
7575
<string name="auto_connect">Auto-connect</string>
7676
<string name="auto_connect_and_lockdown_mode">Auto-connect &amp; Lockdown mode</string>
77-
<string name="auto_connect_and_lockdown_mode_two_lines">Auto-connect &amp; \nLockdown mode</string>
7877
<string name="auto_connect_and_lockdown_mode_footer">Makes sure the device is always on the VPN tunnel.</string>
7978
<string name="go_to_vpn_settings">Go to VPN settings</string>
8079
<string name="vpn_settings_not_found">There is no VPN settings on your device</string>

android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt

+6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ import net.mullvad.mullvadvpn.lib.theme.typeface.TypeScale
4848
private val MullvadTypography =
4949
Typography(
5050
headlineLarge = TextStyle(fontSize = TypeScale.TextHuge, fontWeight = FontWeight.Bold),
51+
headlineMedium =
52+
TextStyle(
53+
fontWeight = FontWeight.Bold,
54+
fontSize = TypeScale.TextHeadline,
55+
lineHeight = TypeScale.HeadlineMediumLineHeight,
56+
),
5157
headlineSmall = TextStyle(fontSize = TypeScale.TextBig, fontWeight = FontWeight.Bold),
5258
bodySmall = TextStyle(fontSize = TypeScale.TextSmall),
5359
titleSmall = TextStyle(fontSize = TypeScale.TextMedium, fontWeight = FontWeight.SemiBold),

android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/TypeScale.kt

+3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ import androidx.compose.ui.unit.sp
1212
*/
1313
internal object TypeScale {
1414
val TextHuge = 30.sp
15+
val TextHeadline = 28.sp
1516
val TextBig = 24.sp
1617
val TextMediumPlus = 18.sp
1718
val TextMedium = 16.sp
1819
val TextSmall = 13.sp
1920
val TitleLarge = 22.sp
21+
22+
val HeadlineMediumLineHeight = 36.0.sp
2023
}

gui/locales/messages.pot

-3
Original file line numberDiff line numberDiff line change
@@ -2192,9 +2192,6 @@ msgstr ""
21922192
msgid "Auto-connect & Lockdown mode"
21932193
msgstr ""
21942194

2195-
msgid "Auto-connect & \\nLockdown mode"
2196-
msgstr ""
2197-
21982195
msgid "Auto-connect (legacy)"
21992196
msgstr ""
22002197

0 commit comments

Comments
 (0)