-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#4530 Add tooltip (title) to the 'remove all' 'X' icon. #5291
Conversation
@nisha-kaushik This title attribute must show the I18n value, that select2 already provides for other texts. Modify the PR to show the title from i18n. |
Hi, I am new to open source and i18n, do we need to add the text for every language in all those files? e.g: es.js and en.js etc? |
@nisha-kaushik Wow, Good job! My only one point is, please, to remove all change from files in |
There are 3 TO Dos , I couldn't find conversion in Lower Sorbian., Upper Sorbian and turkmen. Can you pleas ehelp me with that. |
@nisha-kaushik There is no problem, we can maintain the default as english string. Other users from community (that know these languages) will fix this missing messages, if necessary. |
@nisha-kaushik I am thinking now about it, and I have just only one more point: Add just one more test that has the same code you did in PR, but testing in another locale. Then, we will be safe that this feature is tested in default language (english) and the others languages. |
Can you please guide me on how to change locale in test case while rendering? I tried passing language in options but seems like I am missing something. |
@nisha-kaushik It is something like this below: test('clear icon should have title displayed in another locale', function (assert) {
var selection = new AllowClearPlaceholder(
$('#qunit-fixture .single-with-placeholder'),
new Options({
placeholder: {
id: 'placeholder',
text: 'This is the placeholder'
},
allowClear: true,
language: 'ANY_LOCALE'
});
);
var $selection = selection.render();
selection.update([{
id: 'one',
test: 'one'
}]);
assert.equal(
$selection.find('.select2-selection__clear').attr('title'),
'TEXT OF THE LOCALE',
'The clear icon should have title displayed in another locale'
);
}); |
I tried the same, |
@nisha-kaushik Ok, The pr is good. And the test in english can be enough. |
This pull request includes a
#4530
The following changes were made
If this is related to an existing ticket, include a link to it as well.