What's your biggest current challenge? Have your say in Community Polls along the right column.

How can I sync translations between two themes in Github?

How can I sync translations between two themes in Github?

CarlBrgs
Shopify Partner
9 0 2

Hi! 

I am currently using Translate&Adapt as a translation application. My goal is to be able to retrieve translations associated with an existing theme, synced with Github, for a second theme that is also synced to a Github repository. In fact, when I wanted to change my published theme and change the language of my website via a language switcher, the pages were not translated at all due to "broken translations" since the "correct translations" were not synced with the new theme. I would like to know how to perform this synchronization.


I noticed that when I localized the different untranslated texts in  Translate&Adapt, there are ids associated with each translation, so I suppose that these ids are linked to the first theme and that it is necessary to either modify them or make the second theme point to these ids (I don't know if this is really possible).

Anyway, I am open to any proposals for solutions, thank you in advance!

Replies 5 (5)

richbrown_staff
Shopify Staff
652 96 167

Hi @CarlBrgs , we'd love this to be possible and the issue you identified is exactly the reason translations don't copy from one theme to another. It is something that is on our roadmap. In the mean time, either duplicate the theme - whereupon the IDs stay the same - or there would need to be some custom code that matches text in the source language. I believe some third party apps can do this.

To learn more visit the Shopify Help Center or the Community Blog.

CarlBrgs
Shopify Partner
9 0 2

Hi! Thank you for your feedback but it seems like I didn't clearly explain my problem so I will explain exactly what I did:

  • I cloned the published theme's Github repository to a second repository
  • I connected the second repository to the store (it was therefore in an unpublished state)
  • I made modifications to the language switcher in the unpublished theme
  • I published the theme connected to the second Github repository
  • I noticed that the contents of different sections were not translated.

It should be noted that this repository change is something that cannot be avoided (otherwise, we would have made the changes directly to the published theme)."

I also asked my question here: https://stackoverflow.com/questions/75246913/shopify-new-github-repository-translation-issue



richbrown_staff
Shopify Staff
652 96 167

Hi @CarlBrgs sorry for slow response, did this get solved or do you still need help? A good starting point would be to publish the old theme and then export your Translations CSV, then publish the new theme and export the Translations CSV again, and then compare and contrast to see if it shows obvious omissions or errors. What you're doing is an advanced workflow that we don't easily support but we'd want to help make possible.

To learn more visit the Shopify Help Center or the Community Blog.

jo-elbdev
Shopify Partner
1 0 0

Hi there,

 

we do have exact the same problem in one of our stores. did you solve the problem and maybe share it to us? 🙂

dtkinger
Shopify Partner
4 0 1

Hi @CarlBrgs I just wanted to say that I'm having the exact same issue using this workflow - I wanted to control my theme versions on GitHub but the themes I uploaded to Shopify from GitHub had entirely different translation IDs, breaking everything. And there was no indication it would happen since the translations seem to be stored in Shopify's CMS and not in the theme files. I can't tell you how much I wish translations were in the locale/xx.json or some similar theme file that could be git compared...

 

I'm curious if you found a way to map one theme's exported CSV to another to help reconcile. In my case, I have 3 exported CSV versions and the translations were made by someone else... so a manual reconciliation is daunting. 

 

Maybe you've solved the issue manually by now, but let me know if you're interested in collaborating on something programatic.