docs: complete 100% kdoc coverage and update app branding
All checks were successful
Update Wiki Documentation / generate-docs (push) Successful in 2m12s

This commit is contained in:
Krzysztof Cieślik
2026-06-14 07:23:17 +02:00
parent 231ec0cf92
commit c122e0392a
32 changed files with 435 additions and 89 deletions

View File

@@ -1,50 +1,102 @@
package com.example.retroha.i18n
/**
* Universal identifiers for translatable strings used across the application.
* Each key maps to a localized string in the platform-specific implementation.
*/
enum class StringKey {
/** Label for 'ON' state. */
STATE_ON,
/** Label for 'OFF' state. */
STATE_OFF,
/** Label for 'UNAVAILABLE' state. */
STATE_UNAVAILABLE,
/** Label for transitioning state. */
STATE_TOGGLING,
/** Button text for Settings. */
BTN_SETTINGS,
/** Placeholder toast for adding widgets. */
TOAST_WIDGET_ADD,
/** Tab label: All. */
TAB_ALL,
/** Tab label: Lighting. */
TAB_LIGHTING,
/** Tab label: Sockets. */
TAB_SOCKETS,
/** Tab label: Power. */
TAB_POWER,
/** Tab label: Weather. */
TAB_WEATHER,
/** Title for entity selection screen. */
TITLE_SETTINGS,
/** Title for connection configuration screen. */
TITLE_CONNECTION,
/** Title for user manual screen. */
TITLE_INSTRUCTIONS,
/** Instruction line 1. */
INSTRUCTION_1,
/** Instruction line 2. */
INSTRUCTION_2,
/** Instruction line 3. */
INSTRUCTION_3,
/** Instruction line 4. */
INSTRUCTION_4,
/** Instruction line 5. */
INSTRUCTION_5,
/** Input label for URL. */
LABEL_URL,
/** Input label for Access Token. */
LABEL_TOKEN,
/** Input label for refresh interval. */
LABEL_REFRESH,
/** Button text for testing and saving connection. */
BTN_TEST_SAVE,
/** Button text for deleting all widgets. */
BTN_DELETE_ALL,
/** Button text for saving selected entities. */
BTN_SAVE_SELECTED,
/** Button text for language change. */
BTN_CHANGE_LANG,
/** Status: Connecting. */
STATUS_CONNECTING,
/** Status: Successfully connected / Online. */
STATUS_CONNECTED,
/** Status: Offline. */
STATUS_OFFLINE,
/** Status error: Home Assistant reported an error. */
STATUS_ERROR_HA,
/** Status error: Authentication token missing. */
STATUS_NO_TOKEN,
/** Title for language selection screen. */
TITLE_SELECT_LANGUAGE,
/** Toast: Refreshing data. */
STATUS_REFRESHING,
/** Status: Success message. */
STATUS_SUCCESS,
/** Toast: Configuration saved and widgets cleared. */
TOAST_SAVED_CLEARED,
/** General error status. */
STATUS_ERROR,
/** Network connection error status. */
STATUS_ERROR_NETWORK,
/** Confirmation message for mass deletion. */
CONFIRM_DELETE_ALL,
/** Warning message for connection change. */
CONFIRM_CHANGE_CONN,
/** Label for brightness level. */
DIALOG_BRIGHTNESS,
/** Dialog button: Set/Apply. */
DIALOG_SET,
/** Dialog button: Cancel. */
DIALOG_CANCEL,
/** Dialog title: Warning. */
DIALOG_WARNING,
/** Dialog button: Confirm connection change. */
DIALOG_YES_CHANGE,
/** Dialog button: Confirm deletion. */
DIALOG_YES_DELETE,
/** Toast: Cache/Dashboard cleared. */
TOAST_CLEARED,
/** Toast: Selected entities saved. */
TOAST_ENTITIES_SAVED
}

View File

@@ -1,4 +1,14 @@
package com.example.retroha.i18n
/**
* Interface defining the contract for retrieving localized strings.
* This allows the business logic to remain platform-independent.
*/
interface Strings {
/**
* Retrieves a localized string for the given key.
* @param key The universal string identifier.
* @return The localized text for the current application language.
*/
operator fun get(key: StringKey): String
}