# Is there a script between Github and Transifex?

**URL:** <https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249>\
**Category:** Translations Team Discussion\
**Created:** [January 8, 2019, 8:45pm UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249 "2019-01-08T20:45:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdtrooper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mdtrooper/32/1524_2.png) [@mdtrooper](https://discourse.cataclysmdda.org/u/mdtrooper)\
**Post date:** [January 8, 2019, 8:45pm UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/1 "2019-01-08T20:45:12Z")

</div>

Hi.

I have changed some strings (they are from argentina .po file).

And I have tried to upload with Transifex web form, but it returned error 500.

And I wonder that “Is there a script between Github and Transifex?” That script updates the translations bidirectionally G -\> T and T -\> G.

Because I can upload the po file (with the new strings) to github and the script will update the translations into Transifex.

Or is the process manually? There is a person who donwloads the po files from Transifex and commits these files to Github.

Regards.

---

<div class="post-metadata">

**Author:** ![anothersimulacrum](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/anothersimulacrum/32/10770_2.png) [@anothersimulacrum](https://discourse.cataclysmdda.org/u/anothersimulacrum)\
**Post date:** [January 8, 2019, 11:05pm UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/2 "2019-01-08T23:05:09Z")

</div>

> [@mdtrooper](#):
>
> Or is the process manually? There is a person who donwloads the po files from Transifex and commits these files to Github.

See [PR #27427](https://github.com/CleverRaven/Cataclysm-DDA/pull/27427).

---

<div class="post-metadata">

**Author:** ![Noctivagante](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctivagante/32/365_2.png) [@Noctivagante](https://discourse.cataclysmdda.org/u/Noctivagante)\
**Post date:** [January 8, 2019, 11:30pm UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/3 "2019-01-08T23:30:13Z")

</div>

mdtrooper, are you trying to translate some of the strings from the argentinian translation?

---

<div class="post-metadata">

**Author:** ![mdtrooper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mdtrooper/32/1524_2.png) [@mdtrooper](https://discourse.cataclysmdda.org/u/mdtrooper)\
**Post date:** [January 9, 2019, 12:40am UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/4 "2019-01-09T00:40:26Z")

</div>

No, sorry. I have been trying to get some translate strings from argentinian translation to fill the spanish translation.

---

<div class="post-metadata">

**Author:** ![Noctivagante](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctivagante/32/365_2.png) [@Noctivagante](https://discourse.cataclysmdda.org/u/Noctivagante)\
**Post date:** [January 9, 2019, 12:42am UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/5 "2019-01-09T00:42:07Z")

</div>

Van a tener que ponerme en los créditos de la traducción española también…  
😉

---

<div class="post-metadata">

**Author:** ![mdtrooper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mdtrooper/32/1524_2.png) [@mdtrooper](https://discourse.cataclysmdda.org/u/mdtrooper)\
**Post date:** [January 9, 2019, 12:47am UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/6 "2019-01-09T00:47:59Z")

</div>

> [@anothersimulacrum](#):
>
> See [PR #27427](https://github.com/CleverRaven/Cataclysm-DDA/pull/27427).

Thanks, I see it. But is there the reverse process? somebody uploads the po files from github to transifex.

Because I afraid to upload (as pull request) the changes into po file to github and the changes maybe will lost in the next time that BrettDong will upload the files from transifex to github.

---

<div class="post-metadata">

**Author:** ![mdtrooper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mdtrooper/32/1524_2.png) [@mdtrooper](https://discourse.cataclysmdda.org/u/mdtrooper)\
**Post date:** [January 9, 2019, 12:50am UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/7 "2019-01-09T00:50:00Z")

</div>

> [@Noctivagante](#):
>
> Van a tener que ponerme en los créditos de la traducción española también…

_They’re going to have to put me in the credits of the Spanish translation too …_

Don’t worry, you will be in the credits of the Spanish translation.

---

<div class="post-metadata">

**Author:** ![brettdong](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@brettdong](https://discourse.cataclysmdda.org/u/brettdong)\
**Post date:** [January 9, 2019, 11:46am UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/8 "2019-01-09T11:46:22Z")

</div>

If you want to contribute to the translation, just register an account on Transifex and use Transifex web UI to do your work.

---

<div class="post-metadata">

**Author:** ![mdtrooper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mdtrooper/32/1524_2.png) [@mdtrooper](https://discourse.cataclysmdda.org/u/mdtrooper)\
**Post date:** [January 10, 2019, 12:45am UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/9 "2019-01-10T00:45:11Z")

</div>

Yes, it is good. I am spanish translator for CataclysmDDA more or less from two years ago. And I help in the translation with web UI.

But now I want to fill the spanish po file with some translated strings from argentinian po file and I cannot do this action with web UI. Then this is the reason for ask about:

- Can I upload the spanish po file (with some new translated strings) to github…and somebody or something sincronize this new tranlated strings in the web UI?

Or the main source is the DB transifex and the only direction is Transifex -\> github.

---

<div class="post-metadata">

**Author:** ![brettdong](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@brettdong](https://discourse.cataclysmdda.org/u/brettdong)\
**Post date:** [January 10, 2019, 2:40am UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/10 "2019-01-10T02:40:20Z")

</div>

GitHub is just a mirror of translation data on Transifex. Translation work should be done on Transifex. If you want to upload a .po file to Transifex, you may mail me your .po file and I can push it to Transifex for you, but that will overwrite the entire Spanish translation on Transifex. So please ensure that you are working on a latest copy of Spanish translation from Transifex, or other translators’ contribution could be lost after the push.

---

<div class="post-metadata">

**Author:** ![mdtrooper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mdtrooper/32/1524_2.png) [@mdtrooper](https://discourse.cataclysmdda.org/u/mdtrooper)\
**Post date:** [January 10, 2019, 10:08am UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/11 "2019-01-10T10:08:52Z")

</div>

Thanks.

I will try to work with the Transifex api.

---

<div class="post-metadata">

**Author:** ![mdtrooper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mdtrooper/32/1524_2.png) [@mdtrooper](https://discourse.cataclysmdda.org/u/mdtrooper)\
**Post date:** [January 11, 2019, 5:07pm UTC](https://discourse.cataclysmdda.org/t/is-there-a-script-between-github-and-transifex/18249/12 "2019-01-11T17:07:23Z")

</div>

I have made a script in python:

- connect to Transifex across the api
- get spanish and argentinian translations (as json data)
- loop empty strings of spanish and  
– check if it exists in argentinian  
– show the argentinian strings  
– the human press enter or Y to upload the same translation to spanish (with Transifex api)

Well, the source code it is hardcoded for this case, but it can be generic for other uses.

And at the moment (this two days) I fill more or less 350 strings from argentinian to spanish 😃 .

> <https://gitlab.com/tres-14159/y_otras_yerbas/blob/master/transifex_api/megascript_transifex.py>
