mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-03 16:38:31 +00:00
4.5.3
The Great Maintenance Update. No new features here. Instead, we've updated the build system to webpack 4, updated all our dependencies, and cleaned up a lot of linting issues.
This commit is contained in:
parent
014eb203c3
commit
33e81bc7eb
60 changed files with 238 additions and 209 deletions
22
src/i18n.js
22
src/i18n.js
|
@ -14,20 +14,18 @@ import NewTransCore from 'utilities/translation-core';
|
|||
|
||||
const FACES = ['(・`ω´・)', ';;w;;', 'owo', 'ono', 'oAo', 'oxo', 'ovo;', 'UwU', '>w<', '^w^', '> w >', 'v.v'],
|
||||
|
||||
transformText = (ast, fn) => {
|
||||
return ast.map(node => {
|
||||
if ( typeof node === 'string' )
|
||||
return fn(node);
|
||||
transformText = (ast, fn) => ast.map(node => {
|
||||
if ( typeof node === 'string' )
|
||||
return fn(node);
|
||||
|
||||
else if ( typeof node === 'object' && node.o ) {
|
||||
const out = Object.assign(node, {o: {}});
|
||||
for(const key of Object.keys(node.o))
|
||||
out.o[key] = transformText(node.o[key], fn)
|
||||
}
|
||||
else if ( typeof node === 'object' && node.o ) {
|
||||
const out = Object.assign(node, {o: {}});
|
||||
for(const key of Object.keys(node.o))
|
||||
out.o[key] = transformText(node.o[key], fn)
|
||||
}
|
||||
|
||||
return node;
|
||||
})
|
||||
},
|
||||
return node;
|
||||
}),
|
||||
|
||||
owo = text => text
|
||||
.replace(/(?:r|l)/g, 'w')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue