Skip to content

Translate the Siri phrases - #5673

Merged
bgoncal merged 2 commits into
mainfrom
siri-phrase-translations
Sep 6, 2026
Merged

Translate the Siri phrases#5673
bgoncal merged 2 commits into
mainfrom
siri-phrase-translations

Conversation

@bgoncal

@bgoncal bgoncal commented Sep 6, 2026

Copy link
Copy Markdown
Member

AI Policy

Select exactly one option that describes AI usage in this contribution:

  • I have not used AI for this contribution.
  • AI assistance was used for this contribution.
  • AI fully generated the code for this contribution, but I've reviewed and understood it before submitting and will respond without AI during review.

Summary

The Siri phrase tables were English in all 34 languages — they were copied across rather than translated — so Siri only ever matched an English phrase. They were also out of date, still listing activate a scene, assist and what is on after those shortcuts were removed, and missing the four phrases added since.

Every phrase is now written as a natural spoken command in each language rather than a literal translation, with the ${...} tokens left untouched. Word order moves where it should: turn on X is X einschalten in German, and puts the app name first in Japanese.

AppShortcuts.strings no longer goes to Lokalise. A phrase has to be something a person would actually say to Siri, which is not what a string-table round trip produces — the upload lane now skips the file, and the download lane restores it if the export writes it back.

Screenshots

No UI. The phrases are what Siri listens for.

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

Nothing generates this file, so it drifts whenever a phrase changes — which is how it got stale. A check comparing the phrases in HomeAssistantAppShortcuts.swift against the table would catch that in CI, the way check-unused-strings does for Localizable.strings. Happy to add it if wanted.

The phrase tables were English in every language: they were copied across
rather than translated, so Siri only ever matched English. They were also out
of date, still listing three shortcuts that no longer exist and missing the
four added since.

Every phrase is now written as a natural spoken command in each language
rather than a literal translation, with the tokens left untouched.

Lokalise no longer receives the file. A phrase has to be something a person
would actually say, and word order moves with the language — "turn on X" is
"X einschalten" in German and puts the app name first in Japanese. That is not
work a string table round trip does well, so the upload skips it and the
download restores it.
Copilot AI lite review requested due to automatic review settings September 6, 2026 21:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes consistently update Siri phrase tables across locales and adjust the Lokalise pipeline to prevent unintended overwrites without introducing code-path risk.

Pull request overview

Updates the app’s Siri/App Intents phrase localization by replacing previously English-only phrase tables with natural-language phrases per locale, and adjusts the Lokalise sync pipeline so these phrase tables remain hand-maintained.

Changes:

  • Replaced AppShortcuts.strings contents across all supported locales with up-to-date, localized Siri phrase templates (keeping ${...} tokens intact).
  • Removed stale/obsolete phrase templates (e.g., previously removed shortcuts) and added missing templates used by current shortcuts (including ${action} templates for open/close).
  • Updated Fastlane Lokalise lanes to skip uploading AppShortcuts.strings and to restore the repo-committed versions after Lokalise export.
