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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
2 deletions
-
npm/packs/core/src/abp.js
|
|
@ -106,7 +106,10 @@ var abp = abp || {}; |
|
|
var value = resource.texts[key]; |
|
|
var value = resource.texts[key]; |
|
|
if (value === undefined) { |
|
|
if (value === undefined) { |
|
|
for (var i = 0; i < resource.baseResources.length; i++){ |
|
|
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){ |
|
|
if (result.found){ |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
@ -139,7 +142,7 @@ var abp = abp || {}; |
|
|
return key; |
|
|
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) { |
|
|
abp.localization.isLocalized = function (key, sourceName) { |
|
|
|