Closed (fixed)
Project:
Autocomplete Deluxe
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2015 at 20:38 UTC
Updated:
5 Nov 2019 at 15:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
perennial.sky commentedHere is the patch
Comment #2
perennial.sky commentedComment #3
tessa bakkerUse 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().
Comment #4
interdruper commented@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.
Comment #5
edwardchiapetThis has been resolved in https://www.drupal.org/project/autocomplete_deluxe/issues/2544544, and should be on 7.x-2.x-dev.
Comment #6
edwardchiapetComment #7
edwardchiapet