Skip to content

Instantly share code, notes, and snippets.

$ node fix-updated-translation.js
[FixedPrevVer] no result matched. resname=BitcoinApplication sourceText=Settings file %1 might be corrupt or invalid.
no result matched. resname=BitcoinApplication sourceText=Settings file %1 might be corrupt or invalid.
[FixedPrevVer] no result matched. resname=BitcoinGUI sourceText=Ctrl+Q
no result matched. resname=BitcoinGUI sourceText=Ctrl+Q
[FixedPrevVer] no result matched. resname=BitcoinGUI sourceText=Restore Wallet…
no result matched. resname=BitcoinGUI sourceText=Restore Wallet…
[FixedPrevVer] no result matched. resname=BitcoinGUI sourceText=Restore a wallet from a backup file
no result matched. resname=BitcoinGUI sourceText=Restore a wallet from a backup file
[FixedPrevVer] no result matched. resname=BitcoinGUI sourceText=Wallet Data
@andronoob
andronoob / fix-updated-translation.js
Last active August 23, 2022 16:52
Modified https://gist.github.com/andronoob/eff442b8058781f829b925ff1c5d625d to fix unreleased updated version of Bitcoin Core
const fs = require('fs');
const { type } = require('os');
const xmljs = require('xml-js'); // https://github.com/nashwaan/xml-js
const toBeFixedXML = fs.readFileSync("for_use_bitcoin_qt-translation-024x_zh_CN.xlf", "utf-8");
const goodOneXML = fs.readFileSync("bitcoin_zh_CN.ts");
const fixedPrevVerXML = fs.readFileSync("for_use_bitcoin_qt-translation-023x_zh_CN.xlf")
const params = {
compact: true,
$ node fix-translation.js
no result matched. resname=QObject sourceText=Do you want to reset settings to default values, or to abort without making changes?
mark as SABOTAGED resname=QObject sourceText=Do you want to reset settings to default values, or to abort without making changes?
no result matched. resname=QObject sourceText=A fatal error occurred. Check that settings file is writable, or try running with -nosettings.
mark as SABOTAGED resname=QObject sourceText=A fatal error occurred. Check that settings file is writable, or try running with -nosettings.
no result matched. resname=bitcoin-core sourceText=Settings file could not be read
mark as SABOTAGED resname=bitcoin-core sourceText=Settings file could not be read
no result matched. resname=bitcoin-core sourceText=Settings file could not be written
mark as SABOTAGED resname=bitcoin-core sourceText=Settings file could not be written
no result matched. resname=BitcoinGUI sourceText=&Minimize
@andronoob
andronoob / fix-translation.js
Last active August 23, 2022 16:01
NodeJS script for fixing sabotaged zh_CN translation of Bitcoin Core project
const fs = require('fs');
const xmljs = require('xml-js'); // https://github.com/nashwaan/xml-js
const toBeFixedXML = fs.readFileSync("for_use_bitcoin_qt-translation-023x_zh_CN.xlf", "utf-8");
const goodOneXML = fs.readFileSync("bitcoin_zh_CN.ts");
const params = {
compact: true,
spaces: 2,
};
@andronoob
andronoob / debug.log.zip
Last active February 14, 2018 06:05
debug.log.zip
This file has been truncated, but you can view the full file.
@andronoob
andronoob / FsFilter1.sys
Last active July 18, 2018 06:58
Stupid NTFS FSD Hook Driver
diff -Nur old/shadowsocks-libev/src/jconf.c new/shadowsocks-libev/src/jconf.c
--- old/shadowsocks-libev/src/jconf.c 2015-02-14 08:04:02.000000000 +0000
+++ new/shadowsocks-libev/src/jconf.c 2015-02-27 16:17:37.000000000 +0000
@@ -171,6 +171,8 @@
conf.local_port = to_string(value);
} else if (strcmp(name, "password") == 0) {
conf.password = to_string(value);
+ } else if (strcmp(name, "user") == 0) {
+ conf.user = to_string(value);
} else if (strcmp(name, "method") == 0) {