mirror of
https://github.com/monero-project/monero.git
synced 2025-08-18 12:07:59 -04:00
Merge pull request #4166
5e675de
simplewallet: fix language detection when using --use-english-language-names (moneromooo-monero)
This commit is contained in:
commit
8c4b3f3736
2 changed files with 20 additions and 52 deletions
|
@ -3349,14 +3349,16 @@ bool simple_wallet::try_connect_to_daemon(bool silent, uint32_t* version)
|
|||
*/
|
||||
std::string simple_wallet::get_mnemonic_language()
|
||||
{
|
||||
std::vector<std::string> language_list;
|
||||
std::vector<std::string> language_list_self, language_list_english;
|
||||
const std::vector<std::string> &language_list = m_use_english_language_names ? language_list_english : language_list_self;
|
||||
std::string language_choice;
|
||||
int language_number = -1;
|
||||
crypto::ElectrumWords::get_language_list(language_list, m_use_english_language_names);
|
||||
crypto::ElectrumWords::get_language_list(language_list_self, false);
|
||||
crypto::ElectrumWords::get_language_list(language_list_english, true);
|
||||
std::cout << tr("List of available languages for your wallet's seed:") << std::endl;
|
||||
std::cout << tr("If your display freezes, exit blind with ^C, then run again with --use-english-language-names") << std::endl;
|
||||
int ii;
|
||||
std::vector<std::string>::iterator it;
|
||||
std::vector<std::string>::const_iterator it;
|
||||
for (it = language_list.begin(), ii = 0; it != language_list.end(); it++, ii++)
|
||||
{
|
||||
std::cout << ii << " : " << *it << std::endl;
|
||||
|
@ -3380,7 +3382,7 @@ std::string simple_wallet::get_mnemonic_language()
|
|||
fail_msg_writer() << tr("invalid language choice entered. Please try again.\n");
|
||||
}
|
||||
}
|
||||
return language_list[language_number];
|
||||
return language_list_self[language_number];
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
boost::optional<tools::password_container> simple_wallet::get_and_verify_password() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue