Fix localization issues, and export and import translations

This commit is contained in:
2023-03-16 22:55:54 -04:00
parent eabbb12195
commit f367df2225
27 changed files with 715 additions and 56 deletions

View File

@@ -274,8 +274,8 @@ func format_msats(_ msat: Int64, locale: Locale = Locale.current) -> String {
let sats = NSNumber(value: (Double(msat) / 1000.0))
let formattedSats = numberFormatter.string(from: sats) ?? sats.stringValue
let bundle = bundleForLocale(locale: locale)
return String(format: bundle.localizedString(forKey: "sats_count", value: nil, table: nil), locale: locale, sats.decimalValue as NSDecimalNumber, formattedSats)
let format = localizedStringFormat(key: "sats_count", locale: locale)
return String(format: format, locale: locale, sats.decimalValue as NSDecimalNumber, formattedSats)
}
func convert_invoice_block(_ b: invoice_block) -> Block? {