refactor: move hardcoded strings to strings.xml

This commit is contained in:
robin committed 2026-10-03 17:29:08 +02:00
1 parent f05184a712
commit 2ea4c2dbad
2 files changed
+6 -3

No files matched your search

@@ -84,13 +84,13 @@ fun WordListScreen(modifier: Modifier = Modifier) {
}, },
modifier = Modifier.fillMaxWidth() modifier = Modifier.fillMaxWidth()
) { ) {
Text("Wort hinzufügen") Text(stringResource(R.string.hint_add_word))
} }
Spacer(modifier = Modifier.height(24.dp)) Spacer(modifier = Modifier.height(24.dp))
Text( Text(
text = "Gespeicherte Wörter:", text = stringResource(R.string.title_saved_words),
style = MaterialTheme.typography.titleMedium style = MaterialTheme.typography.titleMedium
) )
@@ -99,7 +99,7 @@ fun WordListScreen(modifier: Modifier = Modifier) {
// Liste der Wörter // Liste der Wörter
if (wordList.isEmpty()) { if (wordList.isEmpty()) {
Text( Text(
text = "Noch keine Wörter vorhanden.", text = stringResource(R.string.msg_no_words_yet),
style = MaterialTheme.typography.bodyMedium style = MaterialTheme.typography.bodyMedium
) )
} else { } else {
+3
View File
@@ -2,4 +2,7 @@
<resources> <resources>
<string name="app_name">WeekFocus</string> <string name="app_name">WeekFocus</string>
<string name="hint_new_word">Neues Wort eingeben</string> <string name="hint_new_word">Neues Wort eingeben</string>
<string name="hint_add_word">Wort hinzufügen</string>
<string name="title_saved_words">Gespeicherte Wörter:</string>
<string name="msg_no_words_yet">Noch keine Wörter vorhanden.</string>
</resources> </resources>