How to manage translations as they are added by release? - ruby-on-rails

I work on a RoR website that is translated into a number of languages. It's a real pain to manage the "what's new to translate" for each release. We have to collect all the new keys and send them out in a spreadsheet to the translation team. So, my question is:
How do people structure their locales files and manage the addition of new keys so that it's easy and painless to communicate changes to the translation team?

http://www.github.com/mynewsdesk/translate
This is really awesome though won't organise your languages translation yml's into any particular categorised structure. It will insert the word "missing" however, where necessary and remove orphaned entries.
You might also wish to look at the textmate bundle.

I wrote a gem to solve the "what's new to translate problem"
https://github.com/zoodles/vocab
After you install the gem, you run the following command:
vocab init
This will save a reference to the current git master SHA to a file called .vocab
After adding strings to the site, you run:
vocab extract rails
This will generate a yml file containing all the english keys and strings that have been added since the commit represented by the SHA in .vocab. You can send this file to translators for translation.
When the translations come back from translators, you can run the command:
vocab merge rails
This will put the translated values in all the correct yml files under config/locales.

We recently switched to https://webtranslateit.com/. A great tool for managing our locales. Just push up the latest master locale yml file to their web service and it will flag all new string as untranslated and it even track changes on old strings and mark them as "Need Verification".
My colleague wrote a blog post about our translation workflow for a couple of days ago.

I would suggest some simple ways. We follow the first one -
Always maintain the entries in the locale files sorted on the key. This will help you to find out the extras/missing by doing a simple diff using any diff tool
Put a marker at the end of file after previous release and add new key-values at the end of the file

Easy actually... The best thing to do is to send the translation team your complete English language file. If they are professionals, they are using a translation memory tool such as Trados or Deja Vu. THey will import your file and the strings that they already translated will pre-populate, and they will be left with only the delta.

Related

Adding new translations

I'm using FormatJS to localize my app. There's a handy CLI to extract all the translations from the code base. I can generate the en.json file, and send it to the translator. When I get the translation back I can save this as fr.json. So far so good.
What I don't understand is what to do when I'm adding new translations in my app. When I run formatjs extract again, I get a new en.js file, with all the keys. Obviously I don't want to send the whole thing again to the translator. I could diff the new en.json against the previous version but it's such a basic step that I feel like I must be missing something? I didn't find anything about this in the docs.
How is this part of the workflow handled with FormatJS?
It seems like translation services typically take care of diffing the data. You send them the whole template file and they send back translation files will all the translated strings (new ones + ones that have already been translated). At least that's how it works with the provider my company uses.
My workflow is as follow:
add new translations in the source code with intl.formatMessage()
formatjs extract to create the new en.json file (template file)
replace the translation files (e.g. es.json, fr.json etc.) with the new ones from the provider
formatjs compile to generate the machine files
I also created a test to ensure that each key in en.json has a corresponding key in each translation file.

Translation progress is lost after updating symfony translation

I've setup Weblate to handle my symfony website translation and synchronize over GIT.
Weblate pick up correctly the translation file, proceed with translation and push properly the translation files.
However, once I want to update the new strings to translate, using:
php bin\console translation:update --force --output-format=xlf en
Then I push it on GIT and pull on Weblate, but Weblate loses all the translation progress and have to go back to square one.
What am I doing wrong?
EDIT : It seems like Weblate adds a field "approved=yes" which gets removed by symfony.
As per XLIFF specification, only the strings with aprroved="yes" attribute are considered translated. Unfortunately Symfony doesn't follow the specification here.
Fortunately Weblate has workaround, see documentation.

Is there a clever way to pass a yml locale file to my client for translation?

I have finished a rails project using i18n and now I need to pass all the text in the website to our client so that he can translate them and we can include additional locales to our app.
The problem is our client is not a geek and if we give them the actual YAML file, they will use MS Word to edit it and we'll lose all the proper markup in the process ("\n" for new lines, one line text, etc...).
How would you handle this process?
Is there a better way than giving the client a .doc file and then loosing a day to clean the text afterwards and manually converting it back to YAML?
Thanks in advance,
Augusto
This is exactly what Locale was created for : you upload your YAML files, your client/translator edits the content and you sync YAML back down. You don't email files and you don't have to deal with crappy file formats - check it out!
Full disclosure : I co-founded and develop Locale.
This sounds like a one-off thing where I you do the translation once and then be done with it.
What we do in these cases (we usually work with a Translator for these kinds of things) is that we export all the keys in the YAML to Excel and send them that.
Once we get it back we usually task a intern with fixing up the yaml (after it's been translated back into YAML - we do this manually at the moment but a little script should be easy to implement)
Other solutions could be (if you do this a lot) that you include the translations into your app and enable through some JavaScript and maybe something similar to Aloha Editor the user to simply click on texts and translate them in the app. But that's a bit excessive and only makes sense if there are really a lot of translations to be done and you want to crowdsource them (Facebook did this back in the day)

How do I simply send my rails website to my designer so he can finish the design?

Basically I need to send to my designer a non-finished rails website.
My Designer doesn't have ruby / Rails environnement installed and should be able to:
modify the CSS
add some html elements
I can manually check the diff after he worked.
Is there a way that I can make an easy extraction of my app or giving an access to the deployed one with capacity to re-root the css from his files?
Based on your question, your designer, in addition to the design, also writes code: he creates css files, and edit your views files. That makes him an integrator.
As such, he should learn the basics of source control management, such as git, svn or any system you prefer (my favorite is Bazaar, for its simplicity).
It is a best practice that will allow you to save some time and avoid a lot of headaches when merging your revisions. A nice side effect: he will be able to easily roll-back to a previous working version of the code, should anything bad have happened.

How to translate Virtue Mart 2.0 (Joomla e-comerce plugin)?

I'm using Virtue Mart on joomla for catalogue features.And as I'm using joomla 1.7, I'm forced to use VirtueMart 2.0 that's still in RC state. I need to translate it to Ukrainian language because it's so new, that nobody have done it already.
Does anybody know where I should start? Because I've spent a lot of time looking for something like: "VirtueMart 2.0 translation guide" but I had no luck.
Uh… I've figured it out already. Her's what you should do:
Get the english files called en-GB.com_virtuemart.ini from /language/en-GB and /administrator/language/en-GB. First is for front-end "what the visitors see" and the second is for the back-end "admin panel".
Edit the file in any text editor. Just replace the words in quotes with what you need.
Change the beginning of the file to your language key and put it in the corresponding language directory in /language and /administrator/language. As for Ukrainian, the files will be renamed to uk-UA.com_virtuemart.ini and put in /language/uk-UA and /administrator/language/uk-UA.
I can also suggest using some version control to support translation, so you will see, what have you replaced with what.
If you want to make a package that could be installed with extension manager, you should read Creating language packs for extensions in Joomla_1.6

Resources