Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Facing the translation problem #130

Open
4 tasks done
brunnopleffken opened this issue May 8, 2017 · 9 comments
Open
4 tasks done

Facing the translation problem #130

brunnopleffken opened this issue May 8, 2017 · 9 comments

Comments

@brunnopleffken
Copy link
Owner

brunnopleffken commented May 8, 2017

Although at a slower pace today, Addictive Community has grown a lot in new features in recent months, and we faced a problem with that: internationalization.

As new features are added, new words and phrases are added in the translation dictionary (in the /languages folder), and language maintenance is becoming difficult. Currently Addictive Community has four languages (besides English): Russian, Swedish, Korean and Brazilian Portuguese. Keeping them up to date is a challenge.

I know Transifex, but the prices are goddamn salty for a single project.

Does anyone know of an open-source, or at least cheaper, translation tool?


PROGRESS: Migration to JSON and POEditor tool.

  • Change the internationalization class to parse the JSON file;
  • Remove the old PHP arrays and replace it with JSON;
  • Remove unnecessary duplicate strings (because now there's a single file for everything);
  • Upload terms to POEditor and perform some tests;
@xQuByte
Copy link

xQuByte commented May 8, 2017

Fro free: Zanata is best i think
http://zanata.org/

@arcestia
Copy link

arcestia commented May 8, 2017

yeah zanata is open source and good for single project

@halojoy
Copy link
Contributor

halojoy commented May 8, 2017

10 online translation tools recommended by translators.
https://blog.gengo.com/10-online-translation-tools-recommended-translators/

Zanata is one of them.
When is necessary I will do the Swedish translation.

@brunnopleffken
Copy link
Owner Author

brunnopleffken commented May 8, 2017

Nice! I'll check Zanata, create an account and see how it imports and exports language files. Depending on the format/syntax, maybe something will change how the forum handles languages.

@halojoy You're our official Swedish translator. 😛 But man, opening those many files and seeing those dozens of arrays in each of them is discouraging. Let's make it easier.

@brunnopleffken
Copy link
Owner Author

brunnopleffken commented May 9, 2017

During my research, I found the POEditor. They have a free plan where I might be able to do some testing, but I'm willing to pay a fee if necessary, as long as it's an easy-to-use system that can import/export files without having to mess around with the I18n() class in the forum. From what I've seen POEditor works very well with JSON.

What I would have to adapt would be to simply convert JSON to Array and change the template files to something like $t["thread"]["add_thread"] instead of $t["T_ADD_THREAD"]. This way we can say goodbye to those 15 files for each language, since we can nest the keys and avoid collision.

And they have embedded GitHub integration!

I'll sign up, create a project, make some tests and see if it's worth it.


EDIT: POEditor is great and very easy to use. And it gets even better! Let's suppose the following JSON file:

{
    "name": "English (US)",
    "global": {
        "search": "Search",
        "memberlist": "Member List",
        "calendar": "Calendar",
        "create_account": "Create Account"
    }
}

I already changed the i18n() class, and now something like __("global.memberlist"), like plain JavaScript, will return Member List. The working branch is languages.

@halojoy
Copy link
Contributor

halojoy commented May 11, 2017

Sounds promising.
We have to login at the POEditor website to do translation.

@brunnopleffken
Copy link
Owner Author

Indeed it is! And is working great, their UI is really intuitive. Basically just select or add a language, there's a three column table: the hash key, the reference language translation (in this case, English) and a <textarea> with the actual translation. Translate, TAB, translate, TAB, and is all done!

Here's the new language file:

screen shot 2017-05-11 at 14 07 48

@xQuByte
Copy link

xQuByte commented May 11, 2017

Nice! Ready for polish translation ;)

@zalexstudios
Copy link

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

No branches or pull requests

5 participants