-
Notifications
You must be signed in to change notification settings - Fork 798
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: localize incomplete fallback message
- Loading branch information
Marcy Sutton
committed
May 25, 2017
1 parent
9db63dc
commit e38bec1
Showing
9 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/*global helpers */ | ||
|
||
/** | ||
* Provides a fallback message in case incomplete checks don't provide one | ||
* This mechanism allows the string to be localized. | ||
* @return {String} | ||
*/ | ||
helpers.incompleteFallbackMessage = function incompleteFallbackMessage() { | ||
'use strict'; | ||
return axe._audit.data.incompleteFallbackMessage(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"incompleteFallbackMessage": "aXe couldn't tell the reason. Time to break out the element inspector!" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
describe('helpers.incompleteFallbackMessage', function() { | ||
'use strict'; | ||
before(function() { | ||
axe._load({ | ||
messages: {}, | ||
rules: [], | ||
data: { | ||
incompleteFallbackMessage: function anonymous() { | ||
return 'Dogs are the best'; | ||
} | ||
} | ||
}); | ||
}); | ||
|
||
it('should return a string', function() { | ||
var summary = helpers.incompleteFallbackMessage(); | ||
assert.equal(summary, 'Dogs are the best'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters