How to push all sources to transifex

My question is as the title says. Which command should l use?

Can anybody help me with it. Thanks!

Hello @mendax1234,

I hope you’re doing well!

To push all content to Transifex, per our doc, it’s as simple as “tx push”…

Of course, any source files need to be added first.

Does this help?

Regards,
Ryan
Transifex Customer Support

Thanks , l have found the problem. l didn’t use tx config to add my sources. Howevre , when using tx config, l wonder whether l can change the source name. For example, in the code below, l have a source called index.pot. However, l have another souce called index.pot but it is in another folder but when l use the tx config, it just generate the same project , that will cover the first one. Is there any method to avoid it?

[6940swerve-docs.index-pot]
file_filter = docs/locales/<lang>/LC_MESSAGES/index.po
minimum_perc = 0
source_file = docs/build/gettext/index.pot
source_lang = en
type = PO

Thanks for replying

– James

Hello mendax1234,

Thank you for reaching out to Transifex.

I am Antonis, a support engineer from the Transifex support team.

Please note that the tx config command is not supported in the newest version of the client. You can find information about installing and using the new client here.

Specifically for this case, even if the files have the same filename by uploading them to transifex, they are assigned a unique slug (for example index-pot-1 and index-pot-2). To add each source you can use the tx add command and go through the interactive setup to add those 2 files and then when you push them to transifex 2 unique resource slugs will be created, one for each file.

If you are familiar with the process you can also manually add your sources to the config file with the following format:

[o:organizationname:p:projectname:r:resourcename]
file_filter = SourceFiles//example.po
source_file = SourceFiles/example.po
type = PO
minimum_perc = 0

If you have any further questions, please feel free to contact us and we will be happy to assist you!

Kind regards,
Antonis

1 Like

Thanks, after l have translated a source file on the transifex and pull it on my locale, l still can’t see the translation website. l use read the docs to build. Can you help me with it. This is my repo: mendax1234/6940Swerve-docs: FRC Team 6940’s Swerve whitepaper (github.com)

Hello mendax1234,

Do you translate a resource locally, and push the file but the translations do not appear? It would be helpful if you could provide us with more information about what actions you’re taking, what is the expected result and what you’re seeing instead.

If you have any further questions, please feel free to contact us and we will be happy to assist you!

Kind regards,
Antonis

I have translated the file on the transifex and pulled it from transifex. And l have pushed these files to my Github repo . But the website just doesn’t have the translation.

Hello mendax1234,

I checked the files in your repo and I see that they are translated properly to zh_CN. Since your project is File Based and the files are now in your GitHub repo the only step left is to deploy those files to your website so that you can see the translations.

If you have any further questions, please feel free to contact us and we will be happy to assist you!

Kind regards,
Antonis

Thanks, l have deployed it to the website, but it seems that the translation didn’t appear.

Hello mendax1234,

This falls outside the scope of Transifex since your files were translated properly and pulled from our service to Github. Did you receive any kind of error during deployment? It would also be helpful if you would let us know what the site looks like now and what you expected to see instead.

If you have any further questions, please feel free to contact us and we will be happy to assist you!

Kind regards,
Antonis

There is no error, l have checked it twice. I use read the docs to deploy my website. When l change my website to the translated version, the part l have circled shoule display the translated language (zh_CN) but it is still English. In the image below, you can see that.


l have translated the part that l have circled in the image and commit to the Github. However , it seems that the translated content doesn’t appear on the website. l am very confused about it. l have also double checked my code, but since l am a rookie in Transifex , l think there is no problem with it. Can you help me dig into it. If you want the read the docs project, here it is. 6940Swerve-docs | Read the Docs l have created a sub-project of this project as a translated version.

James

Hello James,

Since you translated the files and the translations are visible on Github you have successfully used Transifex to translate your files and sync them to your repo. For reference a sample of the text you have circled localized in zh_CN:

As a result, the issue seems to occur after Transifex and the support I can provide you there is limited. Your best course of action would be to speak with Readthedocs’ support and let them know about the translations not appearing. If they identify the issue to be something that originates from Transifex please let us know about it so that we can help you resolve it.

If you have any further questions, please feel free to contact us and we will be happy to assist you!

Kind regards,
Antonis

1 Like

Thanks, l have asked them and l am waiting for their reply.

James