Skip to content

Commit d0e8613

Browse files
committed
Merge branch 'master' of github.com:rubenv/angular-gettext
Conflicts: dist/angular-gettext.min.js
2 parents 5e6cb34 + c6556cf commit d0e8613

5 files changed

Lines changed: 10 additions & 3 deletions

File tree

dist/angular-gettext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ angular.module('gettext').directive('translate', ["gettextCatalog", "$parse", "$
135135
}
136136

137137
return {
138-
restrict: 'A',
138+
restrict: 'AE',
139139
terminal: true,
140140
compile: function compile(element, attrs) {
141141
// Validate attributes

dist/angular-gettext.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

genplurals.py

100644100755
File mode changed.

src/directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ angular.module('gettext').directive('translate', function (gettextCatalog, $pars
1919
}
2020

2121
return {
22-
restrict: 'A',
22+
restrict: 'AE',
2323
terminal: true,
2424
compile: function compile(element, attrs) {
2525
// Validate attributes

test/unit/directive.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,11 @@ describe("Directive", function () {
211211
$rootScope.$digest();
212212
assert.equal(el.text(), "Die skakel: http://google.com sal die 'ng-binding' klass aangevoeg hê voor die translate directive dit kan vasvat.");
213213
});
214+
215+
it("Should work as an element", function () {
216+
catalog.currentLanguage = "nl";
217+
var el = $compile("<translate>Hello</translate>")($rootScope);
218+
$rootScope.$digest();
219+
assert.equal(el.text(), "Hallo");
220+
});
214221
});

0 commit comments

Comments
 (0)