@lingui/loader 3.13.3 → 3.15.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/package.json +4 -5
- package/webpackLoader.js +4 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/loader",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "webpack loader for lingui message catalogs",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"main": "index.js",
|
|
@@ -31,10 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.11.2",
|
|
34
|
-
"@lingui/cli": "^3.
|
|
35
|
-
"@lingui/conf": "^3.
|
|
36
|
-
"loader-utils": "^2.0.0"
|
|
37
|
-
"ramda": "^0.27.1"
|
|
34
|
+
"@lingui/cli": "^3.15.0",
|
|
35
|
+
"@lingui/conf": "^3.15.0",
|
|
36
|
+
"loader-utils": "^2.0.0"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
39
|
"memory-fs": "^0.5.0"
|
package/webpackLoader.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
4
|
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -11,8 +9,6 @@ exports.default = _default;
|
|
|
11
9
|
|
|
12
10
|
var _path = _interopRequireDefault(require("path"));
|
|
13
11
|
|
|
14
|
-
var R = _interopRequireWildcard(require("ramda"));
|
|
15
|
-
|
|
16
12
|
var _conf = require("@lingui/conf");
|
|
17
13
|
|
|
18
14
|
var _api = require("@lingui/cli/api");
|
|
@@ -72,13 +68,10 @@ function _default(source) {
|
|
|
72
68
|
locale = _getCatalogForFile.locale,
|
|
73
69
|
catalog = _getCatalogForFile.catalog;
|
|
74
70
|
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
sourceLocale: config.sourceLocale
|
|
80
|
-
});
|
|
81
|
-
}, catalogs[locale]); // In production we don't want untranslated strings. It's better to use message
|
|
71
|
+
var messages = catalog.getTranslations(locale, {
|
|
72
|
+
fallbackLocales: config.fallbackLocales,
|
|
73
|
+
sourceLocale: config.sourceLocale
|
|
74
|
+
}); // In production we don't want untranslated strings. It's better to use message
|
|
82
75
|
// keys as a last resort.
|
|
83
76
|
// In development, however, we want to catch missing strings with `missing` parameter
|
|
84
77
|
// of I18nProvider (React) or setupI18n (core) and therefore we need to get
|