Browse Source

Merge pull request #14047 from abpframework/liangshiwei/abpjs

Fix JavaScript Localization API
pull/14090/head
Halil İbrahim Kalkan 4 years ago
committed by GitHub
parent
commit
bbe6212a20
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      npm/packs/core/src/abp.js

7
npm/packs/core/src/abp.js

@ -106,7 +106,10 @@ var abp = abp || {};
var value = resource.texts[key];
if (value === undefined) {
for (var i = 0; i < resource.baseResources.length; i++){
var result = abp.localization.internal.localize(key, resource.baseResources[i]);
var basedArguments = Array.prototype.slice.call(arguments, 0);
basedArguments[1] = resource.baseResources[i];
var result = abp.localization.internal.localize.apply(this, basedArguments);
if (result.found){
return result;
}
@ -139,7 +142,7 @@ var abp = abp || {};
return key;
}
return abp.localization.internal.localize(key, sourceName).value;
return abp.localization.internal.localize.apply(this, arguments).value;
};
abp.localization.isLocalized = function (key, sourceName) {

Loading…
Cancel
Save