[Theme Check] MatchingTranslations rule handling Customer Accounts translations incorrectly
@karreiro is already working on this.
Since May 8, 2025.
- Dominant language
- TypeScript
- Stars
- 234
- Forks
- 92
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
Describe the bug
When running shopify theme check, the MatchingTranslations reports errors for the customer_accounts. namespaced translations when a merchant has changed one or more of the Customer Accounts translations.
When the merchant changes one of the Customer Accounts translations, the changed string gets added to the theme locale JSON file under the customer_accounts namespace. However only the changed line gets added and only to the changed language's locale JSON file, causing Theme Check to then report the MatchingTranslations error as the translation is missing from the other locales.
The customer_accounts. translations all exist, and are visible in the Admin under in Languages and in Translate & Adapt, but they don't exist in a themes locales JSON files. This is the same behaviour as how Checkout translations are handled.
Expected behaviour
The MatchingTranslations rule should ignore translations that start with customer_accounts., similarly to how it ignores translations starting shopify.
Actual behaviour
The MatchingTranslations rule reports missing translations when a customer_accounts. translation does not appear in every locale file.
Additional context
This issue isn't an problem with Checkout translations, as these get added under the shopify namespace, which is excluded by the isShopifyPath check in the MatchingTranslations rule - https://github.com/Shopify/theme-tools/blob/90577cd2b5381eb6b8c50cde00186dccf0088577/packages/theme-check-common/src/checks/matching-translations/index.ts#L51
Updating that function to also return true for paths starting customer_accounts. would fix the issue:
const isShopifyPath = (path: string) => path.startsWith('shopify.') || path.startsWith('customer_accounts.');
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.