mirror of
https://gitee.com/WeBank/fes.js.git
synced 2024-11-29 18:28:09 +08:00
fix(plugin-locale): 修复 win 环境处理文件路径问题
This commit is contained in:
parent
557aaaf586
commit
779ac16410
@ -23,11 +23,9 @@ export function getLocales(cwd) {
|
|||||||
|
|
||||||
export function getLocalesJSON(cwd) {
|
export function getLocalesJSON(cwd) {
|
||||||
const locales = getLocales(cwd);
|
const locales = getLocales(cwd);
|
||||||
return JSON.stringify(locales, null, 2)
|
return JSON.stringify(locales)
|
||||||
.replace(
|
.replace(
|
||||||
/"message": ("(.+?)")/g,
|
/"message": ("(.+?)")/g,
|
||||||
(global, m1, m2) => `"message": ${m2.replace(/\^/g, '"')}`
|
(global, m1, m2) => `"message": ${m2.replace(/\^/g, '"')}`
|
||||||
)
|
);
|
||||||
.replace(/\\r\\n/g, '\r\n')
|
|
||||||
.replace(/\\n/g, '\r\n');
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user