Skip to content

Commit 275765c

Browse files
committed
fix: arabic (ar) default plural for 1 maps correctly (performance
improvement)
1 parent 0fd91a8 commit 275765c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/catalog.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ angular.module('gettext').factory('gettextCatalog', function (gettextPlurals, ge
165165
this.strings[language] = {};
166166
}
167167

168+
var defaultPlural = gettextPlurals(language, 1);
168169
for (var key in strings) {
169170
var val = strings[key];
170171

@@ -185,7 +186,7 @@ angular.module('gettext').factory('gettextCatalog', function (gettextPlurals, ge
185186
var str = val[context];
186187
if (!angular.isArray(str)) {
187188
val[context] = [];
188-
val[context][gettextPlurals(language, 1)] = str;
189+
val[context][defaultPlural] = str;
189190
}
190191
}
191192
this.strings[language][key] = val;

0 commit comments

Comments
 (0)