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

Improving the translation system #119

Open
fnando opened this issue Dec 11, 2013 · 8 comments
Open

Improving the translation system #119

fnando opened this issue Dec 11, 2013 · 8 comments

Comments

@fnando
Copy link

fnando commented Dec 11, 2013

Hi there!

I want to contribute to the kidsruby project. It's awesome and I'm really excited to get my kid started. That said, I want to propose a change.

I'm from Brazil and decided to translate it to pt-BR (Brazilian Portuguese). I noticed that the translation consists basically in duplicating HTML files and changing their contents. Is that right?

If so, I want to extract all translations into YAML files and create an eRB template system that uses these YAML files (which will be backed by the I18n gem).

The main advantage is that we stop duplicating HTML files, which makes harder when/if you need to change the HTML structure, but also eases the translation process, since you don't have to touch the HTML tags.

What do you think?

@hunterboerner
Copy link
Contributor

I like this idea a lot but I think @deadprogram chose to use html and duplicate it because it would be easier for more people to contribute. I've actually bugged him a few times with this idea but he keeps running away from me.. err... I mean, he's busy (good luck now). If we do something like this would haml be a better choice?

@fnando
Copy link
Author

fnando commented Dec 11, 2013

@hunterboerner I like eRB because you don't add yet another abstraction (non-Ruby people) can tweak the HTML and contribute without having to learn too much.

One thing that may help the translation/contribution process is to always wrap YAML strings as multiline blocks. That way you can't go wrong with syntax error.

en:
  keyboard_shortcuts: |
    Default Keyboard Shortcuts

  back_main: |
    Back to main

Makes sense?

@fnando
Copy link
Author

fnando commented Dec 11, 2013

Also, we can set up some web interface for I18n. I remember that Thoughtbot open-sourced a web app for that some time ago, but there are other alternatives.

So will be just filling up inputs. ;)

@hunterboerner
Copy link
Contributor

I can imagine: The first tools that localizes the localizer

@deadprogram
Copy link
Member

It has been nice to have everything in "plain old HTML", since some of our contributors have not been Ruby programmers, but just know how to edit the HTML files. That said, anything that makes it easier/better for translations is a good thing.

A tool sounds particularly interesting for the installers...

@gcapizzi
Copy link

How about just using the i18n gem? It's the one used in Rails and supports Gettext, which is very widespread.

@fnando
Copy link
Author

fnando commented Feb 13, 2014

@gcapizzi that's what I proposed:

If so, I want to extract all translations into YAML files and create an eRB template system that uses these YAML files (which will be backed by the I18n gem).

@gcapizzi
Copy link

@gcapizzi that's what I proposed:

Whoops, missed that bit 😐

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