`sed`: Only delete one-line keys
Multiple line matching with `sed` is a nightmare. Handle these seldom cases by hand.pull/9863/head
parent
5ed645e77f
commit
f8c368f0fa
|
@ -4,7 +4,6 @@ const path = require('path');
|
||||||
|
|
||||||
const lilaDir = path.resolve(__dirname, '..');
|
const lilaDir = path.resolve(__dirname, '..');
|
||||||
const baseDir = path.resolve(lilaDir, 'translation/source');
|
const baseDir = path.resolve(lilaDir, 'translation/source');
|
||||||
console.log(baseDir)
|
|
||||||
const dbs =
|
const dbs =
|
||||||
'site arena emails learn activity coordinates study clas contact patron coach broadcast streamer tfa settings preferences team perfStat search tourname faq lag swiss puzzle puzzleTheme challenge storm ublog'.split(
|
'site arena emails learn activity coordinates study clas contact patron coach broadcast streamer tfa settings preferences team perfStat search tourname faq lag swiss puzzle puzzleTheme challenge storm ublog'.split(
|
||||||
' '
|
' '
|
||||||
|
|
|
@ -87,11 +87,12 @@ def main() -> None:
|
||||||
for path in SOURCE_DIR.iterdir():
|
for path in SOURCE_DIR.iterdir():
|
||||||
if not path.is_file():
|
if not path.is_file():
|
||||||
continue
|
continue
|
||||||
r = subprocess.run(["sed","-i", "", f"/{unused}/d", path], capture_output=True)
|
# Does not remove automatically multiple lines keys
|
||||||
|
r = subprocess.run(["sed","-i", "", f"/{unused}.*</d", path], capture_output=True)
|
||||||
|
print(r)
|
||||||
|
|
||||||
|
|
||||||
r = subprocess.run(["node",TRANS_DUMP], capture_output=True)
|
r = subprocess.run(["node",TRANS_DUMP], capture_output=True)
|
||||||
print(r)
|
|
||||||
sys.exit(r.returncode)
|
sys.exit(r.returncode)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue