mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
fix(i18n): mark imported Apple translations complete
This commit is contained in:
@@ -46,13 +46,11 @@ const IOS_SOURCE_PREFIXES = [
|
||||
const IOS_CATALOG_KINDS = new Set([
|
||||
"conditional-branch",
|
||||
"ui-call",
|
||||
"ui-call-concatenated",
|
||||
"ui-call-multiline",
|
||||
"ui-localized-call",
|
||||
"ui-localized-call-multiline",
|
||||
"ui-modifier",
|
||||
"ui-named-argument",
|
||||
"ui-named-argument-concatenated",
|
||||
"ui-named-argument-multiline",
|
||||
]);
|
||||
const IOS_CATALOG_EXCLUSIONS = new Set([
|
||||
@@ -613,7 +611,7 @@ export function buildIosCatalog(
|
||||
const value = chooseTranslation(source, candidates);
|
||||
localizations[locale] = {
|
||||
stringUnit: {
|
||||
state: "new",
|
||||
state: value === source ? "new" : "translated",
|
||||
value,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -127,7 +127,7 @@ describe("Apple app i18n catalogs", () => {
|
||||
"Se connecter",
|
||||
);
|
||||
expect(build.catalog.strings?.["Connect now"]?.localizations?.fr?.stringUnit?.state).toBe(
|
||||
"new",
|
||||
"translated",
|
||||
);
|
||||
expect(build.catalog.strings?.["Connect now"]?.localizations?.es?.stringUnit).toEqual({
|
||||
state: "new",
|
||||
@@ -173,8 +173,8 @@ describe("Apple app i18n catalogs", () => {
|
||||
"Jetzt verbinden",
|
||||
);
|
||||
expect(refreshed.catalog.strings?.["Connect now"]?.localizations?.fr?.stringUnit).toEqual({
|
||||
state: "new",
|
||||
value: "Connectez-vous",
|
||||
state: "translated",
|
||||
value: "Se connecter",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -718,8 +718,8 @@ describe("native app i18n inventory", () => {
|
||||
entries: [
|
||||
{
|
||||
id: "native.apple.fallback.previous",
|
||||
source: fallbackEntries[0].source,
|
||||
translated: fallbackEntries[0].source,
|
||||
source: fallbackEntries[0]!.source,
|
||||
translated: fallbackEntries[0]!.source,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user