Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Tools/doc_comment_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
6 changes: 4 additions & 2 deletions Tools/test_home_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
Loading