Skip to content

Commit a20417b

Browse files
committed
Merge branch 'canary'
2 parents b0f0252 + 3800e10 commit a20417b

File tree

6 files changed

+49
-11
lines changed

6 files changed

+49
-11
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ env:
2828
- TEST_SCOPE=angular_1.5.x
2929
- TEST_SCOPE=angular_1.6.x
3030
- TEST_SCOPE=angular_1.7.x
31+
- TEST_SCOPE=angular_1.8.x

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Pascal Precht",
33
"name": "angular-translate",
44
"description": "A translation module for AngularJS",
5-
"version": "2.18.2",
5+
"version": "2.18.3",
66
"homepage": "http://github.com/angular-translate/angular-translate",
77
"ignore": [],
88
"repository": {

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-translate",
3-
"version": "2.18.2",
3+
"version": "2.18.3",
44
"description": "A translation module for AngularJS",
55
"main": "dist/angular-translate.js",
66
"repository": {
@@ -102,6 +102,6 @@
102102
"tar": "^4.4.13"
103103
},
104104
"dependencies": {
105-
"angular": "^1.7.9"
105+
"angular": "^1.8.0"
106106
}
107107
}

test/unit/directive/translate.spec.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,13 +478,24 @@ describe('pascalprecht.translate', function () {
478478
expect(element.children().text()).toEqual('hello my name is Pascal');
479479
});
480480

481-
it('should not translate the content if the content is empty and an attribute is being translated', function () {
482-
var markup = '<a href="#" translate translate-attr-title="SIMPLE">\n\t<i class="fa fa-home" />\n</a>';
483-
element = $compile(markup)($rootScope);
484-
$rootScope.$digest();
485-
expect(element.attr('title')).toEqual('Hello');
486-
expect(element.html().trim()).toEqual('<i class="fa fa-home"></i>');
487-
});
481+
482+
if (angular.version.major === 1 && angular.version.minor <= 7) {
483+
it('should not translate the content if the content is empty and an attribute is being translated', function () {
484+
var markup = '<a href="#" translate translate-attr-title="SIMPLE">\n\t<i class="fa fa-home" />\n</a>';
485+
element = $compile(markup)($rootScope);
486+
$rootScope.$digest();
487+
expect(element.attr('title')).toEqual('Hello');
488+
expect(element.html().trim()).toEqual('<i class="fa fa-home"></i>');
489+
});
490+
} else {
491+
it('should not translate the content if the content is empty and an attribute is being translated', function () {
492+
var markup = '<a href="#" translate translate-attr-title="SIMPLE">\n\t<i class="fa fa-home" />\n</a>';
493+
element = $compile(markup)($rootScope);
494+
$rootScope.$digest();
495+
expect(element.attr('title')).toEqual('Hello');
496+
expect(element.html().trim()).toEqual('<i class="fa fa-home">\n</i>');
497+
});
498+
}
488499

489500
it('should translate the content and the attribute if the element content is non empty text and the element has translated attributes', function () {
490501
var markup = '<a href="#" translate translate-attr-title="SIMPLE">SIMPLE</a>';

test_scopes/angular_1.8.x/bower.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"author": "Pascal Precht",
3+
"name": "angular-translate",
4+
"description": "A translation module for AngularJS",
5+
"version": "0.0.0",
6+
"homepage": "http://github.com/angular-translate/angular-translate",
7+
"ignore": [],
8+
"repository": {
9+
"type": "git",
10+
"url": "git://github.com/angular-translate/angular-translate"
11+
},
12+
"devDependencies": {
13+
"angular": "~1.8.0",
14+
"angular-mocks": "~1.8.0",
15+
"angular-cookies": "~1.8.0",
16+
"angular-sanitize": "~1.8.0",
17+
"messageformat": "~1.0.2"
18+
},
19+
"resolutions": {
20+
"angular": "~1.8.0"
21+
},
22+
"licenses": [{
23+
"type": "MIT",
24+
"url": "http://www.opensource.org/licenses/MIT"
25+
}]
26+
}

0 commit comments

Comments
 (0)