Skip to content

Commit

Permalink
fix strings
Browse files Browse the repository at this point in the history
  • Loading branch information
makeevrserg committed Dec 2, 2024
1 parent 8cc9422 commit 23f7427
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<string name="fme_too_large_file">The file is larger than 1MB and therefore only part of the file is shown.</string>
<string name="fme_save_as_file">Save File as...</string>
<string name="fme_save">Save</string>
<string name="fme_status_downloading">Downloading...</string>
<string name="fme_status_uploading">Uploading: %1$s [%2$s/%3$s]</string>
<string name="fme_status_speed">Speed: %1$s/s</string>
<string name="fme_cancel">Cancel</string>
<string name="fme_allowed_characters">Allowed characters: %1$s</string>
<string name="fme_txt">TXT</string>
<string name="fme_hex">HEX</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import okio.Path
import flipperapp.components.filemngr.editor.impl.generated.resources.Res as FME
import flipperapp.components.filemngr.editor.impl.generated.resources.fme_status_downloading
import org.jetbrains.compose.resources.stringResource

class FileDownloadDecomposeComponent @AssistedInject constructor(
@Assisted componentContext: ComponentContext,
Expand Down Expand Up @@ -67,7 +70,7 @@ class FileDownloadDecomposeComponent @AssistedInject constructor(
speed = downloadViewModel.speedState.collectAsState().value,
onCancel = onBack::invoke,
modifier = Modifier,
title = "Downloading..."
title = stringResource(FME.string.fme_status_downloading)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import okio.Path
import flipperapp.components.filemngr.editor.impl.generated.resources.Res as FME
import flipperapp.components.filemngr.editor.impl.generated.resources.fme_status_uploading
import org.jetbrains.compose.resources.stringResource

@Suppress("LongParameterList")
class UploadFileDecomposeComponent @AssistedInject constructor(
Expand Down Expand Up @@ -86,7 +89,7 @@ class UploadFileDecomposeComponent @AssistedInject constructor(
speed = uploadFileViewModel.speedState.collectAsState().value,
onCancel = onBack::invoke,
modifier = Modifier,
title = "Uploading..."
title = stringResource(FME.string.fme_status_uploading)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import com.flipperdevices.core.ui.theme.LocalPallet
import com.flipperdevices.core.ui.theme.LocalPalletV2
import com.flipperdevices.core.ui.theme.LocalTypography
import okio.Path
import flipperapp.components.filemngr.editor.impl.generated.resources.Res as FME
import flipperapp.components.filemngr.editor.impl.generated.resources.fme_status_speed
import org.jetbrains.compose.resources.stringResource

@Composable
private fun InProgressTitleComposable(
Expand Down Expand Up @@ -76,7 +79,10 @@ internal fun InProgressComposable(
Spacer(Modifier.height(8.dp))
if (speed > 0) {
Text(
text = "Speed: ${speed.toFormattedSize()}",
text = stringResource(
resource = FME.string.fme_status_speed,
speed.toFormattedSize()
),
style = LocalTypography.current.subtitleM12,
color = LocalPalletV2.current.text.body.secondary,
modifier = Modifier.fillMaxWidth(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import com.flipperdevices.core.ui.ktx.clickableRipple
import com.flipperdevices.core.ui.theme.LocalPalletV2
import com.flipperdevices.core.ui.theme.LocalTypography
import okio.Path
import org.jetbrains.compose.resources.stringResource
import flipperapp.components.filemngr.editor.impl.generated.resources.Res as FME
import flipperapp.components.filemngr.editor.impl.generated.resources.fme_cancel

@Composable
fun UploadingComposable(
Expand Down Expand Up @@ -49,7 +52,7 @@ fun UploadingComposable(
)

Text(
text = "Cancel",
text = stringResource(FME.string.fme_cancel),
style = LocalTypography.current.bodyM14,
color = LocalPalletV2.current.action.danger.text.default,
modifier = Modifier
Expand Down

0 comments on commit 23f7427

Please sign in to comment.