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.
Related
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.
I am writing a Program in Rub On Rails 4.x and I have to take PDF files with defined fields that can be filled out, fill in data from a form submission(This part is DONE!), and lastly allow the user to modify the saved PDF file on the server and overwrite said PDF after making their modifications.
Like I said I have already gotten the PDF files filled out with what has been submitted in the form through pdftk . What I now need to do is provide a server side editing capability to the said PDF files on server generated from the first step of the process.
I have seen similar posts but none wanting to do the same thing I do. If I am wrong links would be great. Thanks in advance for all your help!
After lots of digging and research here is what I have found to be the facts surrounding this issue and implementing a program to allow embedding the PDF file, editing it, and saving it back to the server. This process would be great however from what I can tell there is nothing out there that really does this for Ruby On Rails. To quote #Nick Veys
Seems like you need to find a Javascript PDF editor you can load your PDF into, allow the user to modify it, and ultimately submit it back to the server. Seems like they exist, here's one for ASP projects
You are correct but still wrong in the sense that yes there is one for ASP projects however that is Microsoft Based, yes I know that it can run on Linux environments through Mono. However to the point it would appear in this instance that a Ruby On Rails specific solution is indeed needed.
The solution that we have come up with is as follows
1. Use a PDF editing package in the linux repositories like PDFtk
2. You then render a page with the PDF embeded on one side and a form representing the live fields in the PDF to take input.
3. Once submitted you use PDFtk to write the values into a new template PDF file and overwrite what was previously stored.
This requires a few additional steps to process the data than I really care for myself. However it is the best solution that our team could come up with, without bleeding the project budget dry for just 1 piece of functionality.
I hope this helps anyone else looking to do the same thing in Ruby On Rails.
I have done something like this using my company's .NET product. It can also be done using its Java version too.
http://www.gnostice.com/nl_article.asp?id=255&t=Save_Form_Submit_Data_Back_To_Original_PDF_Document_In_NET
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)
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
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.