Open creativecreatorormaybenot opened 5 years ago
Since Google Translator Toolkit seems to be the only platform supporting ARB files, maybe an alternative for intl
would be to produce a JSON format that is supported across major translation services.
In any case, if it helps, at BMW we wrote this CLI utility to transform to/from ARB files to JSON: https://github.com/bmw-tech/arb-converter-cli
Thanks. That seems very helpful and gives people an immediate option. How widely is "Hierarchical JSON" supported?
I do not know, to be honest, I just know it works with our vendor of choice, but if you feel like a new format should be supported, you can file a new issue on arb-converter-cli
... also, PRs are welcomed ;)
Translator Toolkit has a poor suport for use last version translate on a new version (more strings) of the same APP. The Translation Memory sucks.
So, maybe an option is to work on a simple system for those translation, and that just allow to add new strings to translate without the need of create a entire new translation.
Hi, our vendor is Lokalise, and here's their supported format list: https://docs.lokalise.com/en/collections/652248-supported-file-formats
Notably, I think "GNU Gettext / PO", "ICU", some kinds of jsons...
Note that the ARB format is essentially ICU message strings in a JSON format. So it ought to be quite simple to emit/consume a different format. The most difficult part is understanding the other format, and if it handles things like "meaning", or how it defines parameters.
I started doing an experiment writing an equivalent to the extract_to_arb/generate_from_arb scripts in a separate package for XLIFF, which is one of the more complex alternatives, and it doesn't seem like there are many obstacles to doing that. If the strings are not ICU then understanding PetitParser enough to write a different grammar for them is an issue, and understanding XLIFF is another.
It requires importing files from lib/src in intl_translation, but that works, and I think we can reasonably move those out of src/re-export them to make it easier for people to do that. The thing I was doing is still pretty rough, doesn't actually have a specific target, and I have to do some paperwork to publish a new package. But if someone has a specific target they want to use/test against and are willing to try writing support for such a format, I'd be happy to help and to make supporting changes to intl_translation.
Localizely supports ARB files.
I hope this helps.
Here is something to convert to XLIFF or Gettext and back https://www.npmjs.com/package/arb-convert
BabelEdit has added support for arb files, works like a charm and doesn't cost a fortune.
I wrote the free tool attranslate
to compensate for the death of "Google Translator Toolkit": https://github.com/fkirc/attranslate
You can give attranslate
a try if this is still an issue for you.
attranslate
supports both JSON-files and ARB-files, and it also supports conversions between file-formats.
See also this stackoverflow thread.
Google Translator Toolkit is shutting down and I do not know what other software would translate the files generated by
intl_translation
.Having said that, I was not sure where to open the issue, so there is one over there as well: https://github.com/dart-lang/i18n/issues/534