mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 12:26:38 -06:00
fix(i18n): include concatenated Apple UI strings (#129882)
* fix(i18n): include concatenated Apple UI strings * test(i18n): cover multiline Apple modifiers
This commit is contained in:
@@ -25,16 +25,6 @@ const IOS_SOURCE_PREFIXES = [
|
||||
SHARED_CHAT_UI_SOURCE_PREFIX,
|
||||
"apps/shared/OpenClawKit/Sources/OpenClawKit/",
|
||||
] as const;
|
||||
const APPLE_CATALOG_KINDS = new Set([
|
||||
"conditional-branch",
|
||||
"ui-call",
|
||||
"ui-call-multiline",
|
||||
"ui-localized-call",
|
||||
"ui-localized-call-multiline",
|
||||
"ui-modifier",
|
||||
"ui-named-argument",
|
||||
"ui-named-argument-multiline",
|
||||
]);
|
||||
const IOS_CATALOG_EXCLUSIONS = new Set([
|
||||
// Product names and preview-only single-character fixtures are intentionally verbatim.
|
||||
"OpenClaw",
|
||||
@@ -574,13 +564,17 @@ async function readOptionalFile(filePath: string): Promise<string | null> {
|
||||
}
|
||||
}
|
||||
|
||||
function isAppleCatalogKind(kind: string): boolean {
|
||||
return kind === "conditional-branch" || kind.startsWith("ui-");
|
||||
}
|
||||
|
||||
function isIosCatalogEntry(entry: NativeSourceEntry): boolean {
|
||||
return (
|
||||
entry.surface === "apple" &&
|
||||
entry.sites.some(
|
||||
(site) =>
|
||||
IOS_SOURCE_PREFIXES.some((prefix) => site.path.startsWith(prefix)) &&
|
||||
APPLE_CATALOG_KINDS.has(site.kind),
|
||||
isAppleCatalogKind(site.kind),
|
||||
) &&
|
||||
(!entry.source.includes("\\(") || isInflectedCountSource(entry.source)) &&
|
||||
!IOS_CATALOG_EXCLUSIONS.has(entry.source)
|
||||
@@ -593,7 +587,7 @@ function isMacosCatalogEntry(entry: NativeSourceEntry): boolean {
|
||||
entry.sites.some(
|
||||
(site) =>
|
||||
MACOS_SOURCE_PREFIXES.some((prefix) => site.path.startsWith(prefix)) &&
|
||||
APPLE_CATALOG_KINDS.has(site.kind),
|
||||
isAppleCatalogKind(site.kind),
|
||||
) &&
|
||||
!entry.source.includes("\\(") &&
|
||||
!MACOS_CATALOG_EXCLUSIONS.has(entry.source)
|
||||
|
||||
Reference in New Issue
Block a user