diff --git a/Tools/doc_comment_lint.py b/Tools/doc_comment_lint.py index a82755c2a6..b25c32c920 100644 --- a/Tools/doc_comment_lint.py +++ b/Tools/doc_comment_lint.py @@ -130,7 +130,11 @@ def main() -> int: scanned += 1 found = findings(path) if found: - rel = str(path.relative_to(ROOT)) + # as_posix(), not str(): the baseline is written with forward slashes, so on Windows + # str() yields "android\app\..." and every baseline lookup misses. That made the gate fail + # on a clean tree there (every grandfathered site read as a regression, and every + # baselined file as IMPROVED -> 0), so a Windows contributor could not run it locally. + rel = path.relative_to(ROOT).as_posix() by_file[rel] = [f"{rel}:{ln} {why}" for ln, why in found] regressions = [h for f, hs in sorted(by_file.items()) diff --git a/Tools/test_home_i18n.py b/Tools/test_home_i18n.py index ce2da56f11..8c140b7ba8 100644 --- a/Tools/test_home_i18n.py +++ b/Tools/test_home_i18n.py @@ -505,7 +505,9 @@ def test_apple_home_semantic_display_contracts(self) -> None: self.assertNotIn('result.copy.contains("numbers agree")', (ROOT / "Strand/Screens/SkinTempCardsView.swift").read_text(encoding="utf-8")) self.assertIn('String(localized: "RHR +\\(delta)")', app_model) self.assertIn('String(localized: "HRV −\\(percent)%")', app_model) - self.assertIn('String(localized: "Skin temperature +\\(temperature) °C")', app_model) + # 240c48ae (#1671): the label now carries the reader's unit via UnitFormatter.skinTempSignalPhrase, + # so the sign and the hardcoded °C moved out of the localized literal. + self.assertIn('String(localized: "Skin temperature \\(temperature)")', app_model) self.assertIn('String(localized: "Respiration up")', app_model) self.assertIn("public enum Evidence", readiness) @@ -521,7 +523,7 @@ def test_apple_home_semantic_display_contracts(self) -> None: strings = audit.load_catalog(ROOT / "Strand/Resources/Localizable.xcstrings")["strings"] for key in ( - "RHR +%lld", "HRV −%lld%%", "Skin temperature +%@ °C", "Respiration up", + "RHR +%lld", "HRV −%lld%%", "Skin temperature %@", "Respiration up", "%@ vs %@ %@", "7d %@ / 28d %@", "monotony %@", ): self.assertIn(key, strings)