refactor(i18n): translate polish variable names and keys to english
All checks were successful
Update Wiki Documentation / generate-docs (push) Successful in 2m13s

This commit is contained in:
Krzysztof Cieślik
2026-06-14 06:24:30 +02:00
parent 3d207912cb
commit 5467792b5a
7 changed files with 32 additions and 16 deletions

View File

@@ -26,12 +26,12 @@ class ConnectionSettingsActivity : BaseActivity() {
val intervalSec = etRefreshInterval.text.toString().toLongOrNull() ?: 30L
val strings = com.example.retroha.i18n.AndroidStrings(this)
android.app.AlertDialog.Builder(this)
.setTitle("UWAGA")
.setTitle(strings.get(com.example.retroha.i18n.StringKey.DIALOG_WARNING))
.setMessage(strings.get(com.example.retroha.i18n.StringKey.CONFIRM_CHANGE_CONN))
.setPositiveButton("TAK, ZMIEŃ") { _, _ ->
.setPositiveButton(strings.get(com.example.retroha.i18n.StringKey.DIALOG_YES_CHANGE)) { _, _ ->
performTestAndSave(url, token, intervalSec, tvStatus)
}
.setNegativeButton(strings.get(com.example.retroha.i18n.StringKey.DIALOG_ANULUJ), null)
.setNegativeButton(strings.get(com.example.retroha.i18n.StringKey.DIALOG_CANCEL), null)
.show()
}
}

View File

@@ -25,13 +25,13 @@ class SettingsActivity : BaseActivity() {
findViewById<Button>(R.id.btnDeleteAll).setOnClickListener {
val strings = com.example.retroha.i18n.AndroidStrings(this)
android.app.AlertDialog.Builder(this)
.setTitle("UWAGA")
.setTitle(strings.get(com.example.retroha.i18n.StringKey.DIALOG_WARNING))
.setMessage(strings.get(com.example.retroha.i18n.StringKey.CONFIRM_DELETE_ALL))
.setPositiveButton("TAK, USUŃ") { _, _ ->
.setPositiveButton(strings.get(com.example.retroha.i18n.StringKey.DIALOG_YES_DELETE)) { _, _ ->
Prefs.setSelectedEntities(this, emptySet())
Toast.makeText(this, "Wyczyszczono pulpit", Toast.LENGTH_SHORT).show()
Toast.makeText(this, strings.get(com.example.retroha.i18n.StringKey.TOAST_CLEARED), Toast.LENGTH_SHORT).show()
}
.setNegativeButton(strings.get(com.example.retroha.i18n.StringKey.DIALOG_ANULUJ), null)
.setNegativeButton(strings.get(com.example.retroha.i18n.StringKey.DIALOG_CANCEL), null)
.show()
}
}

View File

@@ -12,7 +12,7 @@ object Prefs {
context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
fun getLanguage(context: Context): String? = getPrefs(context).getString(KEY_LANGUAGE, null)
fun setLanguage(context: Context, lang: String) = getPrefs(context).edit().putString(KEY_LANGUAGE, lang).apply()
fun getUrl(context: Context): String = getPrefs(context).getString(KEY_URL, "http:
fun getUrl(context: Context): String = getPrefs(context).getString(KEY_URL, "http://") ?: "http://"
fun setUrl(context: Context, url: String) = getPrefs(context).edit().putString(KEY_URL, url).apply()
fun getToken(context: Context): String = getPrefs(context).getString(KEY_TOKEN, "") ?: ""
fun setToken(context: Context, token: String) = getPrefs(context).edit().putString(KEY_TOKEN, token).apply()

View File

@@ -38,8 +38,12 @@ class AndroidStrings(private val context: Context) : Strings {
StringKey.CONFIRM_DELETE_ALL -> R.string.confirm_delete_all
StringKey.CONFIRM_CHANGE_CONN -> R.string.confirm_change_conn
StringKey.DIALOG_BRIGHTNESS -> R.string.dialog_brightness
StringKey.DIALOG_USTAW -> R.string.dialog_ustaw
StringKey.DIALOG_ANULUJ -> R.string.dialog_anuluj
StringKey.DIALOG_SET -> R.string.dialog_set
StringKey.DIALOG_CANCEL -> R.string.dialog_cancel
StringKey.DIALOG_WARNING -> R.string.dialog_warning
StringKey.DIALOG_YES_CHANGE -> R.string.dialog_yes_change
StringKey.DIALOG_YES_DELETE -> R.string.dialog_yes_delete
StringKey.TOAST_CLEARED -> R.string.toast_cleared
}
)
}

View File

@@ -48,8 +48,12 @@
<string name="confirm_change_conn">CHANGING ADDRESS OR TOKEN WILL DELETE ALL SELECTED WIDGETS. CONTINUE?</string>
<string name="dialog_brightness">BRIGHTNESS</string>
<string name="dialog_ustaw">SET</string>
<string name="dialog_anuluj">CANCEL</string>
<string name="dialog_set">SET</string>
<string name="dialog_cancel">CANCEL</string>
<string name="dialog_warning">WARNING</string>
<string name="dialog_yes_change">YES, CHANGE</string>
<string name="dialog_yes_delete">YES, DELETE</string>
<string name="toast_cleared">Dashboard cleared</string>
<string name="inst_header_1">BASIC USAGE</string>
<string name="inst_body_1">- Short click on a tile toggles the device (ON/OFF).\n- Long press on a light tile opens a dedicated brightness slider.\n- Use the tabs at the top (e.g., Lighting, Power) to quickly filter displayed devices.</string>

View File

@@ -48,8 +48,12 @@
<string name="confirm_change_conn">ZMIANA ADRESU LUB TOKENU SPOWODUJE USUNIĘCIE WSZYSTKICH WYBRANYCH WIDŻETÓW. KONTYNUOWAĆ?</string>
<string name="dialog_brightness">JASNOŚĆ</string>
<string name="dialog_ustaw">USTAW</string>
<string name="dialog_anuluj">ANULUJ</string>
<string name="dialog_set">USTAW</string>
<string name="dialog_cancel">ANULUJ</string>
<string name="dialog_warning">UWAGA</string>
<string name="dialog_yes_change">TAK, ZMIEŃ</string>
<string name="dialog_yes_delete">TAK, USUŃ</string>
<string name="toast_cleared">Wyczyszczono pulpit</string>
<string name="inst_header_1">PODSTAWY OBSŁUGI</string>
<string name="inst_body_1">- Krótkie kliknięcie kafelka przełącza urządzenie (ON/OFF).\n- Długie przytrzymanie kafelka światła otwiera dedykowany suwak jasności.\n- Zakładki na górze ekranu (np. Oświetlenie, Moc) służą do szybkiego filtrowania wyświetlanych urządzeń.</string>

View File

@@ -34,6 +34,10 @@ enum class StringKey {
CONFIRM_DELETE_ALL,
CONFIRM_CHANGE_CONN,
DIALOG_BRIGHTNESS,
DIALOG_USTAW,
DIALOG_ANULUJ
DIALOG_SET,
DIALOG_CANCEL,
DIALOG_WARNING,
DIALOG_YES_CHANGE,
DIALOG_YES_DELETE,
TOAST_CLEARED
}