Patch #6926

Plugins captions for name and descriptions has not i18n support

Added by Juanje Ojeda Croissier over 9 years ago. Updated over 9 years ago.

Status:NewStart date:2010-11-17
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:I18n
Target version:-

Description

The admin plugin's view doesn't support translations.

Those fields right now are not able to be translated but they should.

I've added l() function to the view so that can be translated at init.rb.
I've attached a patch for it against the last Redmine version (r4410).

add_i18n_to_plugins_view.patch Magnifier (930 Bytes) Juanje Ojeda Croissier, 2010-11-17 17:42

add_i18n_to_plugins_view_with_check.patch Magnifier - New patch with check for translations (1.04 KB) Juanje Ojeda Croissier, 2010-11-22 00:48


Related issues

Related to Redmine - Feature #8058: Separation of content language from UI language New 2011-04-04

History

#1 Updated by Jean-Philippe Lang over 9 years ago

This patch seems to break plugins that do not have translated name and description.

#2 Updated by Juanje Ojeda Croissier over 9 years ago

Thanks for reviewing the patch :-)

Yes, you're right, but I think those strings should be able to be translated always. At least, the description.
I'm not sure if there is a easy and elegant way to translate just if there is a translation :/

Can't it be added to the plugins documentation as a requirement for updating a plugin to the new Redmine version or create a new one? Just a thought...

Thanks for your time.

#3 Updated by Holger Just over 9 years ago

You could use something like this:

plugin.description.is_a? Symbol ? l(plugin.description) : plugin.description

A new requirement is not to be taken lightheartly. It could be optional (and/or recommended) though.

#4 Updated by Juanje Ojeda Croissier over 9 years ago

Thanks Holger,

I was trying with that solution and I got the patch I attech. No I have plugins with translations adn plugins without translations working.

#5 Updated by Jean-Philippe Lang over 9 years ago

  • Category changed from Translations to I18n
  • Assignee deleted (Azamat Hackimov)

I think that localized plugin names can be confusing and I'm not aware of a software that provides this feature. For the description, I think we should wait for #5518 so that plugins do not have to provide a valid translation for each language that is present in the core.

Also available in: Atom PDF