File summaries
File Description
Sources/App/Resources/bg.lproj/AppShortcuts.strings Localized Siri phrase templates for Bulgarian.
Sources/App/Resources/ca-ES.lproj/AppShortcuts.strings Localized Siri phrase templates for Catalan (Spain).
Sources/App/Resources/cs.lproj/AppShortcuts.strings Localized Siri phrase templates for Czech.
Sources/App/Resources/cy-GB.lproj/AppShortcuts.strings Localized Siri phrase templates for Welsh (UK).
Sources/App/Resources/da.lproj/AppShortcuts.strings Localized Siri phrase templates for Danish.
Sources/App/Resources/de.lproj/AppShortcuts.strings Localized Siri phrase templates for German.
Sources/App/Resources/el.lproj/AppShortcuts.strings Localized Siri phrase templates for Greek.
Sources/App/Resources/en.lproj/AppShortcuts.strings Updated canonical English Siri phrase templates and removed obsolete entries.
Sources/App/Resources/en-GB.lproj/AppShortcuts.strings Localized Siri phrase templates for English (UK).
Sources/App/Resources/es.lproj/AppShortcuts.strings Localized Siri phrase templates for Spanish (LatAm).
Sources/App/Resources/es-ES.lproj/AppShortcuts.strings Localized Siri phrase templates for Spanish (Spain).
Sources/App/Resources/es-MX.lproj/AppShortcuts.strings Localized Siri phrase templates for Spanish (Mexico).
Sources/App/Resources/et.lproj/AppShortcuts.strings Localized Siri phrase templates for Estonian.
Sources/App/Resources/fi.lproj/AppShortcuts.strings Localized Siri phrase templates for Finnish.
Sources/App/Resources/fr.lproj/AppShortcuts.strings Localized Siri phrase templates for French.
Sources/App/Resources/he.lproj/AppShortcuts.strings Localized Siri phrase templates for Hebrew.
Sources/App/Resources/hu.lproj/AppShortcuts.strings Localized Siri phrase templates for Hungarian.
Sources/App/Resources/id.lproj/AppShortcuts.strings Localized Siri phrase templates for Indonesian.
Sources/App/Resources/it.lproj/AppShortcuts.strings Localized Siri phrase templates for Italian.
Sources/App/Resources/ja.lproj/AppShortcuts.strings Localized Siri phrase templates for Japanese.
Sources/App/Resources/ko-KR.lproj/AppShortcuts.strings Localized Siri phrase templates for Korean (KR).
Sources/App/Resources/ml.lproj/AppShortcuts.strings Localized Siri phrase templates for Malayalam.
Sources/App/Resources/nb.lproj/AppShortcuts.strings Localized Siri phrase templates for Norwegian Bokmål.
Sources/App/Resources/nl.lproj/AppShortcuts.strings Localized Siri phrase templates for Dutch.
Sources/App/Resources/pl-PL.lproj/AppShortcuts.strings Localized Siri phrase templates for Polish (PL).
Sources/App/Resources/pt-BR.lproj/AppShortcuts.strings Localized Siri phrase templates for Portuguese (Brazil).
Sources/App/Resources/ru.lproj/AppShortcuts.strings Localized Siri phrase templates for Russian.
Sources/App/Resources/sl.lproj/AppShortcuts.strings Localized Siri phrase templates for Slovenian.
Sources/App/Resources/sv.lproj/AppShortcuts.strings Localized Siri phrase templates for Swedish.
Sources/App/Resources/tr.lproj/AppShortcuts.strings Localized Siri phrase templates for Turkish.
Sources/App/Resources/uk.lproj/AppShortcuts.strings Localized Siri phrase templates for Ukrainian.
Sources/App/Resources/vi.lproj/AppShortcuts.strings Localized Siri phrase templates for Vietnamese.
Sources/App/Resources/zh-Hans.lproj/AppShortcuts.strings Localized Siri phrase templates for Chinese (Simplified).
Sources/App/Resources/zh-Hant.lproj/AppShortcuts.strings Localized Siri phrase templates for Chinese (Traditional).
fastlane/lanes/localization.rb Excludes AppShortcuts.strings from Lokalise upload and restores committed files after export to prevent stale overwrites.
Review details
  • Files reviewed: 35/35 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

A phrase may interpolate a single parameter, and the pair used two: the verb
and the entity. The build tool rejects that once the phrases are declared,
which is why it went unnoticed while the table was stale.

Open and close are now a shortcut each, with the verb fixed on the intent and
the entity the one thing a phrase names. The wording is better for it: "open
the curtain" rather than a verb expanded from a parameter.
@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.60%. Comparing base (7bb4b5a) to head (4c6a444).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5673      +/-   ##
==========================================
+ Coverage   36.41%   36.60%   +0.19%     
==========================================
  Files        1064     1064              
  Lines       74949    75248     +299     
==========================================
+ Hits        27292    27546     +254     
- Misses      47657    47702      +45     
Files with missing lines Coverage Δ
...ities/AppShortcuts/HomeAssistantAppShortcuts.swift 100.00% <100.00%> (ø)
.../AppIntents/Control/OpenCloseEntityAppIntent.swift 100.00% <100.00%> (ø)

... and 45 files with indirect coverage changes

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bgoncal
bgoncal merged commit 385c1e6 into main Sep 6, 2026
15 checks passed
@bgoncal
bgoncal deleted the siri-phrase-translations branch September 6, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants