language loader support escape symbol
This commit is contained in:
parent
89feb0cfb9
commit
280858a513
|
@ -3,18 +3,18 @@
|
|||
|
||||
angular.module('ariaNg').factory('ariaNgLanguageLoader', ['$http', '$q', 'localStorageService', 'ariaNgConstants', 'ariaNgLanguages', function ($http, $q, localStorageService, ariaNgConstants, ariaNgLanguages) {
|
||||
var getKeyValuePair = function (line) {
|
||||
var equalSignPos = line.indexOf('=');
|
||||
|
||||
if (equalSignPos > 0) {
|
||||
for (var i = 0; i < line.length; i++) {
|
||||
if (i > 0 && line.charAt(i - 1) !== '\\' && line.charAt(i) === '=') {
|
||||
return {
|
||||
key: line.substring(0, equalSignPos),
|
||||
value: line.substring(equalSignPos + 1, line.length)
|
||||
key: line.substring(0, i).replace('\\=', '='),
|
||||
value: line.substring(i + 1, line.length).replace('\\=', '=')
|
||||
};
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
value: line
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
var getCategory = function (langObj, category) {
|
||||
|
|
Reference in a new issue