AbstractChosen.default_multiple_text = "Select Some Options";
AbstractChosen.default_single_text = "Select an Option";
AbstractChosen.default_no_result_text = "No results match";
We have strings for it
JGLOBAL_SELECT_AN_OPTION="Select an option"
JGLOBAL_SELECT_NO_RESULTS_MATCH="No results match"
JGLOBAL_SELECT_SOME_OPTIONS="Select some options"
AbstractChosen.default_multiple_text = JGLOBAL_SELECT_SOME_OPTIONS;
AbstractChosen.default_single_text = JGLOBAL_SELECT_AN_OPTION;
AbstractChosen.default_no_result_text = JGLOBAL_SELECT_NO_RESULTS_MATCH;
The texts are displayed as placeholder in select fields in modal in frontend and the site is on Danish, this is causing problems because I cannot translate the strings.
Labels |
Added:
?
|
Category | ⇒ | com_languages Feature Request JavaScript |
@dgrammatiko
Please have a look.
Status | New | ⇒ | Discussion |
Add the php part here: https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/html/formbehavior/chosen.php
And also the js changes in the chosen.js and everything should be fine
PS have no clue how the link was messed up, I was on my mobile
This is a third party library (chosen) and we don't change the code in a third party library
It has already been modified for Joomla...
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.6.2
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011-2016 Harvest http://getharvest.com
Modified for Joomla! UI:
- revert the check for instance type of data-chosen, to allow to disable Chosen for field with data-chosen="true", @see https://github.com/joomla/joomla-cms/pull/12877
- rename the css and javascript classes and functions to revert back to using chzn and liszt
- fix zero width, based on https://github.com/harvesthq/chosen/pull/1439
- allow to add a custom value on fly, based on https://github.com/harvesthq/chosen/pull/749
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/
That was a mistake 5+ years ago and not something we should repeat. That was done as an attempt to update the library with important upstream bugfixes without being effected by their backwards compatible breaking changes.
The main thing here is
Please give test instructions (with some example for default Core) to figure how to reproduce your issue.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-30 20:07:53 |
Closed_By | ⇒ | brianteeman |
As it has been one month since the request for how to replicate this without reply I am going to close this. It can always be reopened if updated.
As it is a js, we can't just use
AbstractChosen.default_multiple_text = JGLOBAL_SELECT_SOME_OPTIONS;
but rather something like
AbstractChosen.default_multiple_text: Joomla.JText._('JGLOBAL_SELECT_SOME_OPTIONS');
But then, one has to add where necessary
JText::script('JGLOBAL_SELECT_SOME_OPTIONS');
Please give test instructions (with some example for default Core) to figure how to reproduce your issue.