refactor(l10n): default strings to all targets

Most strings were imported with a platform-specific `targets` (usually
apple-only) just because that's where they happen to be used today. Drop the
restriction so they default to all targets and are available to KMP too; only
the four literal `%@…` format-composition keys stay apple-only.

Also fix the placeholder parser to tolerate C length modifiers (`%lld`), and
give progress_sending_to_count a proper int arg so it emits `%1$d` on both
platforms instead of a literal `%lld`.
This commit is contained in:
2026-07-20 10:24:54 +02:00
parent 3c0f29adb6
commit 4448822bfa
4 changed files with 49 additions and 116 deletions

View File

@@ -60,8 +60,9 @@ export interface ParsedString {
args: Arg[];
}
// Matches an escaped literal `%%` or a printf specifier (positional or bare).
const CONV = /%%|%(?:(\d+)\$)?([@sdif])/g;
// Matches an escaped literal `%%` or a printf specifier (positional or bare),
// tolerating C length modifiers like `%lld` / `%ld` on the integer forms.
const CONV = /%%|%(?:(\d+)\$)?l{0,2}([@sdif])/g;
function typeForConv(conv: string): ArgType {
if (conv === "@" || conv === "s") return "string";