This repository has been archived by the owner on Jan 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from locaweb/fix_select2_i18n
Fix select2 i18n
- Loading branch information
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
//= require libs/_jquery | ||
//= require libs/_modernizr | ||
//= require libs/_select2.min | ||
//= require libs/_select2_locale_pt-BR | ||
//= require libs/_jquery-ui.min | ||
//= require libs/_masked-input | ||
//= require libs/_cookie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Select2 Brazilian Portuguese translation | ||
*/ | ||
(function ($) { | ||
"use strict"; | ||
|
||
$.fn.select2.locales['pt-BR'] = { | ||
formatNoMatches: function () { return "Nenhum resultado encontrado"; }, | ||
formatAjaxError: function () { return "Erro na busca"; }, | ||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Digite " + (min == 1 ? "" : "mais") + " " + n + " caracter" + (n == 1? "" : "es"); }, | ||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1? "" : "es"); }, | ||
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, | ||
formatLoadMore: function (pageNumber) { return "Carregando mais resultados…"; }, | ||
formatSearching: function () { return "Buscando…"; } | ||
}; | ||
|
||
$.extend($.fn.select2.defaults, $.fn.select2.locales['pt-BR']); | ||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters