The term not found message should be made multilingual via i18n integration.

Comments

perennial.sky’s picture

Here is the patch

perennial.sky’s picture

Status: Active » Needs review
tessa bakker’s picture

Status: Needs review » Needs work

Use hook_variable_info for defining translatable variables. This will create a language switcher above the configuration page. Use hook_variable_group_info for creating a tab for this module in the translatable strings options.

Using t() works only on defaults.

Also in Javascript the setting will be made translatable, but in the most ugly way, because this works only if you have seen the string in the targeted language. Not realistic on the website with 20 languages.

To fix this:
* the string should be configurable in a global setting form with variable support
* the description needs to explain that a user can use the placeholder '@term' (or add Token support)
* changing the string per widget should be removed
* config form must be only accessible with a permission that has 'restricted = true', because string translations use filter_xss_admin().

interdruper’s picture

Status: Needs work » Reviewed & tested by the community

@Tessa, please contribute a patch with your more general use case approach. Meanwhile patch #1 just adds the recommended use of t() for all the translatable strings and it is valid for most use cases. RTBC in my opinion.

edwardchiapet’s picture

edwardchiapet’s picture

edwardchiapet’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.