Skip to content

Commit a4712e3

Browse files
committed
fix(catalog): use updated keys for translation retrieval
Fixes rubenv#301 See: rubenv#312 Note: this commit / fork is just a temporary hold over to npm install from until this is officially fixed upstream.
1 parent 7d7ac67 commit a4712e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/catalog.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,13 @@ angular.module('gettext').factory('gettextCatalog', function (gettextPlurals, ge
210210
if (!language) {
211211
return null;
212212
}
213+
214+
// If we replaced the key in setStrings() then do it again
215+
// for retrieval (#301).
216+
if (isHTMLModified) {
217+
string = angular.element('<span>' + string + '</span>').html();
218+
}
219+
213220
var stringTable = this.strings[language] || {};
214221
var contexts = stringTable[string] || {};
215222
var plurals = contexts[context || noContext] || [];

0 commit comments

Comments
 (0)