Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.
Swift apple-siliconcustom-formathomebrewiosipaipadipadosiphonemetalnative-portnintendo-switchnxnativeromfsswitch-games
Check that the code and en.json use the same keys, in both front ends (#388)
v0lumehi68fc642be7fb
diff --git a/frontend-qt/tests/test_localization_de.py b/frontend-qt/tests/test_localization_de.pyindex b93cc88d..1abf9585 100644--- a/frontend-qt/tests/test_localization_de.py+++ b/frontend-qt/tests/test_localization_de.py@@ -28,7 +28,6 @@ class German(unittest.TestCase):self.assertNotIn('NX2Apple', row['de'], key)def test_t_picks_the_german_column(self):- self.assertEqual(t('settings.language.de', Lang('de')), 'Deutsch')self.assertEqual(t('dep.recheck', Lang('de')), 'Erneut prüfen')self.assertEqual(t('onboarding.stepCount', Lang('de'), 2, 5), 'Schritt 2 von 5')self.assertEqual(t('dep.recheck', Lang('en')), 'Check again')diff --git a/frontend-qt/tests/test_localization_fr.py b/frontend-qt/tests/test_localization_fr.pyindex 67a119a9..388acc4b 100644--- a/frontend-qt/tests/test_localization_fr.py+++ b/frontend-qt/tests/test_localization_fr.py@@ -15,7 +15,6 @@ from nspb_qt.l10n import TABLE, t # noqa: E402class FrenchTable(unittest.TestCase):def test_t_reads_the_french_column(self):self.assertEqual(t('onboarding.start', Lang('fr')), 'Commencer')- self.assertEqual(t('settings.language.fr', Lang('fr')), 'Français')self.assertEqual(t('dep.install.begin', Lang('fr'), 'zstd'), 'Installation de zstd…')diff --git a/frontend-qt/tests/test_localization_keys.py b/frontend-qt/tests/test_localization_keys.pynew file mode 100644index 00000000..7b302614--- /dev/null+++ b/frontend-qt/tests/test_localization_keys.py@@ -0,0 +1,102 @@+"""The keys the code uses and the keys en.json has have to be the same set (LNPANDY/NX2Apple#388).++1. A key that code names in a lookup (`t('key')`, `self.m.t('key')`, `L10n.string("key", ...)`) is in en.json.+2. A key that code builds at run time (a prefix and a variable) starts with an entry of `dynamicKeys` in+ frontend/Tests/l10n-key-rules.json, and every entry has a key in en.json and a place in the sources that builds it.+3. A key of en.json that no source mentions, literally or under a `dynamicKeys` entry, fails, unless it is in `unusedAllowed`.++The sources are both front ends, so a key only the Windows launcher or only the Mac launcher uses is used. The Mac launcher+runs the same rules in frontend/Tests/NXCoreTests/LocalizationKeyTests.swift.+"""+from __future__ import annotations++import json+import re+import unittest+from pathlib import Path++ROOT = Path(__file__).resolve().parents[2]+EN = ROOT / 'frontend' / 'l10n' / 'en.json'+RULES = ROOT / 'frontend' / 'Tests' / 'l10n-key-rules.json'+SOURCES = (ROOT / 'frontend-qt' / 'nspb_qt', ROOT / 'frontend' / 'Sources')++# A string literal that is a key lookup. Python: t('k'), .t("k"), t(f'k.{x}'), t('k.' + x). Swift: t("k"), L10n.string("k", ...),+# L10n.table["k"], t("k.\(x)"), t("k." + x). Group 2 is the literal's text, group 3 what follows it.+CALLS = (+ re.compile(r'''(?<![A-Za-z0-9_])t\(\s*f?(['"])((?:(?!\1).)*)\1(\s*[+%])?'''),+ re.compile(r'''L10n\.string\(\s*()"((?:[^"\\]|\\.)*)"()'''),+ re.compile(r'''L10n\.table\[\s*()"((?:[^"\\]|\\.)*)"()'''),+)+LITERAL = re.compile(r'''["']([A-Za-z0-9_][A-Za-z0-9_.\-]*)["']''')+DYNAMIC = re.compile(r'\\\(|\{') # Swift interpolation, Python f-string field+# win/build_app.py has its own t() that writes a log line, it does not look up a text+NOT_LOOKUPS = ('build_app.py',)+++def source_files():+ for base in SOURCES:+ for path in sorted(base.rglob('*')):+ if path.suffix in ('.py', '.swift') and path.is_file():+ yield path+++class LocalizationKeys(unittest.TestCase):+ @classmethod+ def setUpClass(cls):+ en = json.loads(EN.read_text(encoding='utf-8'))+ cls.keys = {k for k in en if k != '_language'}+ rules = json.loads(RULES.read_text(encoding='utf-8'))+ cls.dynamic = [(d['prefix'], d['suffix']) for d in rules['dynamicKeys']]+ cls.allowed = {a['key'] for a in rules['unusedAllowed']}+ cls.rules = rules+ cls.text = {p: p.read_text(encoding='utf-8') for p in source_files()}+ cls.literals: set[str] = set()+ cls.looked_up: list[tuple[Path, str, bool]] = [] # file, the literal's text, whether the key is built at run time+ for path, text in cls.text.items():+ cls.literals.update(LITERAL.findall(text))+ if path.name in NOT_LOOKUPS:+ continue+ for call in CALLS:+ for m in call.finditer(text):+ body, tail = m.group(2), m.group(3) or ''+ built = bool(DYNAMIC.search(body)) or tail.strip() in ('+', '%')+ cls.looked_up.append((path, DYNAMIC.split(body)[0] if built else body, built))++ def covered(self, key: str) -> bool:+ return any(key.startswith(p) and key.endswith(s) and len(key) >= len(p) + len(s) for p, s in self.dynamic)++ def test_the_sources_were_found(self):+ self.assertTrue(any(p.suffix == '.py' for p in self.text), 'no Python sources')+ self.assertTrue(any(p.suffix == '.swift' for p in self.text), 'no Swift sources')+ self.assertGreater(len(self.looked_up), 100, 'the lookup patterns found almost nothing')++ def test_every_literal_key_in_a_lookup_is_in_english(self):+ missing = sorted({f'{p.relative_to(ROOT)}: {k}' for p, k, built in self.looked_up if not built and k not in self.keys})+ self.assertEqual(missing, [], 'keys that a lookup names and en.json lacks')++ def test_every_built_key_starts_with_a_declared_prefix(self):+ undeclared = sorted({f'{p.relative_to(ROOT)}: {k}' for p, k, built in self.looked_up+ if built and not any(k.startswith(prefix) or prefix.startswith(k) for prefix, _ in self.dynamic)})+ self.assertEqual(undeclared, [], 'keys built at run time whose prefix is not in dynamicKeys of l10n-key-rules.json')++ def test_every_declared_prefix_has_keys_and_is_built_somewhere(self):+ for prefix, suffix in self.dynamic:+ matching = [k for k in self.keys if k.startswith(prefix) and k.endswith(suffix) and len(k) >= len(prefix) + len(suffix)]+ self.assertTrue(matching, f'dynamicKeys {prefix!r} {suffix!r} has no key in en.json')+ # Built in a lookup or anywhere else (a Dep's name, a labelKey), so the check is that a string literal starts with it+ self.assertTrue(any(f'"{prefix}' in t or f"'{prefix}" in t for t in self.text.values()), f'no source has a string that starts with {prefix!r}')++ def test_no_key_is_unused(self):+ unused = sorted(k for k in self.keys if k not in self.literals and not self.covered(k) and k not in self.allowed)+ self.assertEqual(unused, [], 'keys in en.json that no source uses (remove them from every language file, or explain them in unusedAllowed)')++ def test_the_unused_allowlist_has_no_stale_entries(self):+ for entry in self.rules['unusedAllowed']:+ self.assertTrue(entry.get('why', '').strip(), f'{entry.get("key")} has no reason')+ self.assertIn(entry['key'], self.keys, f'{entry["key"]} is not in en.json any more')+ self.assertNotIn(entry['key'], self.literals, f'{entry["key"]} is used, so it needs no entry')+ self.assertFalse(self.covered(entry['key']), f'{entry["key"]} is covered by a dynamicKeys entry')+++if __name__ == '__main__':+ unittest.main()diff --git a/frontend/README.md b/frontend/README.mdindex 0d4561e9..850146a4 100644--- a/frontend/README.md+++ b/frontend/README.md@@ -317,6 +317,11 @@ may miss a key and then show the English text, and `GermanLocalizationTests` and`FrenchLocalizationTests` check the entries they have (placeholders match the English text). The Windowslauncher reads the same files, so one edit serves both.+`LocalizationKeyTests` (Mac) and `test_localization_keys.py` (Qt) keep the code and `en.json` in step: a key a lookup+names must exist, a key en.json has must be used by one of the two front ends, and a key built from a prefix and a variable+(`"fail." + kind + ".what"`) needs a line in `frontend/Tests/l10n-key-rules.json` (`dynamicKeys`). A key that is only+kept on purpose goes into `unusedAllowed` there, with the reason. Remove an unused key from every language file.+The app finds the files in `Contents/Resources/l10n` (`build-mac-app.yml` and `tools/try-local` copy thefolder there, the same way as the engine and the bundled tools, not as SwiftPM resources). `swift run` finds`frontend/l10n` by walking up from the executable, and `swift test` takes it from the source path.diff --git a/frontend/Tests/NX2AppleTests/FrenchLocalizationTests.swift b/frontend/Tests/NX2AppleTests/FrenchLocalizationTests.swiftindex 1da8bd88..d0c3074c 100644--- a/frontend/Tests/NX2AppleTests/FrenchLocalizationTests.swift+++ b/frontend/Tests/NX2AppleTests/FrenchLocalizationTests.swift@@ -10,9 +10,8 @@ final class FrenchLocalizationTests: XCTestCase {static let sameAsEnglish: Set<String> = ["onboarding.platform.mac", "onboarding.platform.iphone", "onboarding.background.python","onboarding.background.dotnet", "onboarding.games.version", "onboarding.demo.mario",- "console.brand", "console.platform.mac", "console.platform.iphone", "console.version",- "saves.toDevice", "saves.toMac", "section.app", "app.version", "settings.language.zh",- "settings.language.en", "settings.language.sv", "settings.language.de", "settings.language.fr", "library.ok",+ "console.platform.mac", "console.platform.iphone", "console.version",+ "saves.toDevice", "saves.toMac", "section.app", "app.version", "library.ok","build.ios", "data.keys", "dep.tool.xcodegen","dep.tool.zstd", "dep.tool.spirv-cross", "dep.tool.glslangValidator", "diag.title", "dep.brew","dep.spirv.win", "dep.zstd.win", "dep.python.hint", "controls.mode.auto", "controls.fn.A",@@ -28,8 +27,7 @@ final class FrenchLocalizationTests: XCTestCase {func testFrenchIsSelectedAndReadsItsCatalog() {XCTAssertEqual(Lang.find("fr"), .fr)- XCTAssertEqual(L10n.string("settings.language.fr", .fr), "Français")- XCTAssertEqual(L10n.string("settings.language.fr", .en), "Français", "a language's name is in that language")+ XCTAssertEqual(Lang("fr").name, "Français", "a language's name is in that language")XCTAssertEqual(L10n.string("onboarding.start", .fr), "Commencer")XCTAssertEqual(L10n.string("onboarding.platform.title", .fr), "Où voulez-vous jouer\u{a0}?")XCTAssertEqual(String(format: L10n.string("onboarding.stepCount", .fr), 2, 6), "Étape 2 sur 6")diff --git a/frontend/Tests/NX2AppleTests/GermanLocalizationTests.swift b/frontend/Tests/NX2AppleTests/GermanLocalizationTests.swiftindex 7dc2c119..0d16c0c6 100644--- a/frontend/Tests/NX2AppleTests/GermanLocalizationTests.swift+++ b/frontend/Tests/NX2AppleTests/GermanLocalizationTests.swift@@ -10,10 +10,9 @@ final class GermanLocalizationTests: XCTestCase {private let sameAsEnglish: Set<String> = ["onboarding.platform.mac", "onboarding.platform.iphone", "onboarding.setup.metal","onboarding.background.python", "onboarding.background.dotnet", "onboarding.games.version",- "onboarding.demo.mario", "console.kind.gamepad", "console.brand", "console.platform.mac",+ "onboarding.demo.mario", "msg.ipaAt", "console.kind.gamepad", "console.platform.mac","console.platform.iphone", "console.version", "console.fps30", "console.fps60", "saves.toDevice",- "saves.toMac", "cheats.title", "section.app", "app.version", "nav.builds", "settings.language.zh",- "settings.language.en", "settings.language.sv", "settings.language.de", "settings.language.fr", "library.ok", "build.ios", "data.update", "data.keys",+ "saves.toMac", "cheats.title", "section.app", "app.version", "nav.builds", "library.ok", "build.ios", "data.update", "data.keys","dep.iossdk", "dep.tool.xcodegen", "dep.tool.zstd", "dep.tool.spirv-cross", "dep.tool.glslangValidator","dep.glslang", "dep.xcode", "dep.metal", "dep.brew", "dep.xcodegen", "dep.zstd", "dep.spirv.win","dep.zstd.win", "dep.spirv", "dep.dotnet", "dep.phase.download", "dep.python.hint",@@ -42,8 +41,7 @@ final class GermanLocalizationTests: XCTestCase {}func testGermanCatalogIsUsed() {- XCTAssertEqual(L10n.string("settings.language.de", .de), "Deutsch")- XCTAssertEqual(L10n.string("settings.language.de", .en), "Deutsch")+ XCTAssertEqual(Lang("de").name, "Deutsch")XCTAssertEqual(L10n.string("onboarding.start", .de), "Los geht\u{2019}s")XCTAssertEqual(L10n.string("onboarding.later", .de), "Sp\u{e4}ter einrichten")XCTAssertEqual(L10n.string("dep.recheck", .de), "Erneut pr\u{fc}fen")@@ -51,22 +49,10 @@ final class GermanLocalizationTests: XCTestCase {XCTAssertEqual(Lang.find("de"), .de)}- func testLanguageNamesExistInEveryLanguage() {- for lang: Lang in [.zh, .en, .sv, .de, .fr] {- for code in ["zh", "en", "sv", "de", "fr"] {- let key = "settings.language.\(code)"- XCTAssertNotEqual(L10n.string(key, lang), key)- }- }- }-+ /// The picker shows each language by its own name, which comes from the `_language` entry of its file.func testLanguageNamesAreTheLanguagesOwnNames() {- let endonyms = ["zh": "中文", "en": "English", "sv": "Svenska", "de": "Deutsch"]- for lang: Lang in [.zh, .en, .sv, .de] {- for (code, name) in endonyms {- XCTAssertEqual(L10n.string("settings.language.\(code)", lang), name, "\(code) in \(lang)")- }- }+ let endonyms = ["zh": "中文", "en": "English", "sv": "Svenska", "de": "Deutsch", "fr": "Français"]+ for (code, name) in endonyms { XCTAssertEqual(Lang(code).name, name, code) }}}diff --git a/frontend/Tests/NX2AppleTests/LauncherDropdownTests.swift b/frontend/Tests/NX2AppleTests/LauncherDropdownTests.swiftindex ef78bbad..ab21f2ad 100644--- a/frontend/Tests/NX2AppleTests/LauncherDropdownTests.swift+++ b/frontend/Tests/NX2AppleTests/LauncherDropdownTests.swift@@ -76,9 +76,9 @@ final class LauncherDropdownTests: XCTestCase {try FileManager.default.createDirectory(at: output, withIntermediateDirectories: true)let app = NSApplication.sharedapp.setActivationPolicy(.accessory)- let options = [(value: "", label: L10n.string("settings.language.system", .de)), (value: "zh", label: L10n.string("settings.language.zh", .de)),- (value: "en", label: L10n.string("settings.language.en", .de)), (value: "sv", label: L10n.string("settings.language.sv", .de)),- (value: "de", label: L10n.string("settings.language.de", .de))]+ let options = [(value: "", label: L10n.string("settings.language.system", .de)), (value: "zh", label: Lang("zh").name),+ (value: "en", label: Lang("en").name), (value: "sv", label: Lang("sv").name),+ (value: "de", label: Lang("de").name)]let width: CGFloat = 620, height: CGFloat = 330let rows = VStack(alignment: .trailing, spacing: 6) {HStack {diff --git a/frontend/Tests/NX2AppleTests/OnboardingTests.swift b/frontend/Tests/NX2AppleTests/OnboardingTests.swiftindex 38402af0..3ac4b116 100644--- a/frontend/Tests/NX2AppleTests/OnboardingTests.swift+++ b/frontend/Tests/NX2AppleTests/OnboardingTests.swift@@ -160,11 +160,9 @@ final class OnboardingTests: XCTestCase {}func testSwedishUsesItsCatalog() {- XCTAssertEqual(L10n.string("settings.language.sv", .sv), "Svenska")XCTAssertEqual(L10n.string("onboarding.start", .sv), "Kom igång")XCTAssertEqual(L10n.string("onboarding.xcode.ready", .sv), "Xcode är klart.")XCTAssertEqual(L10n.string("dep.python", .sv), "Python + paket")- XCTAssertNotEqual(L10n.string("settings.language.sv", .sv), "settings.language.sv")}/// The same opt-in native capture path as the launcher's other visual QA tests.diff --git a/frontend/Tests/NX2AppleTests/ShellInstallTests.swift b/frontend/Tests/NX2AppleTests/ShellInstallTests.swiftindex 62ca961d..29226c1a 100644--- a/frontend/Tests/NX2AppleTests/ShellInstallTests.swift+++ b/frontend/Tests/NX2AppleTests/ShellInstallTests.swift@@ -198,7 +198,7 @@ import NXModelfunc testEveryLanguageHasTheShellTexts() {for key in ["build.iosNote", "shell.projectStage", "shell.projectFailed", "shell.checkStage", "shell.dataAlready","shell.noFramework", "shell.needsDevice", "shell.copySize", "shell.copyWired", "shell.copyWifi", "shell.copyWifiOne",- "shell.copyWifiMinute", "shell.copyNotConnected", "shell.copyWaiting", "shell.copyTitle", "shell.copyContinue",+ "shell.copyWifiMinute", "shell.copyNotConnected", "shell.copyWaiting", "shell.copyTitle","shell.copyWaitCable", "shell.copySkip", "shell.copyStopWaiting", "shell.retry", "shell.notPaired","shell.copyIncomplete", "fail.devicePairing.what", "fail.devicePairing.next", "fail.shellDataIncomplete.what","fail.shellDataIncomplete.next"] {diff --git a/frontend/Tests/NXCoreTests/LocalizationKeyTests.swift b/frontend/Tests/NXCoreTests/LocalizationKeyTests.swiftnew file mode 100644index 00000000..4cbfc805--- /dev/null+++ b/frontend/Tests/NXCoreTests/LocalizationKeyTests.swift@@ -0,0 +1,129 @@+import XCTest+@testable import NXCore++/// The keys the code uses and the keys `frontend/l10n/en.json` has have to be the same set (LNPANDY/NX2Apple#388).+///+/// 1. A key that code names in a lookup (`t("key")`, `loc.t("key")`, `L10n.string("key", ...)`, `t('key')` in Python) is in en.json.+/// 2. A key that code builds at run time (a prefix and a variable) starts with an entry of `dynamicKeys` in+/// `frontend/Tests/l10n-key-rules.json`, and every entry has a key in en.json and a place in the sources that builds it.+/// 3. A key of en.json that no source mentions, literally or under a `dynamicKeys` entry, fails, unless it is in `unusedAllowed`.+///+/// The sources are both front ends, so a key only the Windows launcher or only the Mac launcher uses is used. The Qt front end+/// runs the same rules in `frontend-qt/tests/test_localization_keys.py`, from the same rules file.+final class LocalizationKeyTests: XCTestCase {+ private struct Rules: Decodable {+ struct Dynamic: Decodable { let prefix: String; let suffix: String; let why: String }+ struct Allowed: Decodable { let key: String; let why: String }+ let dynamicKeys: [Dynamic]+ let unusedAllowed: [Allowed]+ }++ private struct Lookup { let file: String; let text: String; let built: Bool }++ private struct Scan {+ var keys: Set<String> = []+ var rules: Rules+ var sources: [String: String] = [:]+ var literals: Set<String> = []+ var lookups: [Lookup] = []++ func covered(_ key: String) -> Bool {+ rules.dynamicKeys.contains { key.hasPrefix($0.prefix) && key.hasSuffix($0.suffix) && key.count >= $0.prefix.count + $0.suffix.count }+ }+ }++ // t("k"), loc.t("k"), t('k'), t(f'k.{x}'), t("k.\(x)"), t("k." + x). Group 2 is the literal's text, group 3 what follows it.+ private static let calls: [NSRegularExpression] = [+ #"(?<![A-Za-z0-9_])t\(\s*f?(['"])((?:(?!\1).)*)\1(\s*[+%])?"#,+ #"L10n\.string\(\s*()"((?:[^"\\]|\\.)*)"()"#,+ #"L10n\.table\[\s*()"((?:[^"\\]|\\.)*)"()"#,+ ].map { try! NSRegularExpression(pattern: $0) }+ private static let literal = try! NSRegularExpression(pattern: #"["']([A-Za-z0-9_][A-Za-z0-9_.\-]*)["']"#)+ private static let dynamic = try! NSRegularExpression(pattern: #"\\\(|\{"#)+ /// win/build_app.py has its own t() that writes a log line, it does not look up a text.+ private static let notLookups: Set<String> = ["build_app.py"]++ private static let frontend = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent()++ private static let scan: Scan = {+ let root = frontend.deletingLastPathComponent()+ let en = try! JSONSerialization.jsonObject(with: Data(contentsOf: frontend.appendingPathComponent("l10n/en.json"))) as! [String: Any]+ let rules = try! JSONDecoder().decode(Rules.self, from: Data(contentsOf: frontend.appendingPathComponent("Tests/l10n-key-rules.json")))+ var scan = Scan(keys: Set(en.keys).subtracting(["_language"]), rules: rules)+ for base in [frontend.appendingPathComponent("Sources"), root.appendingPathComponent("frontend-qt/nspb_qt")] {+ guard let walk = FileManager.default.enumerator(at: base, includingPropertiesForKeys: nil) else { continue }+ for case let url as URL in walk where url.pathExtension == "swift" || url.pathExtension == "py" {+ guard let text = try? String(contentsOf: url, encoding: .utf8) else { continue }+ scan.sources[url.path.replacingOccurrences(of: root.path + "/", with: "")] = text+ }+ }+ for (file, text) in scan.sources {+ let whole = NSRange(location: 0, length: (text as NSString).length)+ func group(_ m: NSTextCheckingResult, _ i: Int) -> String { m.range(at: i).location == NSNotFound ? "" : (text as NSString).substring(with: m.range(at: i)) }+ for m in literal.matches(in: text, range: whole) { scan.literals.insert(group(m, 1)) }+ if notLookups.contains((file as NSString).lastPathComponent) { continue }+ for call in calls {+ for m in call.matches(in: text, range: whole) {+ let body = group(m, 2), tail = group(m, 3).trimmingCharacters(in: .whitespaces)+ let built = dynamic.firstMatch(in: body, range: NSRange(location: 0, length: (body as NSString).length)) != nil || tail == "+" || tail == "%"+ var text = body+ if built, let cut = dynamic.firstMatch(in: body, range: NSRange(location: 0, length: (body as NSString).length)) {+ text = (body as NSString).substring(to: cut.range.location)+ }+ scan.lookups.append(Lookup(file: file, text: text, built: built))+ }+ }+ }+ return scan+ }()++ func testTheSourcesWereFound() {+ let scan = Self.scan+ XCTAssertTrue(scan.sources.keys.contains { $0.hasSuffix(".py") }, "no Python sources")+ XCTAssertTrue(scan.sources.keys.contains { $0.hasSuffix(".swift") }, "no Swift sources")+ XCTAssertGreaterThan(scan.lookups.count, 100, "the lookup patterns found almost nothing")+ }++ func testEveryLiteralKeyInALookupIsInEnglish() {+ let scan = Self.scan+ let missing = Set(scan.lookups.filter { !$0.built && !scan.keys.contains($0.text) }.map { "\($0.file): \($0.text)" }).sorted()+ XCTAssertEqual(missing, [], "keys that a lookup names and en.json lacks")+ }++ func testEveryBuiltKeyStartsWithADeclaredPrefix() {+ let scan = Self.scan+ let undeclared = Set(scan.lookups.filter { lookup in+ lookup.built && !scan.rules.dynamicKeys.contains { lookup.text.hasPrefix($0.prefix) || $0.prefix.hasPrefix(lookup.text) }+ }.map { "\($0.file): \($0.text)" }).sorted()+ XCTAssertEqual(undeclared, [], "keys built at run time whose prefix is not in dynamicKeys of l10n-key-rules.json")+ }++ func testEveryDeclaredPrefixHasKeysAndIsBuiltSomewhere() {+ let scan = Self.scan+ for entry in scan.rules.dynamicKeys {+ let matching = scan.keys.filter { $0.hasPrefix(entry.prefix) && $0.hasSuffix(entry.suffix) && $0.count >= entry.prefix.count + entry.suffix.count }+ XCTAssertFalse(matching.isEmpty, "dynamicKeys \(entry.prefix) \(entry.suffix) has no key in en.json")+ // Built in a lookup or anywhere else (a Dep's name, a labelKey), so the check is that a string literal starts with it.+ XCTAssertTrue(scan.sources.values.contains { $0.contains("\"" + entry.prefix) || $0.contains("'" + entry.prefix) },+ "no source has a string that starts with \(entry.prefix)")+ XCTAssertFalse(entry.why.trimmingCharacters(in: .whitespaces).isEmpty, "dynamicKeys \(entry.prefix) has no reason")+ }+ }++ func testNoKeyIsUnused() {+ let scan = Self.scan+ let allowed = Set(scan.rules.unusedAllowed.map(\.key))+ let unused = scan.keys.filter { !scan.literals.contains($0) && !scan.covered($0) && !allowed.contains($0) }.sorted()+ XCTAssertEqual(unused, [], "keys in en.json that no source uses (remove them from every language file, or explain them in unusedAllowed)")+ }++ func testTheUnusedAllowlistHasNoStaleEntries() {+ let scan = Self.scan+ for entry in scan.rules.unusedAllowed {+ XCTAssertFalse(entry.why.trimmingCharacters(in: .whitespaces).isEmpty, "\(entry.key) has no reason")+ XCTAssertTrue(scan.keys.contains(entry.key), "\(entry.key) is not in en.json any more")+ XCTAssertFalse(scan.literals.contains(entry.key), "\(entry.key) is used, so it needs no entry")+ XCTAssertFalse(scan.covered(entry.key), "\(entry.key) is covered by a dynamicKeys entry")+ }+ }+}diff --git a/frontend/Tests/l10n-key-rules.json b/frontend/Tests/l10n-key-rules.jsonnew file mode 100644index 00000000..4ab97481--- /dev/null+++ b/frontend/Tests/l10n-key-rules.json@@ -0,0 +1,38 @@+{+ "_about": "Read by LocalizationKeyTests.swift (Mac launcher) and frontend-qt/tests/test_localization_keys.py (Qt front end), LNPANDY/NX2Apple#388. A key that code builds at run time (a prefix plus a variable) must start with one of the dynamicKeys, and every entry needs at least one key in frontend/l10n/en.json and one place in the sources that builds it. A key of en.json that no source mentions and no dynamicKeys entry covers fails the tests unless it is in unusedAllowed, with the reason.",+ "dynamicKeys": [+ {"prefix": "console.kind.", "suffix": "", "why": "the controller kinds, ConsoleState.swift"},+ {"prefix": "console.platform.", "suffix": "", "why": "the platforms of a game, ConsoleState.swift"},+ {"prefix": "controls.fn.", "suffix": "", "why": "the label of each controller button, Controls.swift"},+ {"prefix": "controls.mode.", "suffix": "", "why": "the name of each control preset, ControlPresets.swift"},+ {"prefix": "controls.modeNote.", "suffix": "", "why": "the note of each control preset, ControlPresets.swift"},+ {"prefix": "dep.metal.", "suffix": "", "why": "a dependency detail \"key:value\", Toolchain.swift and DependencyCheck.swift"},+ {"prefix": "dep.pick.", "suffix": "", "why": "the text of a dependency choice, model.py"},+ {"prefix": "dep.probe.", "suffix": ".hint", "why": "the hint of each compiler probe, model.py"},+ {"prefix": "dep.python.", "suffix": "", "why": "a dependency detail \"key:value\", Toolchain.swift"},+ {"prefix": "dep.spirv", "suffix": ".hint", "why": "the hint of a build tool is its key plus \".hint\", Toolchain.swift and model.py"},+ {"prefix": "dep.tool.", "suffix": "", "why": "the name of each tool, Toolchain.swift"},+ {"prefix": "dep.xcodegen", "suffix": ".hint", "why": "the hint of a build tool is its key plus \".hint\", Toolchain.swift and model.py"},+ {"prefix": "dep.zstd", "suffix": ".hint", "why": "the hint of a build tool is its key plus \".hint\", Toolchain.swift and model.py"},+ {"prefix": "engine.channel.", "suffix": "", "why": "the name of each engine channel, EngineUpdater.swift"},+ {"prefix": "fail.", "suffix": ".next", "why": "what to do after each kind of build failure, BuildFailureKind.swift and build_failure.py"},+ {"prefix": "fail.", "suffix": ".risk", "why": "the risk of a fix for each kind of build failure"},+ {"prefix": "fail.", "suffix": ".what", "why": "what happened for each kind of build failure"},+ {"prefix": "filter.", "suffix": "", "why": "the library filters, LauncherView.swift"},+ {"prefix": "free.cost.", "suffix": "", "why": "the cost line of each freeable part, FreeSpace.swift"},+ {"prefix": "free.part.", "suffix": "", "why": "the name of each freeable part, FreeSpace.swift"},+ {"prefix": "key.", "suffix": "", "why": "the name of each keyboard key, Controls.swift"},+ {"prefix": "keycheck.part.", "suffix": "", "why": "the name of each part of a game the key check reads, KeyCheck.swift"},+ {"prefix": "launch.opt.", "suffix": "", "why": "the choices of a launch setting, LaunchOptionsView.swift"},+ {"prefix": "launch.section.", "suffix": "", "why": "the section titles of the launch options, LaunchOptionsView.swift"},+ {"prefix": "launch.set.", "suffix": "", "why": "the name and note of each launch setting, LaunchOptionsView.swift"},+ {"prefix": "nav.", "suffix": "", "why": "the main pages, LauncherView.swift"},+ {"prefix": "onboarding.", "suffix": ".note", "why": "the note of each onboarding step, OnboardingView.swift"},+ {"prefix": "onboarding.", "suffix": ".title", "why": "the title of each onboarding step, OnboardingState.swift"},+ {"prefix": "onboarding.background.", "suffix": "", "why": "the background tasks of the onboarding, OnboardingState.swift"},+ {"prefix": "onboarding.platform.", "suffix": "", "why": "the platform choices of the onboarding, OnboardingView.swift"},+ {"prefix": "onboarding.setup.", "suffix": "", "why": "the Xcode setup tasks of the onboarding, OnboardingState.swift"},+ {"prefix": "stage.", "suffix": "", "why": "the name of each build stage, BuildProgress.swift"}+ ],+ "unusedAllowed": []+}diff --git a/frontend/l10n/de.json b/frontend/l10n/de.jsonindex 83db653a..224da171 100644--- a/frontend/l10n/de.json+++ b/frontend/l10n/de.json@@ -39,14 +39,9 @@"app.updateBtn": "Auf %@ aktualisieren","app.version": "Version %@","app.waitForBuild": "Ein Build läuft: Das Update wartet, bis er fertig ist",- "btn.build": "Build starten",- "btn.outDir": "Ausgabeordner …","btn.rebuild": "Neu bauen","btn.stop": "Stopp","build.cancel": "Build abbrechen",- "build.compatibility": "Unterstützung für ältere iPhones",- "build.details": "Build-Details",- "build.files": "1. Spieldateien wählen","build.folderCTA": "Spieleordner wählen","build.folderNote": "Wähle den Ordner mit deinem Spiel oder die Dateien unten aus.","build.folderSelected": "Spieleordner ausgewählt",@@ -60,9 +55,6 @@"build.macNote": "Direkt auf diesem Mac spielen.","build.options": "Updates und Zusatzinhalte (optional)","build.outDir": "Ausgabeordner …",- "build.output": "2. Wähle, wo du spielen willst",- "build.resultIOS": "iPhone-Build abgeschlossen",- "build.resultMac": "Mac-Build abgeschlossen","build.saveDefault": "Neben den Spieldateien","build.saveTo": "Sichern in","build.setup": "Einrichtung beenden",@@ -108,14 +100,11 @@"console.batteryCharging": "Batterie %d Prozent, wird geladen","console.batteryLevel": "Batterie %d Prozent","console.batteryPercent": "%d %%",- "console.batteryUnknown": "Batteriestand unbekannt",- "console.brand": "NX2Apple","console.broken": "Dieses Spiel braucht im Desktop-Modus Aufmerksamkeit.","console.charging": "Lädt","console.chinese": "Chinesisch","console.close": "Zurück","console.connected": "%@ verbunden, Spieler %d",- "console.connectedNextPlayer": "%@ verbunden, Spieler %d","console.connectedUnassigned": "%@ verbunden","console.connectionNote": "Ein Controller ist verbunden. Deine Spiele, bereit für den großen Bildschirm.","console.connectionTitle": "Zum Konsolenmodus wechseln?",@@ -144,7 +133,6 @@"console.fps30": "30 fps","console.fps60": "60 fps","console.frameRate": "Bildrate",- "console.fullscreen": "Vollbild","console.identify": "Erkennen","console.identifying": "Wird erkannt …","console.identifyingName": "%@ wird erkannt …",@@ -161,7 +149,6 @@"console.library": "DEINE SPIELE","console.menuLeave": "Konsolenmodus verlassen","console.mergeAll": "Alle Controller sind Spieler 1",- "console.mergeEach": "Jeder Controller ist ein eigener Spieler","console.mergeNote": "Jeder Controller sendet die Eingabe von Spieler 1. Aus: Jeder ist ein eigener Spieler. Gilt für Spiele auf diesem Mac.","console.mergeOff": "Jeder Controller ist jetzt ein eigener Spieler.","console.mockPress": "Tastendruck simulieren",@@ -181,7 +168,6 @@"console.play": "Spielen","console.playHint": "Spielen oder erfahren, wie du die Einrichtung abschließt.","console.player": "Spieler %d",- "console.playerMode": "Spielermodus","console.playerShort": "S%d","console.pressToAssign": "Drücke eine Taste, um Spieler %d zuzuweisen.","console.promptNever": "Nicht mehr fragen",@@ -193,7 +179,6 @@"console.resolution": "Auflösungsskalierung","console.return": "Zurück zur Konsole","console.rumble": "Controller-Vibration",- "console.setup": "Auf deinem Mac einrichten","console.shaders": "Shader werden kompiliert","console.shadersProgress": "Shader werden kompiliert · %d von %d","console.simulatedShaders": "Simulierter Fortschritt in dieser Vorschau",@@ -387,11 +372,8 @@"dev.copySkipped": "Auf %@ installiert, aber die Spieldateien wurden nicht übertragen","dev.copyStage": "Spieldateien auf %@ kopieren","dev.expiry": "Signatur läuft ab: %@ (noch %d Tage)",- "dev.expiryExpiredShort": "Signatur abgelaufen","dev.expiryPast": "Signatur ist am %@ abgelaufen (vor %d Tagen)",- "dev.expiryShort": "Signatur noch %d Tage gültig","dev.expiryToday": "Signatur läuft heute ab (%@)",- "dev.expiryTodayShort": "Signatur läuft heute ab","dev.expiryUnknown": "Ablauf der Signatur: unbekannt (neu signieren ist weiterhin möglich)","dev.gameData": "Spieldaten (romfs.img)","dev.installFailed": "Installation fehlgeschlagen: %@",@@ -407,7 +389,6 @@"dev.open": "Auf %@ öffnen","dev.personalTeam": "Persönliches Team","dev.refresh": "Aktualisieren",- "dev.reinstall": "Neu installieren","dev.reinstallFailed": "Neuinstallation fehlgeschlagen: %@ (ist die Signatur abgelaufen, signiere und installiere erneut)","dev.reinstallMissing": "Die signierte App ist nicht vorhanden: %@ (bitte erneut bauen)","dev.reinstallStage": "Neuinstallation auf %@",@@ -421,7 +402,6 @@"dev.resignStage": "Neu signieren für %@","dev.resigned": "Neu signiert und auf %@ installiert","dev.saveFailed": "Sichern der IPA fehlgeschlagen: %@ (prüfe den freien Speicherplatz und die Schreibrechte am Ziel)",- "dev.saveIPA": "IPA sichern …","dev.saveIPATitle": "Signierte IPA sichern","dev.saveNeedsApp": "Keine signierte App zum Packen: %@ (bitte erneut bauen)","dev.saveStage": "IPA wird gepackt",@@ -429,7 +409,6 @@"dev.section": "Installation","dev.signFailed": "Signieren fehlgeschlagen: %@","dev.signStage": "Für %@ signieren",- "dev.signedApp": "Signierte App","dev.target": "Installieren auf","dev.team": "Signierteam","dev.teamNoCert": "Dieses Team hat noch kein Entwicklungszertifikat. Xcode erstellt es bei der ersten Installation (der Mac muss online sein).",@@ -670,7 +649,6 @@"library.appReady": "NX2Apple %@ ist bereit","library.artworkHint": "Wähle ein breites Bild für dieses Spiel. Das Bild bleibt an seinem ursprünglichen Ort.","library.buildAgain": "Erneut bauen …",- "library.buildForMac": "Für Mac bauen","library.building": "Wird gebaut","library.changeArtwork": "Titelbild ändern …","library.chooseFolder": "Ordner ändern …",@@ -734,8 +712,10 @@"msg.buildFailed": "Build fehlgeschlagen (Exit-Code %d). Siehe das Protokoll unten","msg.buildFailedReason": "Build fehlgeschlagen. Siehe das Protokoll unten. Letzte Zeile: %@","msg.chainChanged": "Ein Upstream-Update hat den Shader-Übersetzer geändert, daher lassen sich bereits gebaute Shader-Bibliotheken nicht wiederverwenden. Dieser Build erstellt sie mit dem neuen neu (einmal pro Update, spätere Builds verwenden sie wie zuvor wieder).",+ "msg.done": "Fertig","msg.exitCode": "Exit-Code %d","msg.installingNsz": "Der gewählte Dump ist NSZ / XCZ. nsz wird in das Build-Python installiert …",+ "msg.ipaAt": "IPA: %@","msg.launchFailed": "Das Build-Skript konnte nicht gestartet werden: %@","msg.macAppDone": "Mac-App bereit. Doppelklicke sie im Finder","msg.macAppMissing": "Build beendet, aber es wurde keine .app erzeugt (ist dm/mac/pack_app.py im Checkout?)",@@ -855,9 +835,6 @@"onboarding.xcode.title": "Machen wir deinen Mac bereit.","opt.bc": "Ältere Geräte (A15 / A16 und früher)","opt.bc.note": "BC-Texturen auf der CPU dekodieren, für GPUs ohne BC-Unterstützung: iPhone 13 und älter, iPads mit A16. Bei neueren Geräten ausgeschaltet lassen, denn der GPU-Weg ist schneller",- "opt.macNoBc": "Eine Mac-App nutzt die GPU dieses Macs, daher ist keine Kompatibilitätsoption nötig",- "opt.note": "je Ziel",- "opt.title": "Build-Optionen","pad.back": "Zurück","pad.manage": "Verwalten","pad.options": "Optionen",@@ -866,7 +843,6 @@"prog.archiveDone": "Spieldaten bereit: %@/romfs.img","prog.archiveReused": "vorheriges Image wiederverwendet (%d Dateien unverändert)","prog.archiveShort": "Spieldaten-Image",- "prog.empty": "Die eigenen Phasen des Skripts erscheinen hier, sobald der Build startet","prog.eta": "Noch %@","prog.noRomfs": "kein entpacktes RomFS gefunden","prog.title": "Build-Fortschritt",@@ -955,16 +931,9 @@"section.setup": "Einrichtung","section.target": "Spielen auf","section.tools": "Build-Werkzeuge",- "settings.appNote": "Baue deine Spiele für Apple-Geräte",- "settings.appNote2": "Baue deine eigenen Switch-Spiele","settings.heading": "Einstellungen","settings.language": "Sprache",- "settings.language.de": "Deutsch",- "settings.language.en": "English",- "settings.language.fr": "Français",- "settings.language.sv": "Svenska","settings.language.system": "Systemsprache",- "settings.language.zh": "中文","settings.note": "Speicherort der Bibliothek, Build-Werkzeuge und Updates.","settings.notify": "Mitteilung am Ende eines Builds","settings.notifyNote": "Wenn ein Build fertig wird oder fehlschlägt, während NX2Apple im Hintergrund ist",@@ -975,7 +944,6 @@"settings.setupBtn": "Ausführen","settings.setupNote": "Die Ersteinrichtung noch einmal durchgehen: Xcode, Build-Werkzeuge, Schlüssel und Spiele","shell.checkStage": "Spieldaten auf %@ vergleichen",- "shell.copyContinue": "Weiter","shell.copyExternalNote": "Du kannst die Spieldaten-img-Datei auch selbst auf ein externes Laufwerk kopieren und im iOS-Starter den Speicherort der Spieldaten angeben — keine Übertragung von diesem Mac nötig.","shell.copyIncomplete": "Die Spieldaten auf %@ sind unvollständig: %@. Erneut versuchen vervollständigt sie.","shell.copyNotConnected": "%@ ist gerade nicht verbunden. Schließe es mit einem Kabel an und lass es entsperrt.",diff --git a/frontend/l10n/en.json b/frontend/l10n/en.jsonindex 088ad1a7..a00c3c4b 100644--- a/frontend/l10n/en.json+++ b/frontend/l10n/en.json@@ -37,14 +37,9 @@"app.updateBtn": "Update to %@","app.version": "Version %@","app.waitForBuild": "A build is running: the update waits until it is done",- "btn.build": "Start build",- "btn.outDir": "Output folder…","btn.rebuild": "Rebuild","btn.stop": "Stop","build.cancel": "Cancel build",- "build.compatibility": "Older iPhone support",- "build.details": "Build details",- "build.files": "1. Choose your game files","build.folderCTA": "Choose game folder","build.folderNote": "Choose the folder containing your game, or select the files below.","build.folderSelected": "Game folder selected",@@ -58,9 +53,6 @@"build.macNote": "Play directly on this Mac.","build.options": "Updates & add-on content (optional)","build.outDir": "Output folder…",- "build.output": "2. Choose where to play",- "build.resultIOS": "iPhone build complete",- "build.resultMac": "Mac build complete","build.saveDefault": "Next to the game files","build.saveTo": "Save to","build.setup": "Finish setup",@@ -106,14 +98,11 @@"console.batteryCharging": "Battery %d percent, charging","console.batteryLevel": "Battery %d percent","console.batteryPercent": "%d%%",- "console.batteryUnknown": "Battery not reported",- "console.brand": "NX2Apple","console.broken": "This game needs attention in desktop mode.","console.charging": "Charging","console.chinese": "Chinese","console.close": "Back","console.connected": "%@ connected, player %d",- "console.connectedNextPlayer": "%@ connected, player %d","console.connectedUnassigned": "%@ connected","console.connectionNote": "A controller is connected. Your games, ready for the big screen.","console.connectionTitle": "Switch to console mode?",@@ -142,7 +131,6 @@"console.fps30": "30 fps","console.fps60": "60 fps","console.frameRate": "Frame rate",- "console.fullscreen": "Full screen","console.identify": "Identify","console.identifying": "Identifying…","console.identifyingName": "Identifying %@…",@@ -159,7 +147,6 @@"console.library": "YOUR GAMES","console.menuLeave": "Leave Console Mode","console.mergeAll": "All controllers are player 1",- "console.mergeEach": "Each controller is its own player","console.mergeNote": "Every controller sends player 1’s input. When off, each controller is its own player. Applies to games running on this Mac.","console.mergeOff": "Each controller is now its own player.","console.mockPress": "Simulate a button press",@@ -179,7 +166,6 @@"console.play": "Play","console.playHint": "Play, or learn how to finish setup.","console.player": "Player %d",- "console.playerMode": "Player mode","console.playerShort": "P%d","console.pressToAssign": "Press a button to assign player %d.","console.promptNever": "Don’t ask again",@@ -191,7 +177,6 @@"console.resolution": "Resolution scale","console.return": "Return to console","console.rumble": "Controller vibration",- "console.setup": "Set up on your Mac","console.shaders": "Compiling shaders","console.shadersProgress": "Compiling shaders · %d of %d","console.simulatedShaders": "Simulated progress in this preview",@@ -385,11 +370,8 @@"dev.copySkipped": "Installed on %@, but the game files were not transferred","dev.copyStage": "Copy the game files to %@","dev.expiry": "Signature expires: %@ (%d days left)",- "dev.expiryExpiredShort": "signature expired","dev.expiryPast": "Signature expired %@ (%d days ago)",- "dev.expiryShort": "%d days of signature left","dev.expiryToday": "Signature expires today (%@)",- "dev.expiryTodayShort": "signature expires today","dev.expiryUnknown": "Signature expiry: unknown (re-signing is still offered)","dev.gameData": "Game data (romfs.img)","dev.installFailed": "Installing failed: %@",@@ -405,7 +387,6 @@"dev.open": "Open on %@","dev.personalTeam": "Personal team","dev.refresh": "Refresh",- "dev.reinstall": "Reinstall","dev.reinstallFailed": "Reinstalling failed: %@ (if the signature has expired, sign and install again)","dev.reinstallMissing": "The signed app is not there: %@ (build again)","dev.reinstallStage": "Reinstalling on %@",@@ -419,7 +400,6 @@"dev.resignStage": "Re-signing for %@","dev.resigned": "Re-signed and installed on %@","dev.saveFailed": "Saving the IPA failed: %@ (check free space and write permission at the destination)",- "dev.saveIPA": "Save IPA…","dev.saveIPATitle": "Save the signed IPA","dev.saveNeedsApp": "No signed app to pack: %@ (build again)","dev.saveStage": "Packing the IPA",@@ -427,7 +407,6 @@"dev.section": "Install","dev.signFailed": "Signing failed: %@","dev.signStage": "Sign for %@",- "dev.signedApp": "Signed app","dev.target": "Install on","dev.team": "Signing team","dev.teamNoCert": "This team has no development certificate yet: Xcode creates it at the first install (the Mac needs to be online).",@@ -668,7 +647,6 @@"library.appReady": "NX2Apple %@ is ready","library.artworkHint": "Choose a wide image for this game. The image stays in its original location.","library.buildAgain": "Build again…",- "library.buildForMac": "Build for Mac","library.building": "Building","library.changeArtwork": "Change artwork…","library.chooseFolder": "Change folder…",@@ -732,8 +710,10 @@"msg.buildFailed": "Build failed (exit code %d) — see the log below","msg.buildFailedReason": "Build failed — see the log below. Last line: %@","msg.chainChanged": "An upstream update changed the shader translator, so previously built shader libraries cannot be reused, so this build rebuilds them with the new one (once per update, and later builds reuse as before).",+ "msg.done": "Done","msg.exitCode": "exit code %d","msg.installingNsz": "The selected dump is NSZ / XCZ — installing nsz into the build's Python…",+ "msg.ipaAt": "IPA: %@","msg.launchFailed": "Could not start the build script: %@","msg.macAppDone": "Mac app ready — double-click it in the Finder","msg.macAppMissing": "Build finished but no .app was produced (is dm/mac/pack_app.py in the checkout?)",@@ -853,9 +833,6 @@"onboarding.xcode.title": "Let’s get your Mac ready.","opt.bc": "Older devices (A15 / A16 and earlier)","opt.bc.note": "Decode BC textures on the CPU for GPUs without BC support: iPhone 13 and earlier, A16 iPads. Leave off on newer devices — the GPU path is faster",- "opt.macNoBc": "A Mac app uses this Mac's GPU, so no compatibility option is needed",- "opt.note": "per output",- "opt.title": "Build options","pad.back": "Back","pad.manage": "Manage","pad.options": "Options",@@ -864,7 +841,6 @@"prog.archiveDone": "game data ready: %@/romfs.img","prog.archiveReused": "reused the previous image (%d files unchanged)","prog.archiveShort": "Game data image",- "prog.empty": "The script's own stages appear here once the build starts","prog.eta": "%@ left","prog.noRomfs": "no extracted RomFS found","prog.title": "Build progress",@@ -953,16 +929,9 @@"section.setup": "Setup","section.target": "Play on","section.tools": "Build tools",- "settings.appNote": "Build your games for Apple devices",- "settings.appNote2": "Build your own Switch games","settings.heading": "Settings","settings.language": "Language",- "settings.language.de": "Deutsch",- "settings.language.en": "English",- "settings.language.fr": "Français",- "settings.language.sv": "Svenska","settings.language.system": "Follow system",- "settings.language.zh": "中文","settings.note": "Library location, build tools and updates.","settings.notify": "Notify when a build ends","settings.notifyNote": "When a build finishes or fails while NX2Apple is in the background",@@ -973,7 +942,6 @@"settings.setupBtn": "Run","settings.setupNote": "Walk through first-run setup again: Xcode, build tools, keys and games","shell.checkStage": "Compare the game data on %@",- "shell.copyContinue": "Continue","shell.copyExternalNote": "You can also copy the game data img file to external storage yourself and point the iOS launcher at the game data location — no transfer from this Mac needed.","shell.copyIncomplete": "The game data on %@ is incomplete: %@. Retry finishes it.","shell.copyNotConnected": "%@ is not connected right now. Connect it with a cable and keep it unlocked.",diff --git a/frontend/l10n/fr.json b/frontend/l10n/fr.jsonindex 145421a5..1d1d6b69 100644--- a/frontend/l10n/fr.json+++ b/frontend/l10n/fr.json@@ -38,14 +38,9 @@"app.updateBtn": "Mettre à jour vers %@","app.version": "Version %@","app.waitForBuild": "Une compilation est en cours : la mise à jour attend qu’elle soit terminée",- "btn.build": "Lancer la compilation",- "btn.outDir": "Dossier de sortie…","btn.rebuild": "Recompiler","btn.stop": "Arrêter","build.cancel": "Annuler la compilation",- "build.compatibility": "Prise en charge des anciens iPhone",- "build.details": "Détails de la compilation",- "build.files": "1. Choisissez les fichiers de votre jeu","build.folderCTA": "Choisir le dossier du jeu","build.folderNote": "Choisissez le dossier contenant votre jeu, ou sélectionnez les fichiers ci-dessous.","build.folderSelected": "Dossier du jeu sélectionné",@@ -59,9 +54,6 @@"build.macNote": "Jouez directement sur ce Mac.","build.options": "Mises à jour et contenu additionnel (facultatif)","build.outDir": "Dossier de sortie…",- "build.output": "2. Choisissez où jouer",- "build.resultIOS": "Compilation iPhone terminée",- "build.resultMac": "Compilation Mac terminée","build.saveDefault": "Près des fichiers du jeu","build.saveTo": "Enregistrer dans","build.setup": "Finir la configuration",@@ -107,14 +99,11 @@"console.batteryCharging": "Batterie à %d pour cent, en charge","console.batteryLevel": "Batterie à %d pour cent","console.batteryPercent": "%d %%",- "console.batteryUnknown": "Batterie non indiquée",- "console.brand": "NX2Apple","console.broken": "Ce jeu nécessite votre attention en mode bureau.","console.charging": "En charge","console.chinese": "Chinois","console.close": "Retour","console.connected": "Connexion : %@, joueur %d",- "console.connectedNextPlayer": "Connexion : %@, joueur %d","console.connectedUnassigned": "Connexion : %@","console.connectionNote": "Une manette est connectée. Vos jeux, prêts pour le grand écran.","console.connectionTitle": "Passer en mode console ?",@@ -143,7 +132,6 @@"console.fps30": "30 i/s","console.fps60": "60 i/s","console.frameRate": "Fréquence d’images",- "console.fullscreen": "Plein écran","console.identify": "Identifier","console.identifying": "Identification…","console.identifyingName": "Identification de %@…",@@ -160,7 +148,6 @@"console.library": "VOS JEUX","console.menuLeave": "Quitter le mode console","console.mergeAll": "Toutes les manettes sont le joueur 1",- "console.mergeEach": "Chaque manette est un joueur distinct","console.mergeNote": "Chaque manette envoie les commandes du joueur 1. Désactivé, chaque manette est un joueur distinct. S’applique aux jeux lancés sur ce Mac.","console.mergeOff": "Chaque manette est désormais un joueur distinct.","console.mockPress": "Simuler un appui sur un bouton",@@ -180,7 +167,6 @@"console.play": "Jouer","console.playHint": "Jouer, ou découvrir comment terminer la configuration.","console.player": "Joueur %d",- "console.playerMode": "Mode joueur","console.playerShort": "J%d","console.pressToAssign": "Appuyez sur un bouton pour attribuer le joueur %d.","console.promptNever": "Ne plus demander",@@ -192,7 +178,6 @@"console.resolution": "Échelle de résolution","console.return": "Revenir à la console","console.rumble": "Vibrations de la manette",- "console.setup": "À configurer sur votre Mac","console.shaders": "Compilation des shaders","console.shadersProgress": "Compilation des shaders · %d sur %d","console.simulatedShaders": "Progression simulée dans cet aperçu",@@ -386,11 +371,8 @@"dev.copySkipped": "Installé sur %@, mais les fichiers du jeu n’ont pas été transférés","dev.copyStage": "Copie des fichiers du jeu sur %@","dev.expiry": "La signature expire : %@ (%d jours restants)",- "dev.expiryExpiredShort": "signature expirée","dev.expiryPast": "La signature a expiré %@ (il y a %d jours)",- "dev.expiryShort": "%d jours de signature restants","dev.expiryToday": "La signature expire aujourd’hui (%@)",- "dev.expiryTodayShort": "la signature expire aujourd’hui","dev.expiryUnknown": "Expiration de la signature : inconnue (la re-signature reste proposée)","dev.gameData": "Données du jeu (romfs.img)","dev.installFailed": "Échec de l’installation : %@",@@ -406,7 +388,6 @@"dev.open": "Ouvrir sur %@","dev.personalTeam": "Équipe personnelle","dev.refresh": "Actualiser",- "dev.reinstall": "Réinstaller","dev.reinstallFailed": "Échec de la réinstallation : %@ (si la signature a expiré, signez et installez à nouveau)","dev.reinstallMissing": "L’app signée est absente : %@ (compilez à nouveau)","dev.reinstallStage": "Réinstallation sur %@",@@ -420,7 +401,6 @@"dev.resignStage": "Re-signature pour %@","dev.resigned": "Re-signé et installé sur %@","dev.saveFailed": "Échec de l’enregistrement de l’IPA : %@ (vérifiez l’espace libre et les droits d’écriture à la destination)",- "dev.saveIPA": "Enregistrer l’IPA…","dev.saveIPATitle": "Enregistrer l’IPA signée","dev.saveNeedsApp": "Aucune app signée à empaqueter : %@ (compilez à nouveau)","dev.saveStage": "Empaquetage de l’IPA",@@ -428,7 +408,6 @@"dev.section": "Installation","dev.signFailed": "Échec de la signature : %@","dev.signStage": "Signature pour %@",- "dev.signedApp": "App signée","dev.target": "Installer sur","dev.team": "Équipe de signature","dev.teamNoCert": "Cette équipe n’a pas encore de certificat de développement : Xcode le crée lors de la première installation (le Mac doit être en ligne).",@@ -669,7 +648,6 @@"library.appReady": "NX2Apple %@ est prête","library.artworkHint": "Choisissez une image large pour ce jeu. L’image reste à son emplacement d’origine.","library.buildAgain": "Compiler à nouveau…",- "library.buildForMac": "Compiler pour Mac","library.building": "Compilation","library.changeArtwork": "Changer l’illustration…","library.chooseFolder": "Changer de dossier…",@@ -733,8 +711,10 @@"msg.buildFailed": "Échec de la compilation (code de sortie %d) — voir le journal ci-dessous","msg.buildFailedReason": "Échec de la compilation — voir le journal ci-dessous. Dernière ligne : %@","msg.chainChanged": "Une mise à jour en amont a modifié le traducteur de shaders : les bibliothèques de shaders déjà compilées ne peuvent pas être réutilisées, cette compilation les reconstruit donc avec le nouveau (une fois par mise à jour ; les compilations suivantes les réutilisent comme avant).",+ "msg.done": "Terminé","msg.exitCode": "code de sortie %d","msg.installingNsz": "Le dump sélectionné est en NSZ / XCZ — installation de nsz dans le Python de compilation…",+ "msg.ipaAt": "IPA : %@","msg.launchFailed": "Impossible de lancer le script de compilation : %@","msg.macAppDone": "App Mac prête — double-cliquez dessus dans le Finder","msg.macAppMissing": "Compilation terminée mais aucune .app n’a été produite (dm/mac/pack_app.py est-il présent dans la copie ?)",@@ -854,9 +834,6 @@"onboarding.xcode.title": "Préparons votre Mac.","opt.bc": "Anciens appareils (A15 / A16 et antérieurs)","opt.bc.note": "Décoder les textures BC sur le CPU pour les GPU sans prise en charge BC : iPhone 13 et antérieurs, iPad A16. Laissez désactivé sur les appareils récents — le GPU est plus rapide",- "opt.macNoBc": "Une app Mac utilise le GPU de ce Mac, aucune option de compatibilité n’est donc nécessaire",- "opt.note": "par sortie",- "opt.title": "Options de compilation","pad.back": "Retour","pad.manage": "Gérer","pad.options": "Options",@@ -865,7 +842,6 @@"prog.archiveDone": "données du jeu prêtes : %@/romfs.img","prog.archiveReused": "image précédente réutilisée (%d fichiers inchangés)","prog.archiveShort": "Image des données du jeu",- "prog.empty": "Les étapes du script apparaissent ici une fois la compilation lancée","prog.eta": "%@ restant","prog.noRomfs": "aucun RomFS extrait trouvé","prog.title": "Progression de la compilation",@@ -954,16 +930,9 @@"section.setup": "Configuration","section.target": "Jouer sur","section.tools": "Outils de compilation",- "settings.appNote": "Compilez vos jeux pour les appareils Apple",- "settings.appNote2": "Compilez vos propres jeux Switch","settings.heading": "Réglages","settings.language": "Langue",- "settings.language.de": "Deutsch",- "settings.language.en": "English",- "settings.language.fr": "Français",- "settings.language.sv": "Svenska","settings.language.system": "Suivre le système",- "settings.language.zh": "中文","settings.note": "Emplacement de la bibliothèque, outils de compilation et mises à jour.","settings.notify": "Notifier à la fin d’une compilation","settings.notifyNote": "Quand une compilation se termine ou échoue alors que NX2Apple est en arrière-plan",@@ -974,7 +943,6 @@"settings.setupBtn": "Lancer","settings.setupNote": "Refaire la configuration initiale : Xcode, outils de compilation, clés et jeux","shell.checkStage": "Comparaison des données du jeu sur %@",- "shell.copyContinue": "Continuer","shell.copyExternalNote": "Vous pouvez aussi copier vous-même le fichier img des données du jeu vers un stockage externe, puis désigner cet emplacement dans le lanceur iOS — aucun transfert depuis ce Mac n’est nécessaire.","shell.copyIncomplete": "Les données du jeu sur %@ sont incomplètes : %@. Réessayer les complète.","shell.copyNotConnected": "%@ n’est pas connecté pour le moment. Branchez-le avec un câble et gardez-le déverrouillé.",diff --git a/frontend/l10n/sv.json b/frontend/l10n/sv.jsonindex 0345f8c2..8643d10f 100644--- a/frontend/l10n/sv.json+++ b/frontend/l10n/sv.json@@ -38,14 +38,9 @@"app.updateBtn": "Uppdatera till %@","app.version": "Version %@","app.waitForBuild": "Ett bygge körs. Uppdateringen väntar tills det är klart.",- "btn.build": "Starta bygget",- "btn.outDir": "Utdatamapp …","btn.rebuild": "Bygg om","btn.stop": "Stoppa","build.cancel": "Avbryt bygget",- "build.compatibility": "Stöd för äldre iPhone-modeller",- "build.details": "Byggdetaljer",- "build.files": "1. Välj dina spelfiler","build.folderCTA": "Välj spelmapp","build.folderNote": "Välj mappen som innehåller spelet eller välj filerna nedan.","build.folderSelected": "Spelmapp vald",@@ -59,9 +54,6 @@"build.macNote": "Spela direkt på den här Mac-datorn.","build.options": "Uppdateringar och tilläggsinnehåll (valfritt)","build.outDir": "Utdatamapp …",- "build.output": "2. Välj var du vill spela",- "build.resultIOS": "iPhone-bygget är klart",- "build.resultMac": "Mac-bygget är klart","build.saveDefault": "Bredvid spelfilerna","build.saveTo": "Spara till","build.setup": "Slutför inställningen",@@ -498,7 +490,6 @@"library.appReady": "NX2Apple %@ är klart","library.artworkHint": "Välj en bred bild för spelet. Bilden ligger kvar på sin ursprungliga plats.","library.buildAgain": "Bygg igen …",- "library.buildForMac": "Bygg för Mac","library.building": "Bygger","library.changeArtwork": "Byt omslagsbild …","library.chooseFolder": "Byt mapp …",@@ -560,8 +551,10 @@"msg.buildFailed": "Bygget misslyckades med slutkod %d. Se loggen nedan.","msg.buildFailedReason": "Bygget misslyckades. Se loggen nedan. Sista raden: %@","msg.chainChanged": "Uppströmskoden uppdaterade kedjan för shaderöversättning. Tidigare shaderbibliotek kan inte återanvändas. Det här bygget återskapar dem med den nya översättaren, vilket bara sker en gång per version.",+ "msg.done": "Klart","msg.exitCode": "slutkod %d","msg.installingNsz": "Det valda filformatet är komprimerat NSZ/XCZ. Installerar nsz i Python-miljön som används för bygget …",+ "msg.ipaAt": "IPA: %@","msg.launchFailed": "Kunde inte starta byggskriptet: %@","msg.macAppDone": "Mac-appen är klar. Dubbelklicka på den i Finder.","msg.macAppMissing": "Bygget blev klart men ingen .app hittades. Saknas dm/mac/pack_app.py i förrådet?",@@ -678,9 +671,6 @@"onboarding.xcode.title": "Gör din Mac redo.","opt.bc": "Äldre enheter (A15/A16 och tidigare)","opt.bc.note": "Avkodas på processorn för GPU:er som inte stöder BC-texturkomprimering: iPhone 13 och tidigare samt iPad med A16. Låt alternativet vara avstängt på nyare enheter eftersom GPU-vägen är snabbare.",- "opt.macNoBc": "En Mac-app använder den här Mac-datorns GPU. Inget kompatibilitetsalternativ behövs.",- "opt.note": "per utdata",- "opt.title": "Byggalternativ","pad.back": "Tillbaka","pad.manage": "Hantera","pad.options": "Alternativ",@@ -689,7 +679,6 @@"prog.archiveDone": "speldata klar: %@/romfs.img","prog.archiveReused": "återanvände föregående avbildning (%d filer oförändrade)","prog.archiveShort": "Speldataavbildning",- "prog.empty": "När bygget startar visas varje steg från skriptet här","prog.eta": "%@ kvar","prog.noRomfs": "ingen extraherad RomFS hittades","prog.title": "Byggförlopp",@@ -778,16 +767,9 @@"section.setup": "Inställning","section.target": "Spela på","section.tools": "Byggverktyg",- "settings.appNote": "Bygg dina spel för Apple-enheter",- "settings.appNote2": "Bygg dina egna Switch-spel","settings.heading": "Inställningar","settings.language": "Språk",- "settings.language.de": "Deutsch",- "settings.language.en": "English",- "settings.language.fr": "Français",- "settings.language.sv": "Svenska","settings.language.system": "Följ systemet",- "settings.language.zh": "中文","settings.note": "Biblioteksplats, byggverktyg och uppdateringar.","settings.notify": "Meddela när ett bygge är klart","settings.notifyNote": "När ett bygge blir klart eller misslyckas medan NX2Apple körs i bakgrunden",@@ -798,7 +780,6 @@"settings.setupBtn": "Kör","settings.setupNote": "Gå igenom den första inställningen igen: Xcode, byggverktyg, nycklar och spel","shell.checkStage": "Jämför speldata på %@",- "shell.copyContinue": "Fortsätt","shell.copyExternalNote": "Du kan också kopiera speldata-img-filen till extern lagring själv och peka iOS-startprogrammet på speldata-platsen — ingen överföring från den här Macen behövs.","shell.copyIncomplete": "Speldatan på %@ är ofullständig: %@. Försök igen så blir den klar.","shell.copyNotConnected": "%@ är inte ansluten just nu. Anslut den med kabel och låt den vara olåst.",diff --git a/frontend/l10n/zh.json b/frontend/l10n/zh.jsonindex 702b3bc7..b1ae8c25 100644--- a/frontend/l10n/zh.json+++ b/frontend/l10n/zh.json@@ -38,14 +38,9 @@"app.updateBtn": "更新到 %@","app.version": "版本 %@","app.waitForBuild": "构建进行中:更新会等构建结束",- "btn.build": "开始构建",- "btn.outDir": "输出目录…","btn.rebuild": "重新构建","btn.stop": "停止","build.cancel": "取消构建",- "build.compatibility": "兼容性选项",- "build.details": "构建详情",- "build.files": "1. 选择游戏文件","build.folderCTA": "选择游戏文件夹","build.folderNote": "选择包含游戏的文件夹,或逐个选择文件。","build.folderSelected": "已选择游戏文件夹",@@ -59,9 +54,6 @@"build.macNote": "在这台 Mac 上直接运行。","build.options": "更新和附加内容(可选)","build.outDir": "输出目录…",- "build.output": "2. 选择运行设备",- "build.resultIOS": "iPhone 构建已完成",- "build.resultMac": "Mac 构建已完成","build.saveDefault": "游戏文件旁边","build.saveTo": "保存到","build.setup": "完成设置",@@ -107,14 +99,11 @@"console.batteryCharging": "电量百分之 %d,正在充电","console.batteryLevel": "电量百分之 %d","console.batteryPercent": "%d%%",- "console.batteryUnknown": "未报告电量",- "console.brand": "NX2Apple","console.broken": "此游戏需要在桌面模式中处理。","console.charging": "正在充电","console.chinese": "中文","console.close": "返回","console.connected": "%@ 已连接,玩家 %d",- "console.connectedNextPlayer": "%@ 已连接,玩家 %d","console.connectedUnassigned": "%@ 已连接","console.connectionNote": "手柄已连接。在大屏幕上选择并畅玩游戏。","console.connectionTitle": "切换到主机模式?",@@ -143,7 +132,6 @@"console.fps30": "30 帧/秒","console.fps60": "60 帧/秒","console.frameRate": "帧率",- "console.fullscreen": "全屏","console.identify": "识别","console.identifying": "正在识别…","console.identifyingName": "正在识别 %@…",@@ -160,7 +148,6 @@"console.library": "你的游戏","console.menuLeave": "退出主机模式","console.mergeAll": "所有手柄均为玩家 1",- "console.mergeEach": "每个手柄对应一位玩家","console.mergeNote": "打开后,每个手柄都按玩家 1 输入。关闭时,每个手柄各有自己的玩家。仅对在 Mac 上运行的游戏生效。","console.mergeOff": "现在每个手柄各是一位玩家。","console.mockPress": "模拟按下按钮",@@ -180,7 +167,6 @@"console.play": "开始游戏","console.playHint": "开始游戏,或了解如何完成设置。","console.player": "玩家 %d",- "console.playerMode": "玩家模式","console.playerShort": "P%d","console.pressToAssign": "按下一个按钮以分配玩家 %d。","console.promptNever": "不再提示",@@ -192,7 +178,6 @@"console.resolution": "分辨率缩放","console.return": "返回主机模式","console.rumble": "手柄振动",- "console.setup": "在 Mac 上完成设置","console.shaders": "正在编译着色器","console.shadersProgress": "正在编译着色器 · %d / %d","console.simulatedShaders": "此预览中的进度为模拟进度",@@ -386,11 +371,8 @@"dev.copySkipped": "已安装到 %@,游戏文件未传输","dev.copyStage": "复制游戏文件到 %@","dev.expiry": "签名到期:%@(剩 %d 天)",- "dev.expiryExpiredShort": "签名已过期","dev.expiryPast": "签名已过期(%@,%d 天前)",- "dev.expiryShort": "签名剩 %d 天","dev.expiryToday": "签名今天到期(%@)",- "dev.expiryTodayShort": "签名今天到期","dev.expiryUnknown": "签名到期:未知(仍可续签)","dev.gameData": "游戏数据(romfs.img)","dev.installFailed": "安装失败:%@",@@ -406,7 +388,6 @@"dev.open": "在 %@ 上打开","dev.personalTeam": "个人团队","dev.refresh": "刷新",- "dev.reinstall": "重装","dev.reinstallFailed": "重装失败:%@(签名已过期时请重新签名并安装)","dev.reinstallMissing": "找不到已签名的 App:%@(请重新构建)","dev.reinstallStage": "重装到 %@",@@ -420,7 +401,6 @@"dev.resignStage": "续签并安装到 %@","dev.resigned": "已续签并安装到 %@","dev.saveFailed": "保存 IPA 失败:%@(请检查目标位置的可用空间和写入权限)",- "dev.saveIPA": "保存 IPA…","dev.saveIPATitle": "保存已签名的 IPA","dev.saveNeedsApp": "没有可打包的已签名 App:%@(请重新构建)","dev.saveStage": "打包 IPA",@@ -428,7 +408,6 @@"dev.section": "安装到设备","dev.signFailed": "签名失败:%@","dev.signStage": "为 %@ 签名",- "dev.signedApp": "已签名的 App","dev.target": "安装到","dev.team": "签名团队","dev.teamNoCert": "这个团队还没有开发证书:第一次安装时 Xcode 会自动创建(Mac 需要联网)。",@@ -669,7 +648,6 @@"library.appReady": "NX2Apple %@ 已就绪","library.artworkHint": "选择游戏的宽幅图片。图片将保留在原来的位置。","library.buildAgain": "重新构建…",- "library.buildForMac": "为 Mac 构建","library.building": "正在构建","library.changeArtwork": "更换图片…","library.chooseFolder": "游戏文件夹…",@@ -733,8 +711,10 @@"msg.buildFailed": "构建失败(退出码 %d),见下方日志","msg.buildFailedReason": "构建失败,见下方日志。最后一行:%@","msg.chainChanged": "上游代码更新了 shader 翻译链,之前构建的 shader 库无法复用——本次构建用新翻译器重建(每个版本一次,之后的构建恢复复用)。",+ "msg.done": "完成","msg.exitCode": "退出码 %d","msg.installingNsz": "选中的是 NSZ / XCZ 压缩格式,正在给构建用的 Python 安装 nsz…",+ "msg.ipaAt": "IPA:%@","msg.launchFailed": "无法启动构建脚本:%@","msg.macAppDone": "Mac App 已生成,可在访达里双击运行","msg.macAppMissing": "构建结束但没有找到 .app(仓库里缺 dm/mac/pack_app.py?)",@@ -854,9 +834,6 @@"onboarding.xcode.title": "准备好你的 Mac。","opt.bc": "兼容老设备(A15 / A16 及更早)","opt.bc.note": "在不支持 BC 纹理压缩的 GPU 上于 CPU 解压:iPhone 13 及更早、A16 的 iPad。新设备请保持关闭——GPU 路径更快",- "opt.macNoBc": "Mac App 用这台 Mac 的 GPU,不需要兼容选项",- "opt.note": "按输出类型",- "opt.title": "构建选项","pad.back": "返回","pad.manage": "管理","pad.options": "启动选项",@@ -865,7 +842,6 @@"prog.archiveDone": "游戏数据就绪:%@/romfs.img","prog.archiveReused": "复用上次的镜像(%d 个文件未变)","prog.archiveShort": "游戏数据镜像",- "prog.empty": "开始构建后,这里显示脚本自己的每个阶段","prog.eta": "还剩 %@","prog.noRomfs": "找不到解出的 RomFS","prog.title": "构建进度",@@ -954,16 +930,9 @@"section.setup": "设置","section.target": "在哪里玩","section.tools": "构建工具",- "settings.appNote": "为 Apple 设备构建游戏",- "settings.appNote2": "构建你自己的 Switch 游戏","settings.heading": "设置","settings.language": "界面语言",- "settings.language.de": "Deutsch",- "settings.language.en": "English",- "settings.language.fr": "Français",- "settings.language.sv": "Svenska","settings.language.system": "跟随系统",- "settings.language.zh": "中文","settings.note": "游戏文件夹、构建工具和应用更新,都在这里。","settings.notify": "构建完成时通知","settings.notifyNote": "仅在 NX2Apple 不在前台时,构建完成或失败都会通知",@@ -974,7 +943,6 @@"settings.setupBtn": "运行","settings.setupNote": "重新走一遍首次设置:Xcode、构建工具、密钥和游戏","shell.checkStage": "比较 %@ 上的游戏数据",- "shell.copyContinue": "继续","shell.copyExternalNote": "也可以把游戏数据 img 文件自行拷贝到外置存储设备,然后在 iOS 启动器里指定游戏数据位置,不必经由此 Mac 传输。","shell.copyIncomplete": "%@ 上的游戏数据不完整:%@。重试会补全。","shell.copyNotConnected": "%@ 目前没有连接。请用数据线连接并保持解锁。",diff --git a/tools/githooks.py b/tools/githooks.pyindex ab7599cf..10469559 100755--- a/tools/githooks.py+++ b/tools/githooks.py@@ -23,7 +23,7 @@ Check = namedtuple('Check', 'name prefixes command cwd sync')CHECKS = (Check('patch queue', ('patches/', '.upstream-ref'), 'python3 tools/engine.py check', '.', False),- Check('Qt front end', ('frontend-qt/', 'frontend/l10n/'), 'python3 -m unittest discover -s frontend-qt/tests', '.', True),+ Check('Qt front end', ('frontend-qt/', 'frontend/l10n/', 'frontend/Sources/', 'frontend/Tests/l10n-key-rules.json'), 'python3 -m unittest discover -s frontend-qt/tests', '.', True),Check('tools', ('tools/',), 'python3 -m unittest discover tools/tests', '.', True),Check('triage scripts', ('.github/scripts/',), 'python3 -m unittest discover -s .github/scripts/tests', '.', True),Check('Mac launcher (slow)', ('frontend/',), 'swift build && swift test', 'frontend', True),