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

Localization #73

Closed
KovalevArtem opened this issue Apr 19, 2020 · 11 comments
Closed

Localization #73

KovalevArtem opened this issue Apr 19, 2020 · 11 comments
Labels
enhancement New feature or request UX Issue

Comments

@KovalevArtem
Copy link
Contributor

It is sad that the service is only in English - I propose to translate.
I am ready to help in the translation into Russian.
(For example, you can use Weblate, Crowdin, or any other service. Free for open source projects.)

@steveseguin
Copy link
Owner

It's a great idea. What I can do is add the framework to the code, and let others contribute their own translations.

@steveseguin steveseguin added enhancement New feature or request UX Issue labels Apr 20, 2020
@KovalevArtem
Copy link
Contributor Author

@orangesunny Need help!

@orangesunny
Copy link

Hi! We will be happy to host the translations. Once you have at least the base file in your repo, please, let us know on https://hosted.weblate.org/hosting/, and we will set up the translation project.

As you have it mostly HTML and JS, I suppose you’ll use i18next, but feel free to choose any other according to its specifics: https://docs.weblate.org/en/latest/formats.html

Translate libre, and have a great day!

@steveseguin
Copy link
Owner

So I took a first stab at making a localization implementation.

It can be used like this:
https://obs.ninja/alpha?ln=fr_ca

I've created some example translation files. They do not get used unless specified.
https://github.com/steveseguin/obsninja/tree/master/translations

I liked my approach here as it lets me continue to develop the code base without a lot of clutter and without worrying about breaking existing language sets.

I've yet to add a menu or option to select these translations, but they are not at least available as options. This code has been committed to master.

@KovalevArtem
Copy link
Contributor Author

@comradekingu Join in 😏

@comradekingu
Copy link

comradekingu commented May 10, 2020

Would gladly contribute, will have a look.
Crowdin isn't free for libre software. Some people say it, but they haven't read the the terms and conditions of Crowdin. It has the caveat of only if contributing to the closed TM, and only for projects that have no source of revenue. Weblate is a lot better in all aspects. Either self-hosted or the "Hosted Weblate" service, which actually is gratis for libre software, and worth every bit of attention and money one can throw at it, seeing as it is actually copylefted libre software, without any nonsense.

@KovalevArtem
Copy link
Contributor Author

I've created some example translation files. They do not get used unless specified.
https://github.com/steveseguin/obsninja/tree/master/translations
@orangesunny

@steveseguin
Copy link
Owner

steveseguin commented May 12, 2020

OBS.NInja now automatically uses a ru.json (russian) translation file if a ru-* (russian) locale is detected by the browser.

ie) If Russian is the default language in chrome, then it will auto-translate to Russian.
Chrome->Settings -> languages -> Russian (pin to top)

You can also manually select Russian by using the &ln=ru parameter to the URL. ie:
https://obs.ninja/alpha/?ln=ru

result:

image

I've also applied a French translation. English is the default, so the English translation file is purely for reference.

Both the French and Russian translation files are created using Google Translate and are pretty bad.

Please feel to fix any poor translation by editing the following file and submitting a PR: https://github.com/steveseguin/obsninja/blob/master/translations/ru.json

If no json file exists for a given language, it will default back to english.

I don't really see a need to use Webplate, as it seems a bit overkill for such a simple website. I would ultimately like to have as little text as possible on OBS.Ninja, so the goal should be finding ways to remove text, rather than translating it. ie) making it more intuitive and easier to use. I may not understand the benefits of Webplate though, so please let me know.

@comradekingu
Copy link

@steveseguin
You will get a lot more translations, and better ones at that. If you start removing text, having a platform is a godsend, seeing as things otherwise get inconsistent quick.
If you want to expand to a blog or post changelogs, there is a lot more to translate.
I can already tell "macOS" is written "MacOS", and running fixes becomes a lot quicker with alerts, along with finding errors with all the checks.

@KovalevArtem
Copy link
Contributor Author

image
@steveseguin It seems to me that the files are redundant blank.json and default.json. In a sense, this complicates the selection of the start file for the translator. And for the developer complicates keeping the files up to date ...
I think most will obviously take the en.json file as the basis.
And if someone suddenly does not know English, then he can take as a basis a file with a language familiar to him ...

@jcalado
Copy link
Collaborator

jcalado commented Jan 29, 2021

Latest releases of OBS.Ninja have full-featured localization. V16 even improves this further.
Closing as fixed.

@jcalado jcalado closed this as completed Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UX Issue
Projects
None yet
Development

No branches or pull requests

5 participants