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

Handling translations properly #6

Closed
Treeki opened this issue Jul 7, 2020 · 9 comments
Closed

Handling translations properly #6

Treeki opened this issue Jul 7, 2020 · 9 comments

Comments

@Treeki
Copy link
Owner

Treeki commented Jul 7, 2020

I need to figure out a good way to deal with managing translations so that I can include the ones from #1, #3 and #4, but I don't know what would work best...

Currently, I have the source data in Google Sheets, this is exported to a .tsv (which is in this repository) and then cvTrans.py is used to convert it to JSON.

There are a few options possible:

Make the sheet semi-public

If I do this and ask contributors to request edit access, then this would allow the data to be edited there and exported into the format that MeteoNook is already using.

  • ✔️ Requires minimal work to introduce (aside from importing the existing data from the three PRs, which I can do easily)
  • ✔️ Allows for comments to be added, etc, via Google Sheets UI
  • ❌ Makes for weird git diffs when new languages are added

Drop the sheet and TSV, work directly with the translations.js file

  • ✔️ Keeps everything in git/GitHub for easy to read diffs
  • ✔️ Also requires minimal work to introduce
  • ❌ More awkward to compare different columns with each other than the spreadsheet format

... Something else?

I've not got a ton of experience with this kind of thing, so I'd love suggestions on what would work better.

There are also a couple of things I need to think about:

  • what happens when I add new text to the app? (I only speak English and Spanish)
  • is it a good idea to keep the changelog (as it requires quite a bit of translation effort to explain the changes) or not?
@IceLitty
Copy link

IceLitty commented Jul 8, 2020

I think continue to use Google Doc is a pretty good idea, others can edit languages without interacting with Github, and only you or use automatic programs to sync the changes.
But something need check twice:

  • If a string is lost in this translation, must use default language like English to display over it. This can be not worried about changelogs. Hmmm, its also can solve problems when new text missing in some language.

@TheVaan
Copy link

TheVaan commented Jul 8, 2020

What about a service like POEditor? I don’t know if it works with a json file that includes all languages, but it would automatically gives you the English string for untranslated strings.

Otherwise I think going with the Google Sheet is a good choice for the beginning.

@IceLitty
Copy link

IceLitty commented Jul 9, 2020

Use a web app to manage translate is the best idea. Example the .po file is: (Each sentence)

key
English
Target lang

You may need another function to read .po file, but he told they can handle .json file.
Of course, I have never used POEditor service, think we can try it?


Based on price may use Weblate is another choice.

@Swpolo
Copy link

Swpolo commented Jul 9, 2020

I would prefer to work on single language files.

Google sheet isn't made for this kind of usage.
Long text will introduce long column, you could hide them, but if you use word wrap, you will then have tall cell,
You will have to manage permissions on the document,
Comments are nice, but so are pull requests since others can comment on them, and we already saw that it was working well (thanks again, TheVaan),
Version control will be horrible on the document. If you update the language file, and 15 commits later, you realize that one translation is bad, you will have to find the correct commit where the translation was correct, then apply it to the file. (or ask the community to redo the translation, assuming the translator is still available)

On the other hand, google sheet will allows no tech-savvy people to participate, no IDE, no special knowledge required.

For your other questions:

  • The app should fallback on default language, I believe that's what most i18n libraries do, same for android engine, so I don't think you'll have issues with that
  • Yes, keep the changelog, but maybe not on the main page. Only last major update.

@TheVaan
Copy link

TheVaan commented Jul 9, 2020

I missed out commenting on your questions:

As @Swpolo mentioned I would recommend that untranslated strings will displayed on English. It's up to the community (or at least the "language maintainer") to update it sometime.

In my German localization I skipped translating the change log. It's nice to have it translated, but it's not that important. Most of the users that are interested in change logs are tech orientated users that understand at least enough to understand what has changed. I would move change log to an additional tab and set localization priority for this tab to "low".

@demosdemon
Copy link

Transifex has a free license for oss. Their interface is pretty nice for translators and allows devs to just upload and download .po-like files for many i18n libraries.

@Treeki
Copy link
Owner Author

Treeki commented Jul 11, 2020

Thanks for the feedback ^^

Transifex looks like it could be a good option. Annoyingly, it seems there's no direct mapping between any of the file formats it supports and the format used by vue-i18n, the library I'm using: http://kazupon.github.io/vue-i18n/guide/messages.html#structure

That's not insurmountable though as I can quite easily write code to convert between them.

I'll give it a shot this weekend and see how things go, as it would be good to be able to incorporate all of these!

@Treeki
Copy link
Owner Author

Treeki commented Jul 14, 2020

Slightly late, but I’m experimenting with POEditor instead and I’m now doing the work to integrate the translations from #1, #3, #4 and #7.

The project can be found here: https://poeditor.com/join/project/CerldM8Yc9

I’ve imported all the strings from those pull requests and am now working on getting all of these integrated into the project itself — should be straightforward, with the possible exception of pluralisation rules which may require tweaks as per the Vue-i18n documentation: https://kazupon.github.io/vue-i18n/guide/pluralization.html#pluralization

@TheVaan
Copy link

TheVaan commented Jul 14, 2020

Thank you! I registered and subscribed to your project.

@Treeki Treeki closed this as completed Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants