feat(wallet): new/import wallets + multi-wallet i18n (P3)
Completes the wallet-files dialog and localizes the feature. - Create a new wallet: a name is normalized to wallet-<name>.dat and opened via switchToWallet; the daemon mints it (seed-backed, -usemnemonic=1) on first load. Rejects blank names + name collisions. - Import: out-of-datadir wallets get an Import action that copies the file into the datadir (never overwriting) under a wallet-*.dat name, then opens it — the daemon only loads plain filenames from the datadir. - i18n: the 32 new multi-wallet / per-wallet-contacts / mining-payout strings translated into all 8 languages (de/es/fr/ja/ko/pt/ru/zh), CJK subset font rebuilt. Verified: the Chinese Wallets dialog renders with no missing glyphs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -282,6 +282,12 @@ void App::buildSweepCatalog()
|
||||
e2.lastOpenedEpoch = 1719400000; e2.syncedHere = true;
|
||||
a.walletIndex().upsert(e1);
|
||||
a.walletIndex().upsert(e2);
|
||||
// An out-of-datadir wallet (in an extra folder) so the Import action shows too.
|
||||
const std::string extra = util::Platform::getConfigDir() + "extra-wallets";
|
||||
fs::create_directories(extra, ec);
|
||||
if (!fs::exists(extra + "/my-wallet.dat", ec))
|
||||
std::ofstream(extra + "/my-wallet.dat", std::ios::binary) << std::string(80000, '\0');
|
||||
a.walletIndex().addExtraFolder(extra);
|
||||
if (a.settings()) a.settings()->setActiveWalletFile("wallet.dat");
|
||||
ui::WalletsDialog::show(&a);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user