[Bug]: Theme translations are lost when pulling / pushing between different themes
Please confirm that you have:
- [x] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
- [x] Reproduced the issue in the latest CLI version.
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Using shopify theme pull with the published theme, followed by shopify theme push --unpublished should preserve theme translations in the new unpublished theme. This is particularly relevant for CI/CD, where an automation may pull the latest content changes from the published theme and queue up a new unpublished theme for a release.
Actual behavior
Translations are not preserved. The translations have to be manually exported while the original theme is published. Once the new theme is created the theme ID has to be replaced in the translation .csv. Then the new theme has to be published, and finally the translations need to be imported. This is error prone and makes CI/CD using a blue-green deployment strategy impossible.
Verbose output
n/a
Reproduction steps
- Use
shopify theme pullto pull the published theme - Merge a branch that contains a new feature you want to release
- Run
shopify theme push --unpublishedto create a new on-deck theme with your new feature, while preserving the previously published theme so you can roll back etc. - See that translations are not carried over from the live theme to the new theme
Operating System
Mac OS Ventura
Shopify CLI version (check your project's package.json if you're not sure)
All
Shell
No response
Node version (run node -v if you're not sure)
No response
What language and version are you using in your application?
No response
👋 Hey @nboliver-ventureweb,
Could you please confirm if you're using the "Shopify Translate & Adapt" app to power your translations?
If that's the case, that app has the limitation that it gets attached to the theme instance, so the new theme wouldn't really get the translations from the published one. While that's not ideal, it's the current behavior of that app, and the best way to change that is by reporting through the app.
If that's not the case, could you please share an example of a locales/* file that differs between the published and the new theme?
Thank you for reporting this! :)
Hi @karreiro,
Thanks for the quick reply. The issue is specifically for user-provided translations of theme sections. As I understand it, those translations are stored in the same place in Shopify Admin (Settings > Languages) regardless of whether you use a CSV, or an app such as Translate & Adapt to mange them.
While those translations are attached to a specific theme instance via theme ID, when you manually duplicate a theme in Shopify Admin (... context menu > Duplicate), translations are carried over to the new theme.
Perhaps there could be a flag on the push command to facilitate this? It could allow you to pass a theme ID for a translation source, or use the published theme as the source. Something like:
shopify theme push --unpublished --copy-translations
or
shopify theme push --unpublished --copy-translations <source theme id>
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
Still relevant!
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
Still relevant!
Still relevant!
Still relevant.
Still relevant 👍 It would be incredibly helpful if newly added GitHub-connected themes could automatically inherit the published theme’s translations. Alternatively, having an option in the admin panel to select a theme and transfer translations across would be fantastic.
Currently, the only workaround I can think of is to export the language CSV, find all content matching the published theme’s ID, duplicate it, and replace those IDs with the new connected theme’s ID.
A more streamlined solution would be greatly appreciated!
👋 Hey everyone,
I've shared this issue internally with the team that maintains the "Shopify Translate & Adapt" app to ensure they are aware of this limitation.
I also highly recommend using the support channel in the app, as it's the best way to request this enhancement.
With this in mind, I'm closing this issue, as it can't be fixed at the CLI level.
Thanks for bringing this up tho!