joshsten / redmine_jchat

Chat Plugin for Redmine 1.0.x,1.1.x,1.2.x - Driven on MySQL no need to install any extra gems. Use at own risk. I will do my best to add features over time, but I am a busy student so I apologize for slow release/response times.
39 stars 22 forks source link

Localization not working properly. #10

Closed cforce closed 13 years ago

cforce commented 13 years ago

I tried to localize the setup menu in german, but i found two places to translations files. "config/locales" and "lang". Which one to use? In both en.yml there are no labels seen in menu, did't you use labels? i patched some files for this reason, using label and translations for en and de.

app/views/settings/_chat.erb:

<%= l(:label_showmessagesfromyou) %> <%= l(:label_colormessages) %> <%= l(:label_showfullname) %>

config/locales/en.yml:

English strings go here for Rails i18n

en: label_showmessagesfromyou: "Show Me for messages from you" label_colormessages: "Color my messages" label_showfullname: "Show fullname"

config/locales/de.yml:

German strings go here for Rails i18n

de: label_showmessagesfromyou: "eigene Nachrichten anzeigen" label_colormessages: "zeige Nachrichten in Farbe" label_showfullname: "zeige den vollstaendigen Namen"

joshsten commented 13 years ago

I have added full localization support and it should be in the next commit. I am still a bit newer to the design of these plugins so I wasn't aware of the localization system. I was going to add your translations in, but I slightly altered the English translations to be more clear and added localization for several other parts of the chat plugin. A few of these configuration lines are for upcoming features I hope to implement. If you do more translations and post them here I will include them into commits.

Thank you for this issue report and for posting this information here.

cforce commented 13 years ago

german Translation de.yml (Please use UTF-8 without BOM, because of Umlaute)

German strings go here for Rails i18n

de:

These are the captions for the setting dialog.

label_setting_messages_from_self_as_self: 'Eigene Nachrichten mit dem Label "Ich" anzeigen.' label_setting_color_messages_from_self: 'Eigene Nachrichten in Farbe anzeigen.' label_setting_show_full_names: 'Zeige den vollstaendigen Namen im Chat an.' label_setting_num_recent_messages: 'Anzahl der zuletzt geschriebenen Nachrichten, welche im Chat angezeigt werden sollen.' label_setting_poll_frequency: 'Polling Frequenz des Plugins.' label_settings_header: 'Diese Einstellungen sind Platzhalter für zukünftige Funktionen, die bisher noch nicht oder nicht vollständig implementiert sind.'

These captions are displayed in the name panel for each chat message. label_chat_self is only used if the option the first label describes is checked.

label_chat_self: 'Du' label_chat_says: 'sagt'

Header displayed on the transcript page when a date is clicked in the chat frame.

label_transcript_header: 'Chat Protokoll'

Main chat button caption.

label_chat_toggle_button: 'Chat'

joshsten commented 13 years ago

Localization Applied. Let me know if you encounter any issues.