@abp/core 7.0.0-rc.2 → 7.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/abp.js +9 -3
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "7.0.0-rc.
|
|
2
|
+
"version": "7.0.0-rc.4",
|
|
3
3
|
"name": "@abp/core",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@abp/utils": "~7.0.0-rc.
|
|
13
|
+
"@abp/utils": "~7.0.0-rc.4"
|
|
14
14
|
},
|
|
15
15
|
"gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431"
|
|
16
16
|
}
|
package/src/abp.js
CHANGED
|
@@ -135,14 +135,20 @@ var abp = abp || {};
|
|
|
135
135
|
if (sourceName === '_') { //A convention to suppress the localization
|
|
136
136
|
return key;
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
if (sourceName) {
|
|
140
|
+
return abp.localization.internal.localize.apply(this, arguments).value;
|
|
141
|
+
}
|
|
138
142
|
|
|
139
|
-
|
|
140
|
-
if (!sourceName) {
|
|
143
|
+
if (!abp.localization.defaultResourceName) {
|
|
141
144
|
abp.log.warn('Localization source name is not specified and the defaultResourceName was not defined!');
|
|
142
145
|
return key;
|
|
143
146
|
}
|
|
144
147
|
|
|
145
|
-
|
|
148
|
+
var copiedArguments = Array.prototype.slice.call(arguments, 0);
|
|
149
|
+
copiedArguments.splice(1, 1, abp.localization.defaultResourceName);
|
|
150
|
+
|
|
151
|
+
return abp.localization.internal.localize.apply(this, copiedArguments).value;
|
|
146
152
|
};
|
|
147
153
|
|
|
148
154
|
abp.localization.isLocalized = function (key, sourceName) {
|