locizify 8.0.2 → 9.0.0
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/CHANGELOG.md +5 -0
- package/LICENSE +1 -1
- package/README.md +7 -7
- package/dist/umd/locizify.js +2 -8
- package/dist/umd/locizify.min.js +1 -1
- package/locizify.js +2 -8
- package/locizify.min.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Just drop the following line to your header to deliver your content in any langu
|
|
|
12
12
|
id="locizify"
|
|
13
13
|
projectid="[PROJECT_ID]"
|
|
14
14
|
apikey="[API_KEY]"
|
|
15
|
-
src="https://unpkg.com/locizify@^
|
|
15
|
+
src="https://unpkg.com/locizify@^9.0.0"
|
|
16
16
|
autopilot="true"
|
|
17
17
|
cdnType="standard"
|
|
18
18
|
></script>
|
|
@@ -22,7 +22,7 @@ Just drop the following line to your header to deliver your content in any langu
|
|
|
22
22
|
id="locizify"
|
|
23
23
|
projectid="[PROJECT_ID]"
|
|
24
24
|
apikey="[API_KEY]"
|
|
25
|
-
src="https://cdn.jsdelivr.net/npm/locizify@^
|
|
25
|
+
src="https://cdn.jsdelivr.net/npm/locizify@^9.0.0"
|
|
26
26
|
autopilot="true"
|
|
27
27
|
cdnType="standard"
|
|
28
28
|
></script>
|
|
@@ -71,7 +71,7 @@ Add the script to your page:
|
|
|
71
71
|
id="locizify"
|
|
72
72
|
projectid="[PROJECT_ID]"
|
|
73
73
|
apikey="[API_KEY]"
|
|
74
|
-
src="https://unpkg.com/locizify@^
|
|
74
|
+
src="https://unpkg.com/locizify@^9.0.0"
|
|
75
75
|
autopilot
|
|
76
76
|
cdnType="standard"
|
|
77
77
|
></script>
|
|
@@ -105,7 +105,7 @@ Add the script to your page:
|
|
|
105
105
|
apikey="[API_KEY]"
|
|
106
106
|
referencelng="[LNG]"
|
|
107
107
|
fallbacklng="[LNG]"
|
|
108
|
-
src="https://unpkg.com/locizify@^
|
|
108
|
+
src="https://unpkg.com/locizify@^9.0.0"
|
|
109
109
|
|
|
110
110
|
// all custom attributes can also be prefixed with data-
|
|
111
111
|
// data-projectid="[PROJECT_ID]"
|
|
@@ -120,7 +120,7 @@ Add the script to your page:
|
|
|
120
120
|
debug="[true|false (default false)]"
|
|
121
121
|
autopilot="[true|false (default false)]" // automatically configures fallbackLng and supportedLngs
|
|
122
122
|
load="[all|currentOnly|languageOnly (default all)]" // https://www.i18next.com/overview/configuration-options
|
|
123
|
-
cdnType="[standard|pro (default
|
|
123
|
+
cdnType="[standard|pro (default standard)]"
|
|
124
124
|
|
|
125
125
|
// others
|
|
126
126
|
// you can define any other option below just use the lowercased name and for arrays use comma separated values, eg.:
|
|
@@ -136,7 +136,7 @@ Add the script to your page:
|
|
|
136
136
|
<!DOCTYPE html>
|
|
137
137
|
<html>
|
|
138
138
|
<head>
|
|
139
|
-
<script src="https://unpkg.com/locizify@^
|
|
139
|
+
<script src="https://unpkg.com/locizify@^9.0.0"></script>
|
|
140
140
|
<script>
|
|
141
141
|
locizify.init({
|
|
142
142
|
// required
|
|
@@ -151,7 +151,7 @@ Add the script to your page:
|
|
|
151
151
|
allowedAddOrUpdateHosts: ['localhost']
|
|
152
152
|
// alternatively, pass a function:
|
|
153
153
|
allowedAddOrUpdateHosts: function(hostname) { return hostname.endsWith('staging.example.com') },
|
|
154
|
-
cdnType: '
|
|
154
|
+
cdnType: 'pro' // default 'standard'
|
|
155
155
|
},
|
|
156
156
|
|
|
157
157
|
// defaults that are set
|
package/dist/umd/locizify.js
CHANGED
|
@@ -7424,7 +7424,7 @@
|
|
|
7424
7424
|
return ("string" === r ? String : Number)(t);
|
|
7425
7425
|
}
|
|
7426
7426
|
var getApiPaths = function getApiPaths(cdnType) {
|
|
7427
|
-
if (!cdnType) cdnType = '
|
|
7427
|
+
if (!cdnType) cdnType = 'standard';
|
|
7428
7428
|
return {
|
|
7429
7429
|
loadPath: "https://api".concat(cdnType === 'standard' ? '.lite' : '', ".locize.app/{{projectId}}/{{version}}/{{lng}}/{{ns}}"),
|
|
7430
7430
|
privatePath: "https://api".concat(cdnType === 'standard' ? '.lite' : '', ".locize.app/private/{{projectId}}/{{version}}/{{lng}}/{{ns}}"),
|
|
@@ -7434,7 +7434,7 @@
|
|
|
7434
7434
|
};
|
|
7435
7435
|
};
|
|
7436
7436
|
var getDefaults$3 = function getDefaults(cdnType) {
|
|
7437
|
-
if (!cdnType) cdnType = '
|
|
7437
|
+
if (!cdnType) cdnType = 'standard';
|
|
7438
7438
|
return defaults$1({
|
|
7439
7439
|
cdnType: cdnType,
|
|
7440
7440
|
noCache: false,
|
|
@@ -7590,12 +7590,6 @@
|
|
|
7590
7590
|
Object.keys(apiPaths).forEach(function (ap) {
|
|
7591
7591
|
if (!orgPassedOptions[ap]) _this.options[ap] = apiPaths[ap];
|
|
7592
7592
|
});
|
|
7593
|
-
if (!orgPassedOptions.cdnType) {
|
|
7594
|
-
console.error('[i18next-locize-backend] In the next major version, the default \'cdnType\' will be \'standard\'. Please set \'cdnType\' explicitly in your options to avoid missing translations.');
|
|
7595
|
-
}
|
|
7596
|
-
if (this.options.pull) {
|
|
7597
|
-
console.warn('The pull API was removed use "private: true" option instead: https://www.locize.com/docs/api#fetch-private-namespace-resources');
|
|
7598
|
-
}
|
|
7599
7593
|
if (allOptions.debug && orgPassedOptions.noCache === undefined && this.options.cdnType === 'standard') {
|
|
7600
7594
|
this.options.noCache = true;
|
|
7601
7595
|
}
|