Translate the Siri phrases - #5673
Conversation
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.
There was a problem hiding this comment.
🟢 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.stringscontents 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.stringsand 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 Report✅ All modified and coverable lines are covered by tests. 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
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AI Policy
Select exactly one option that describes AI usage in this contribution:
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,assistandwhat is onafter 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.stringsno 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.swiftagainst the table would catch that in CI, the waycheck-unused-stringsdoes forLocalizable.strings. Happy to add it if wanted.