Hello,
The Default Option Label doesn't appear to be translatable with a user-provided value. For example, my option label for a filter set is Content Type; that string doesn't appear as translatable. I noticed a similar report at https://www.drupal.org/node/2322939, and that according to that issue, it had been wrapped with t() to make it translatable. It looks like this is referring to this line:
$default_option_label = !empty($settings->settings['default_option_label']) ? filter_xss_admin($settings->settings['default_option_label']) : t('--Choose--');
But that wouldn't make any user-provided values translatable.
Am I misunderstanding how to translate this value?
Thanks,
Kat
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | facetapi_select-default-options-translation-2688465--6--7.x-1.x.patch | 6.38 KB | grndlvl |
| #5 | facetapi_select-defatul-options-translation-2688465--5--7.x-1.x.patch | 4.45 KB | thepanz |
Comments
Comment #2
webbykat commentedComment #3
grndlvl commentedHrmm... OK, so you can still do this but it's not quite as nice. We might want to integrate with i18n_string for this, however, you could have custom text by not setting the custom text via the fact block settings and using https://www.drupal.org/project/stringoverrides and still maintain the ability to translate the text.
Comment #4
grndlvl commentedComment #5
thepanz commentedPatch added
Comment #6
grndlvl commentedthePanz,
I have looked this over and all works and looks great. I made some minor cosmetic changes. Let me know if I messed anything up.
I will go ahead and commit to 7.x-1.x and I'll give it until next week to roll a new release.
Note: The i18n_strings module will need to be enabled. Also, to people who will be using this if you already have custom Default/Reset labels you will need to re-save the facet configuration form for the strings to show up in the translation interface.
Thanks,
Jonathan
Comment #8
grndlvl commentedComment #9
thepanz commentedThanks @grndlvl!