webpack-easyi18n 0.5.1 → 0.5.2
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 +1 -1
- package/src/index.js +5 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -167,10 +167,14 @@ class EasyI18nPlugin {
|
|
|
167
167
|
}
|
|
168
168
|
} else {
|
|
169
169
|
// .po files use \n notation for line breaks
|
|
170
|
-
const
|
|
170
|
+
const translationKeyRaw = nuggetSyntaxRemoved.replace(/\r\n/g, '\n');
|
|
171
|
+
const translationKey = unescapeJsLike(translationKeyRaw);
|
|
171
172
|
|
|
172
173
|
// find this nugget in the locale's array of translations
|
|
173
174
|
replacement = translationLookup[translationKey];
|
|
175
|
+
if (typeof (replacement) === "undefined") {
|
|
176
|
+
replacement = translationLookup[translationKeyRaw];
|
|
177
|
+
}
|
|
174
178
|
if (typeof (replacement) === "undefined" || replacement === "") {
|
|
175
179
|
if (this.options.warnOnMissingTranslations) {
|
|
176
180
|
compilation.warnings.push(
|