mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 04:33:50 +01:00
Refactor
This commit is contained in:
parent
5666f0981f
commit
e68767cf02
@ -32,17 +32,14 @@ export default (lang, locale) => {
|
||||
exclude: /node_modules/,
|
||||
loader: StringReplacePlugin.replace({
|
||||
replacements: [{
|
||||
pattern: /"%i18n:(.+?)%"/g, replacement: (_, key) => {
|
||||
return '"' + get(key).replace(/"/g, '\\"') + '"';
|
||||
}
|
||||
pattern: /"%i18n:(.+?)%"/g, replacement: (_, key) =>
|
||||
'"' + get(key).replace(/"/g, '\\"') + '"'
|
||||
}, {
|
||||
pattern: /'%i18n:(.+?)%'/g, replacement: (_, key) => {
|
||||
return '\'' + get(key).replace(/'/g, '\\\'') + '\'';
|
||||
}
|
||||
pattern: /'%i18n:(.+?)%'/g, replacement: (_, key) =>
|
||||
'\'' + get(key).replace(/'/g, '\\\'') + '\''
|
||||
}, {
|
||||
pattern: /%i18n:(.+?)%/g, replacement: (_, key) => {
|
||||
return get(key);
|
||||
}
|
||||
pattern: /%i18n:(.+?)%/g, replacement: (_, key) =>
|
||||
get(key)
|
||||
}]
|
||||
})
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user