Merge "Custom no-results message for compact links search"

This commit is contained in:
jenkins-bot
2018-02-13 13:11:29 +00:00
committed by Gerrit Code Review
4 changed files with 15 additions and 4 deletions

View File

@@ -508,7 +508,8 @@ class UniversalLanguageSelectorHooks {
],
'messages' => [
'ext-uls-compact-link-count',
'ext-uls-compact-link-info'
'ext-uls-compact-link-info',
'ext-uls-compact-no-results'
],
'localBasePath' => __DIR__ . '/resources',
'remoteExtPath' => 'UniversalLanguageSelector/resources'

View File

@@ -63,5 +63,6 @@
"ext-uls-compact-link-count": "{{PLURAL:$1|One more|$1 more}}",
"ext-uls-compact-link-info": "All languages (initial selection from common choices by you and others)",
"prefs-languages": "Languages",
"ext-uls-compact-language-links-preference": "Use a [[$1|compact language list]], with languages relevant to you."
"ext-uls-compact-language-links-preference": "Use a [[$1|compact language list]], with languages relevant to you.",
"ext-uls-compact-no-results": "This page is not available in the language you searched for."
}

View File

@@ -67,5 +67,6 @@
"ext-uls-compact-link-count": "Message next to the list of languages which indicates that there are more languages than the ones shown. Parameter $1 is the number of languages.\n\nIf your language has a singular form for number 1, then the number should be explicitly mentioned. If it's possible in your language, please write \"1 more\" or \"one more\". Another option is to write \"more\" in a way that doesn't depend on a particular number.",
"ext-uls-compact-link-info": "A tooltip for a button that shows all available languages next to a short list of relevant languages.",
"prefs-languages": "Field set legend for user preferences regarding display of language lists\n{{Identical|Language}}",
"ext-uls-compact-language-links-preference": "Label for compact language links user preference"
"ext-uls-compact-language-links-preference": "Label for compact language links user preference",
"ext-uls-compact-no-results": "Message shown when the language search does not have any results."
}

View File

@@ -191,7 +191,15 @@
},
languages: ulsLanguageList,
// Show common languages
quickList: self.getCommonLanguages( languages )
quickList: self.getCommonLanguages( languages ),
noResultsTemplate: function () {
var $defaultTemplate = $.proxy( $.fn.lcd.defaults.noResultsTemplate, this )();
// Customize the message
$defaultTemplate
.find( '.uls-no-results-found-title' )
.text( mw.msg( 'ext-uls-compact-no-results' ) );
return $defaultTemplate;
}
} );
};