Generate webHtmlApp's strings, collapse a redundant string key

Strings.kt is now generated at build time (:webHtmlApp:generateStrings,
in webHtmlApp/build.gradle.kts) by parsing shared's strings.xml
directly, rather than a hand-maintained duplicate that could silently
drift from it. Names are mechanical camelCase of the XML key, so a few
call sites got more verbose (e.g. moveUp -> moveCurrencyUpContentDescription)
in exchange for zero manual sync. Only covers the base English locale.

Also collapses currency_option_label_local into currency_option_label:
the two had identical English text and existed only as a hook for a
future translation to phrase the user's own currency differently, which
no locale currently does. Removes the info.code == localeCurrencyCode
branching (and the now-pointless localeCurrencyCode parameter/field) from
all three UI implementations - PriceScreen.kt, CurrencyPickerSheet.swift,
and HtmlCurrencyPicker.kt - plus IosConverterState.localeCurrencyCode,
which existed solely to feed that branch on the Swift side.

Fixes a real regression surfaced while verifying the above by actually
building the Xcode project (not done since currencyFlagEmoji() gained
its supportsFlagEmoji parameter): Kotlin/Native doesn't generate
default-parameter overloads for Swift/ObjC-exported functions, so both
Swift call sites needed the argument passed explicitly, via the correct
exported facade name for an expect/actual pair - the actual file's
(SystemCurrencies_appleKt), not the common one (SystemCurrenciesKt).

Also drops "(DOM)" from webHtmlApp's page title.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-17 07:33:47 +03:00
co-authored by Claude Sonnet 5
parent 188536867d
commit 8057651688
11 changed files with 127 additions and 97 deletions
@@ -26,7 +26,6 @@ data class IosConverterState(
val unselectedCurrencies: List<CurrencyInfo>,
val selectedCurrencyCodes: List<String>,
val pricedCurrencyCodes: List<String>,
val localeCurrencyCode: String?,
val defaultCurrencyCode: String,
val sourceName: String,
val isManualSource: Boolean,
@@ -81,7 +80,6 @@ private fun ConverterUiState.toIosState(): IosConverterState = IosConverterState
unselectedCurrencies = unselectedCurrencies(),
selectedCurrencyCodes = selectedFiatCurrencies,
pricedCurrencyCodes = pricedCurrencyCodes.toList(),
localeCurrencyCode = localeCurrencyCode,
defaultCurrencyCode = defaultCurrencyCode,
sourceName = sourceName,
isManualSource = isManualSource,
@@ -10,7 +10,6 @@
<string name="current_currency_section_title">Current Currency</string>
<string name="currency_not_priced">Not priced by %1$s</string>
<string name="currency_option_label">%1$s - %2$s</string>
<string name="currency_option_label_local">%1$s - %2$s</string>
<string name="currency_options_content_description">Options for %1$s</string>
<string name="currency_to_sats">%1$s to Sats</string>
<string name="done">Done</string>