From 2b7b2e1358bed038ca223de4fd9760e2cfadbda6 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 18 Mar 2025 11:43:13 +0100 Subject: [PATCH] i18n --- .../android/features/viewfolder/impl/file/FileContent.kt | 8 +++++--- libraries/ui-strings/src/main/res/values/localazy.xml | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/FileContent.kt b/features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/FileContent.kt index 1340fd3fcf..612a69ed83 100644 --- a/features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/FileContent.kt +++ b/features/viewfolder/impl/src/main/kotlin/io/element/android/features/viewfolder/impl/file/FileContent.kt @@ -23,11 +23,13 @@ import androidx.compose.ui.draw.drawWithContent import androidx.compose.ui.geometry.Offset import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.androidutils.system.copyToClipboard import io.element.android.libraries.designsystem.theme.components.Text +import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.ImmutableList @Composable @@ -43,7 +45,7 @@ internal fun FileContent( item { Spacer(Modifier.size(80.dp)) Text( - text = "Empty file", + text = stringResource(CommonStrings.common_empty_file), textAlign = TextAlign.Center, color = MaterialTheme.colorScheme.tertiary, modifier = Modifier.fillMaxWidth() @@ -75,8 +77,8 @@ private fun LineRow( .fillMaxWidth() .clickable(onClick = { context.copyToClipboard( - line, - "Line copied to clipboard", + text = line, + toastMessage = context.getString(CommonStrings.common_line_copied_to_clipboard), ) }) ) { diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index 1b50a9e72c..b842315b7e 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -160,6 +160,7 @@ "Editing" "Editing caption" "* %1$s %2$s" + "Empty file" "Encryption" "Encryption enabled" "Enter your PIN" @@ -184,6 +185,7 @@ Reason: %1$s." "This Matrix ID can\'t be found, so the invite might not be received." "Leaving room" "Light" + "Line copied to clipboard" "Link copied to clipboard" "Loading…" "Loading more…"