Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Tools for translation #138

Closed
fohrloop opened this issue Dec 17, 2017 · 11 comments
Closed

Docs: Tools for translation #138

fohrloop opened this issue Dec 17, 2017 · 11 comments

Comments

@fohrloop
Copy link

Hi,

I think there should be some pointers in the docs for tools which can be used to translate the generated JSON files. I have come across only to few paid browser based (PhraseApp, Transifex, Locize, ...) solutions and one GPL licenced Java app: i18n-editor. It does not support the lingui format out of the box, but only the minimal (simple JSON) format. I have tried it out with nested JSON, too, and it works well (at least two levels deep).

Are there any downsides in not using the lingui format? Do you know any alternative tooling for the translation work? Also, is there an option to extract and translate (copy-paste the key) one language (English) by default? It would ease the translation work done with i18n-editor greatly, since you could copy-paste the structure of the translation string.

@tricoder42
Copy link
Contributor

I don't think there's any problem when using minimal JSON format. I think it could be the default format in future.

I don't use any external tool or service. I wrote my own few months ago and added lingui sync command as a proof of concept. Never published this command neither the service as I use it internally. However, my idea is that lingui sync should use API provided by i18n service (PhraseApp, Transifex): upload new source messages and download translations. There should be a plugin for each service, so we could simply configure "sync": "phraseapp" in jsLingui config and CLI would handle the workflow automatically.

@fohrloop
Copy link
Author

fohrloop commented Dec 17, 2017

Good to hear that there are no problems in using the less verbose minimal JSON format.

I think those plugins for i18n services make a lot of sense for bigger projects & for companies who can afford them. For others, a simple browser based / GUI tool would be really handy. The i18n-editor is not perfect, I feel it a little more comfortable than editing the JSON files. There is actually one really nice editor for "PO" type files (the PoEdit), but I don't know If it is possible to somehow transform the jslingui JSON to .po and back.

How about the option to extract & translate one default language? Is there such?

@tricoder42
Copy link
Contributor

Ah, sorry, I missed that question.

You can use "sourceLocale": "en" in configuration and leave English message catalog untranslated.

For source locale:

  • lingui extract doesn't show stats
  • lingui compile uses message IDs as translations and
  • lingui compile --check doesn't raise an error.

@fohrloop
Copy link
Author

What I meant to ask was hard to explain in just a few words, so I created Issue #141 for that.

@fohrloop
Copy link
Author

I played around with i18n-editor and found out that it does not like spaces in the message ID's. I think I saw somewhere a browser based free tool, which worked by running some HTTP server on your local machine.. But can't remember the name.

@morloy
Copy link

morloy commented Mar 17, 2018

You can use i18next-conv to convert between the minimal .json and .po. Works nicely together with PoEdit.

@danielkcz
Copy link
Contributor

Has anyone tried https://github.com/guigrpa/mady ? It looks more like a full-fledged tool for extracting texts as well, but there is also a somewhat simple editor.

@tricoder42
Copy link
Contributor

I haven't tried it but saw it already mentioned on twitter. Looks interesting! Once I release 3.0, I'll start translating @lingui/cli and I'll try it.

@stale
Copy link

stale bot commented Oct 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 29, 2020
@danielkcz
Copy link
Contributor

I just want to add here I've been using http://localise.biz/ tool for a while now and really great with fair pricing. A lot of power under the hood.

@stale stale bot removed the wontfix label Oct 29, 2020
@tricoder42
Copy link
Contributor

@FredyC There's also https://lingui.js.org/misc/tooling.html where you could add it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants