Skip to content

Commit

Permalink
Get the main locale when getting the plural form. Closes #1695
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Sep 21, 2020
1 parent 4a8509c commit 1d15f33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/js/translations/message-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export default function choose(message, number, locale) {
}

const getPluralForm = function(count, locale) {
// For regional locales with dashes, we just need the main part of the locale
// e.g. For de-CH we just want de.
if (locale.includes('-')) {
locale = locale.substr(0, locale.indexOf('-'));
}

switch (locale) {
case 'az':
case 'bo':
Expand Down

0 comments on commit 1d15f33

Please sign in to comment.