Transifex howto : how to use it

Yes, you’ve been invited to become maintainer of “nethserver” project on Transifex! /cc @translations_team

As such you can upload resources to “nethserver” with the tx client.

https://www.transifex.com/nethserver/nethserver/content/

More info

2 Likes

I like the idea to have all in one package, is much simpler to maintain.
Eventually, you could hide one tab if the relevant module is not installed but I don’t think it is really necessary.

Anyone else has different thoughts?

2 Likes

excellent!!!

Ok now I need to understand how it works, since I see that I have the privilege to make the noise :’(

I used first nethserver-ddclient that in 2015 you did the translation @davidep

I did first

[lsd@leo nethserver-ddclient]$ tx push -s
Pushing translations for resource nethserver.DdClient:
Exception: No user credentials found for host https://www.transifex.com. Edit ~/.transifexrc and add the appropriate info in there.

then I created the ~/.transifexrc

[https://www.transifex.com]
hostname = https://www.transifex.com
username = USERNAME
password = PASSWORD
token = 

it seems good.

[lsd@leo nethserver-ddclient]$ tx push -s
Pushing translations for resource nethserver.DdClient:
Pushing source file (root/usr/share/nethesis/NethServer/Language/en/NethServer_Module_DdClient.php)
Done.

But when I go to transiflex, I don’t see in the ddclient ressource an update on the english ressource. Moreover I don’t see the ressource ddclient in nethserver-v6.

I can see it under nethserver project: https://www.transifex.com/nethserver/nethserver/translate/#it/DdClient/48148609

You need to specify it inside tx configuration:

I sent an invitation for nethserver-v6 to @stephdl :blush:

1 Like

good to know, I did my first error, fortunately with not too much risks because NS7 and NS6 are identical on the point of translations files.

I did

tx pull -a

then I have a lot more of translations now

New translations found for the following languages:ru_RU, el, ro, nl, pt, fr_FR, sr, de, pt_BR, it, cs_CZ, tr, lt, ar, sv_SE, fil, uk, sl, hu, es
Pulling new translations for resource nethserver.DdClient (source: root/usr/share/nethesis/NethServer/Language/en/NethServer_Module_DdClient.php)
 -> ru_RU: .tx/nethserver.DdClient/ru_RU_translation
 -> el: .tx/nethserver.DdClient/el_translation
 -> ro: .tx/nethserver.DdClient/ro_translation
 -> nl: .tx/nethserver.DdClient/nl_translation
 -> pt: .tx/nethserver.DdClient/pt_translation
 -> fr_FR: .tx/nethserver.DdClient/fr_FR_translation
 -> sr: .tx/nethserver.DdClient/sr_translation
 -> de: .tx/nethserver.DdClient/de_translation
 -> pt_BR: .tx/nethserver.DdClient/pt_BR_translation
 -> it: .tx/nethserver.DdClient/it_translation
 -> cs_CZ: .tx/nethserver.DdClient/cs_CZ_translation
 -> tr: .tx/nethserver.DdClient/tr_translation
 -> lt: .tx/nethserver.DdClient/lt_translation
 -> ar: .tx/nethserver.DdClient/ar_translation
 -> sv_SE: .tx/nethserver.DdClient/sv_SE_translation
 -> fil: .tx/nethserver.DdClient/fil_translation
 -> uk: .tx/nethserver.DdClient/uk_translation
 -> sl: .tx/nethserver.DdClient/sl_translation
 -> hu: .tx/nethserver.DdClient/hu_translation
 -> es: .tx/nethserver.DdClient/es_translation
Done.

Now my question is how to add them to /usr/share/nethesis/NethServer/Language ?

does it is the job of make-rpms ?

1 Like

As a developer you should push the source only. Then translators localize the source strings. Finally localized strings are merged in nethserver-lang repository and the RPMs are created there.

So your command as developer is

tx push -s

every time you modify the interface, or todo or any other localized resource.

Beware that command overwrites existing resources!

ok, so all is centralised inside one rpm, I missed that point, what is the release frequency of this rpm, does it is a manual or an automatic build ???

It is manual, it depends on the development/translation teams activity… I’d give you write access to nethserver-lang, too!

Next question :slight_smile:

When I add a new resource, like for nethserver-diagtools, or any other needed rpm, I can see a name convention for example ‘for_use_nethserver_Bandwidthd_en.php’.

So my question is how to create a new resource, I can see that I can drag and drop a file, does it is directly the NethServer_Module_DiagTools.php english translation file ?

IIRC I always use tx push -s. The resource is createad according to your “.tx/config” file.

See also

https://github.com/NethServer/nethserver-lang/blob/master/README.rst
http://docs.nethserver.org/projects/nethserver-devel/en/v7rc/i18n.html

And txinit.sh, the helper that creates the .tx/config file:

https://gist.github.com/DavidePrincipi/8e4d4e97831d0850f01a

1 Like

Got it :stuck_out_tongue:

tx push -s
Pushing translations for resource nethserver-v6.DdClient:
Pushing source file (root/usr/share/nethesis/NethServer/Language/en/NethServer_Module_DdClient.php)
Resource does not exist.  Creating...
Done.
3 Likes

In nethserver-v6, I see 37 untranslated strings for Italian from DDClient!

I did a misunderstood the first time I used your script txinit.sh, I waited a (short) time during the question

Transifex instance [https://www.transifex.com]:

then I interrupted the script by ctrl+c…my human error, the issue is that the main section was not created, but the file, yes of course. Maybe it needs to add ‘https://www.transifex.com (enter default)’

just for training, I did a ‘tx push -s’ in nethserver-diagtools, then the resource was created as expected in transiflex. Therefore now the the merge to nethserver-lang is done manually, or by an automatic process ?

The description of the build steps:

1 Like

Ok I can clone the repo, pull the new transifex files (some new translations), build the rpm with make-rpms (I have an issue during the installation of nethserver-mock, but it is another post), then I need to do/test the rpms and do a PR, then upload to testing the rpm

Issue not related to NS but tied to PIP

1 Like

You can push directly to master if you feel confident :wink:

let me play a bit :wink:

1 Like