Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Theme translations are lost when pulling / pushing between different themes #4486

Open
2 tasks done
nboliver-ventureweb opened this issue Sep 19, 2024 · 6 comments
Open
2 tasks done
Labels
Area: @shopify/theme @shopify/theme package issues Severity: 3 Normal Severity Type: Bug Something isn't working

Comments

@nboliver-ventureweb
Copy link

Please confirm that you have:

  • 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.)
  • 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

  1. Use shopify theme pull to pull the published theme
  2. Merge a branch that contains a new feature you want to release
  3. Run shopify theme push --unpublished to create a new on-deck theme with your new feature, while preserving the previously published theme so you can roll back etc.
  4. 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

@nboliver-ventureweb nboliver-ventureweb added the Type: Bug Something isn't working label Sep 19, 2024
@karreiro
Copy link
Contributor

karreiro commented Sep 20, 2024

👋 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! :)

@nboliver-ventureweb
Copy link
Author

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>

Copy link
Contributor

github-actions bot commented Nov 2, 2024

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.

@nboliver-ventureweb
Copy link
Author

Still relevant!

@mgmanzella mgmanzella added Severity: 3 Normal Severity and removed Theme Sev-3 labels Dec 5, 2024
Copy link
Contributor

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.

@nboliver-ventureweb
Copy link
Author

Still relevant!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues Severity: 3 Normal Severity Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants