From 60cb53233b7c8ce7ec6824621d427037937dff5f Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 21 Jul 2026 09:21:06 +0200 Subject: [PATCH] ci(i18n): publish Wear locale artifacts --- .github/workflows/native-app-locale-refresh.yml | 3 +++ scripts/ci-changed-scope.mjs | 4 ++-- src/scripts/ci-changed-scope.native-i18n.test.ts | 1 + src/scripts/ci-changed-scope.test.ts | 1 + test/scripts/ci-workflow-guards.test.ts | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/native-app-locale-refresh.yml b/.github/workflows/native-app-locale-refresh.yml index c31b5d834ab7..fa07106864d3 100644 --- a/.github/workflows/native-app-locale-refresh.yml +++ b/.github/workflows/native-app-locale-refresh.yml @@ -6,6 +6,7 @@ on: - main paths: - apps/android/app/src/main/** + - apps/android/wear/src/main/** - apps/ios/** - apps/macos/Sources/** - apps/macos/Package.swift @@ -308,6 +309,7 @@ jobs: apps/android/app/src/main/java/ai/openclaw/app/i18n/NativeStringResources.kt apps/android/app/src/main/res/values*/assistant.xml apps/android/app/src/main/res/values*/strings.xml + apps/android/wear/src/main/res/values*/strings.xml apps/ios/Resources/Localizable.xcstrings apps/macos/Sources/OpenClaw/Resources/Localizable.xcstrings apps/ios/Sources/*.lproj/InfoPlist.strings @@ -317,6 +319,7 @@ jobs: invalidation-paths: | apps/.i18n/native-source.json apps/android/app/src/main + apps/android/wear/src/main apps/ios apps/macos/Sources apps/macos/Package.swift diff --git a/scripts/ci-changed-scope.mjs b/scripts/ci-changed-scope.mjs index f9f41570ddcb..be9abf4c3750 100644 --- a/scripts/ci-changed-scope.mjs +++ b/scripts/ci-changed-scope.mjs @@ -65,14 +65,14 @@ export class NativeGeneratedArtifactsMixedError extends Error {} const CONTROL_UI_TEST_SCOPE_RE = /^(ui\/|test\/vitest\/vitest\.shared\.config\.ts$|scripts\/ensure-playwright-chromium\.mjs$)/; const NATIVE_I18N_SCOPE_RE = - /^(?:apps\/\.i18n\/|apps\/android\/app\/src\/main\/|apps\/ios\/|apps\/macos\/Sources\/|apps\/shared\/OpenClawKit\/Sources\/|scripts\/(?:android-app-i18n|apple-app-i18n|native-app-i18n)\.ts$|test\/scripts\/(?:android-app-i18n|apple-app-i18n|native-app-i18n)\.test\.ts$|\.github\/workflows\/(?:ci|native-app-locale-refresh)\.yml$)/; + /^(?:apps\/\.i18n\/|apps\/android\/(?:app|wear)\/src\/main\/|apps\/ios\/|apps\/macos\/Sources\/|apps\/shared\/OpenClawKit\/Sources\/|scripts\/(?:android-app-i18n|apple-app-i18n|native-app-i18n)\.ts$|test\/scripts\/(?:android-app-i18n|apple-app-i18n|native-app-i18n)\.test\.ts$|\.github\/workflows\/(?:ci|native-app-locale-refresh)\.yml$)/; // Android base resources are co-owned: source PRs edit their English content, // while the generator rewrites managed sections. Treat them as generated only // alongside a hard-generated artifact so neither ownership path blocks the other. const NATIVE_COOWNED_GENERATED_I18N_RE = /^apps\/android\/app\/src\/main\/res\/values\/(?:assistant|strings)\.xml$/; const NATIVE_HARD_GENERATED_I18N_RE = - /^(?:apps\/\.i18n\/native\/[^/]+\.json|apps\/\.i18n\/apple-translation-contradictions\.json|apps\/android\/app\/src\/main\/java\/ai\/openclaw\/app\/i18n\/NativeStringResources\.kt|apps\/android\/app\/src\/main\/res\/values-[^/]+\/(?:assistant|strings)\.xml|apps\/ios\/Resources\/Localizable\.xcstrings|apps\/macos\/Sources\/OpenClaw\/Resources\/Localizable\.xcstrings|apps\/ios\/(?:Sources|WatchApp|ShareExtension|ActivityWidget)\/[^/]+\.lproj\/InfoPlist\.strings)$/; + /^(?:apps\/\.i18n\/native\/[^/]+\.json|apps\/\.i18n\/apple-translation-contradictions\.json|apps\/android\/app\/src\/main\/java\/ai\/openclaw\/app\/i18n\/NativeStringResources\.kt|apps\/android\/app\/src\/main\/res\/values-[^/]+\/(?:assistant|strings)\.xml|apps\/android\/wear\/src\/main\/res\/values-[^/]+\/strings\.xml|apps\/ios\/Resources\/Localizable\.xcstrings|apps\/macos\/Sources\/OpenClaw\/Resources\/Localizable\.xcstrings|apps\/ios\/(?:Sources|WatchApp|ShareExtension|ActivityWidget)\/[^/]+\.lproj\/InfoPlist\.strings)$/; const FAST_INSTALL_SMOKE_SCOPE_RE = /^(Dockerfile$|\.npmrc$|package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|scripts\/ci-changed-scope\.mjs$|scripts\/postinstall-bundled-plugins\.mjs$|scripts\/e2e\/(?:Dockerfile(?:\.qr-import)?|agents-delete-shared-workspace-docker\.sh|gateway-network-docker\.sh)$|extensions\/[^/]+\/(?:package\.json|openclaw\.plugin\.json)$|\.github\/workflows\/install-smoke\.yml$|\.github\/actions\/setup-node-env\/action\.yml$)/; const FULL_INSTALL_SMOKE_SCOPE_RE = diff --git a/src/scripts/ci-changed-scope.native-i18n.test.ts b/src/scripts/ci-changed-scope.native-i18n.test.ts index 55777eb14938..9b70ba960b82 100644 --- a/src/scripts/ci-changed-scope.native-i18n.test.ts +++ b/src/scripts/ci-changed-scope.native-i18n.test.ts @@ -14,6 +14,7 @@ describe("native i18n changed scope", () => { "apps/.i18n/apple-translation-contradictions.json", "apps/android/app/src/main/java/ai/openclaw/app/i18n/NativeStringResources.kt", "apps/android/app/src/main/res/values-sv/strings.xml", + "apps/android/wear/src/main/res/values-sv/strings.xml", "apps/ios/Resources/Localizable.xcstrings", "apps/macos/Sources/OpenClaw/Resources/Localizable.xcstrings", "apps/ios/WatchApp/sv.lproj/InfoPlist.strings", diff --git a/src/scripts/ci-changed-scope.test.ts b/src/scripts/ci-changed-scope.test.ts index 06c9ac950352..14e67022f86f 100644 --- a/src/scripts/ci-changed-scope.test.ts +++ b/src/scripts/ci-changed-scope.test.ts @@ -103,6 +103,7 @@ describe("detectChangedScope", () => { for (const changedPath of [ "apps/.i18n/native-source.json", "apps/android/app/src/main/java/ai/openclaw/app/MainActivity.kt", + "apps/android/wear/src/main/java/ai/openclaw/wear/WearScreens.kt", "apps/ios/Sources/RootTabs.swift", "apps/macos/Sources/OpenClaw/Settings.swift", "apps/shared/OpenClawKit/Sources/OpenClawKit/Client.swift", diff --git a/test/scripts/ci-workflow-guards.test.ts b/test/scripts/ci-workflow-guards.test.ts index 633b945d4f01..6ce5d73360be 100644 --- a/test/scripts/ci-workflow-guards.test.ts +++ b/test/scripts/ci-workflow-guards.test.ts @@ -983,6 +983,7 @@ describe("ci workflow guards", () => { expect(workflow.on.push.paths).toContain("ui/src/i18n/.i18n/glossary.*.json"); expect(workflow.on.push.paths).toContain("apps/.i18n/native/**"); expect(workflow.on.push.paths).toContain("apps/.i18n/native-source.json"); + expect(workflow.on.push.paths).toContain("apps/android/wear/src/main/**"); expect(workflow.on.push.paths).toContain("scripts/android-app-i18n.ts"); expect(workflow.on.push.paths).toContain("scripts/apple-app-i18n.ts"); expect(refreshStep.run).toContain("run_refresh anthropic"); @@ -1011,6 +1012,7 @@ describe("ci workflow guards", () => { "apps/android/app/src/main/java/ai/openclaw/app/i18n/NativeStringResources.kt", "apps/android/app/src/main/res/values*/assistant.xml", "apps/android/app/src/main/res/values*/strings.xml", + "apps/android/wear/src/main/res/values*/strings.xml", "apps/ios/Resources/Localizable.xcstrings", "apps/macos/Sources/OpenClaw/Resources/Localizable.xcstrings", "apps/ios/Sources/*.lproj/InfoPlist.strings",