diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-08-15 17:34:29 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-08-15 17:34:29 -0500 |
commit | 8c4b3f37362239d45a60139c2e5e83cad6823893 (patch) | |
tree | a22648c9bdd17ca388db3652709b3ceb2b20a257 /src/simplewallet | |
parent | Merge pull request #4165 (diff) | |
parent | simplewallet: fix language detection when using --use-english-language-names (diff) | |
download | monero-8c4b3f37362239d45a60139c2e5e83cad6823893.tar.xz |
Merge pull request #4166
5e675de simplewallet: fix language detection when using --use-english-language-names (moneromooo-monero)
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 308f07ec8..bb8ae6517 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -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 |