Skip to content

Commit

Permalink
Fix admin portugues locale
Browse files Browse the repository at this point in the history
When changing the admin backend language to Português (PT), it will look for the file select2_locale_pt-PT.js that does not exist.

To Reproduce:
1. Open the admin backend
2. Select Português (PT) in the language selection menu at the bottom right

It is looking for the right file. The file select2_locale_pt-PT.js must be renamed to select2_locale_pt.js and the two references "pt-PT" must be changed to "pt"
  • Loading branch information
ruipbarata committed Jun 18, 2021
1 parent 2479b24 commit 12e6421
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(function ($) {
"use strict";

$.fn.select2.locales['pt-PT'] = {
$.fn.select2.locales['pt'] = {
formatNoMatches: function () { return "Nenhum resultado encontrado"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + " car" + (n == 1 ? "ácter" : "acteres"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " car" + (n == 1 ? "ácter" : "acteres"); },
Expand All @@ -13,5 +13,5 @@
formatSearching: function () { return "A pesquisar…"; }
};

$.extend($.fn.select2.defaults, $.fn.select2.locales['pt-PT']);
$.extend($.fn.select2.defaults, $.fn.select2.locales['pt']);
})(jQuery);

0 comments on commit 12e6421

Please sign in to comment.