Skip to content

Commit

Permalink
[DESKTOP] Extract app name to strings
Browse files Browse the repository at this point in the history
  • Loading branch information
kamgurgul committed Jan 13, 2025
1 parent 4aceb42 commit 7789e20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion desktopApp/src/jvmMain/kotlin/com/kgurgul/cpuinfo/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import com.kgurgul.cpuinfo.di.initKoin
import com.kgurgul.cpuinfo.shared.Res
import com.kgurgul.cpuinfo.shared.app_name
import com.kgurgul.cpuinfo.shared.desktop_icon
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource
import org.jetbrains.skia.DirectContext

fun main() {
Expand All @@ -20,7 +22,7 @@ fun main() {
return application {
Window(
onCloseRequest = ::exitApplication,
title = "CPU Info",
title = stringResource(Res.string.app_name),
icon = painterResource(Res.drawable.desktop_icon),
) {
DesktopApp()
Expand Down
3 changes: 2 additions & 1 deletion shared/src/commonMain/composeResources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<resources>

<string name="action_not_supported">Action not available</string>
<string name="app_name" translatable="false">CPU Info</string>

<string name="yes">Yes</string>
<string name="no">No</string>
Expand All @@ -27,6 +27,7 @@
<string name="vram" translatable="false">VRAM</string>
<string name="edid" translatable="false">EDID</string>
<string name="menu" translatable="false">Menu</string>
<string name="action_not_supported">Action not available</string>

<!--Tabs-->
<string name="cpu">CPU</string>
Expand Down

0 comments on commit 7789e20

Please sign in to comment.