kberov / Ado

Ado - framework for web projects on Mojolicious | Note! Now I work on a replacement - https://github.com/kberov/Slovo
Other
32 stars 9 forks source link

Create index_text.html+de.ep #63

Closed jatty closed 9 years ago

jatty commented 9 years ago

German translation of Welcome page.

kberov commented 9 years ago

Thanks for the contribution, Joachim! Please see my notes bellow.

If we are going to have German by default in the distribution we should also add it wherever it is needed:

  1. https://github.com/kberov/Ado/blob/master/lib/Ado/Plugin/I18n.pm#L65 or create an etc/plugins/i18n.conf and put it there much like we have configurations for other default modules.
  2. Create lib/Ado/I18n/de.pm. See lib/Ado/I18n/en.pm.

It is how usually this is done in Perl. Locale::Maketext from which Ado::I18n inherits is a standard Perl extension from the core distribution. We are using it. Later we will create a table in the database for translations so they can be edited via a back-end User Interface (part of Ado::Plugin::I18n or separate), which of course does not exists yet. I am open for suggestions.

Regards and thanks!

jatty commented 9 years ago

Yes, of course. Perl's way integrating I18n will be the best way. Database in a later stage will also a good ide.

kberov commented 9 years ago

Can you add the changes described above, please? Also we need to have tests to check that we are loading properly the language 'de'. the following test files need to be changed and made to not fail. t/plugin/i18n-00.t, t/plugin/i18n-01.t, t/plugin/i18n-02.t, t/plugin/i18n-03.t Do you want to you do that? If you see something that does not look quite right or is completely wrong or you are not sure it is the way it is, please do not hesitate to speak up. I would be glad to find areas for improvements. The more eyes on the code , the best.

jatty commented 9 years ago

I've tried to. Unfortunately I'm not very familar with github anymore. Hopefully it has worked for all files in my respository.

kberov commented 9 years ago

Not sure I understand. May be if I close this pull request you can create another one. Or, I can add the needed changes and then accept the pull request ,hopefully tomorrow?

jatty commented 9 years ago

Or, I can add the needed changes and then accept the pull request ,hopefully tomorrow?

This would be very fine.

Thanks -Achim