Merge pull request #2002

12fff108 Change Old_English to English_Old - 'Old English' is actually a language (Nano Akron)
533187f0 Change all wallet language names into native names (and scripts) (Nano Akron)
This commit is contained in:
Riccardo Spagni 2017-05-05 11:29:51 +02:00
commit c17102c385
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
14 changed files with 44 additions and 44 deletions

View File

@ -41,7 +41,7 @@ set(mnemonics_private_headers
italian.h italian.h
japanese.h japanese.h
language_base.h language_base.h
old_english.h english_old.h
portuguese.h portuguese.h
russian.h russian.h
singleton.h singleton.h

View File

@ -72,7 +72,7 @@ namespace Language
class Chinese_Simplified: public Base class Chinese_Simplified: public Base
{ {
public: public:
Chinese_Simplified(): Base("Chinese (Simplified)", std::vector<std::string>({ Chinese_Simplified(): Base("简体中文 (中国)", std::vector<std::string>({
"", "",
"", "",
"", "",

View File

@ -49,7 +49,7 @@ namespace Language
class Dutch: public Base class Dutch: public Base
{ {
public: public:
Dutch(): Base("Dutch", std::vector<std::string>({ Dutch(): Base("Nederlands", std::vector<std::string>({
"aalglad", "aalglad",
"aalscholver", "aalscholver",
"aambeeld", "aambeeld",

View File

@ -61,7 +61,7 @@
#include "portuguese.h" #include "portuguese.h"
#include "japanese.h" #include "japanese.h"
#include "russian.h" #include "russian.h"
#include "old_english.h" #include "english_old.h"
#include "language_base.h" #include "language_base.h"
#include "singleton.h" #include "singleton.h"
@ -95,7 +95,7 @@ namespace
Language::Singleton<Language::Portuguese>::instance(), Language::Singleton<Language::Portuguese>::instance(),
Language::Singleton<Language::Japanese>::instance(), Language::Singleton<Language::Japanese>::instance(),
Language::Singleton<Language::Russian>::instance(), Language::Singleton<Language::Russian>::instance(),
Language::Singleton<Language::OldEnglish>::instance() Language::Singleton<Language::EnglishOld>::instance()
}); });
Language::Base *fallback = NULL; Language::Base *fallback = NULL;
@ -318,39 +318,39 @@ namespace crypto
{ {
language = Language::Singleton<Language::English>::instance(); language = Language::Singleton<Language::English>::instance();
} }
else if (language_name == "Dutch") else if (language_name == "Nederlands")
{ {
language = Language::Singleton<Language::Dutch>::instance(); language = Language::Singleton<Language::Dutch>::instance();
} }
else if (language_name == "French") else if (language_name == "Français")
{ {
language = Language::Singleton<Language::French>::instance(); language = Language::Singleton<Language::French>::instance();
} }
else if (language_name == "Spanish") else if (language_name == "Español")
{ {
language = Language::Singleton<Language::Spanish>::instance(); language = Language::Singleton<Language::Spanish>::instance();
} }
else if (language_name == "Portuguese") else if (language_name == "Português")
{ {
language = Language::Singleton<Language::Portuguese>::instance(); language = Language::Singleton<Language::Portuguese>::instance();
} }
else if (language_name == "Japanese") else if (language_name == "日本語")
{ {
language = Language::Singleton<Language::Japanese>::instance(); language = Language::Singleton<Language::Japanese>::instance();
} }
else if (language_name == "Italian") else if (language_name == "Italiano")
{ {
language = Language::Singleton<Language::Italian>::instance(); language = Language::Singleton<Language::Italian>::instance();
} }
else if (language_name == "German") else if (language_name == "Deutsch")
{ {
language = Language::Singleton<Language::German>::instance(); language = Language::Singleton<Language::German>::instance();
} }
else if (language_name == "Russian") else if (language_name == "русский язык")
{ {
language = Language::Singleton<Language::Russian>::instance(); language = Language::Singleton<Language::Russian>::instance();
} }
else if (language_name == "Chinese (Simplified)") else if (language_name == "简体中文 (中国)")
{ {
language = Language::Singleton<Language::Chinese_Simplified>::instance(); language = Language::Singleton<Language::Chinese_Simplified>::instance();
} }
@ -399,16 +399,16 @@ namespace crypto
void get_language_list(std::vector<std::string> &languages) void get_language_list(std::vector<std::string> &languages)
{ {
std::vector<Language::Base*> language_instances({ std::vector<Language::Base*> language_instances({
Language::Singleton<Language::Chinese_Simplified>::instance(),
Language::Singleton<Language::English>::instance(),
Language::Singleton<Language::Dutch>::instance(),
Language::Singleton<Language::French>::instance(),
Language::Singleton<Language::Spanish>::instance(),
Language::Singleton<Language::German>::instance(), Language::Singleton<Language::German>::instance(),
Language::Singleton<Language::English>::instance(),
Language::Singleton<Language::Spanish>::instance(),
Language::Singleton<Language::French>::instance(),
Language::Singleton<Language::Italian>::instance(), Language::Singleton<Language::Italian>::instance(),
Language::Singleton<Language::Dutch>::instance(),
Language::Singleton<Language::Portuguese>::instance(), Language::Singleton<Language::Portuguese>::instance(),
Language::Singleton<Language::Russian>::instance(), Language::Singleton<Language::Russian>::instance(),
Language::Singleton<Language::Japanese>::instance() Language::Singleton<Language::Japanese>::instance(),
Language::Singleton<Language::Chinese_Simplified>::instance()
}); });
for (std::vector<Language::Base*>::iterator it = language_instances.begin(); for (std::vector<Language::Base*>::iterator it = language_instances.begin();
it != language_instances.end(); it++) it != language_instances.end(); it++)

View File

@ -60,7 +60,7 @@ namespace crypto
{ {
const int seed_length = 24; const int seed_length = 24;
const std::string old_language_name = "OldEnglish"; const std::string old_language_name = "EnglishOld";
/*! /*!
* \brief Converts seed words to bytes (secret key). * \brief Converts seed words to bytes (secret key).
* \param words String containing the words separated by spaces. * \param words String containing the words separated by spaces.

View File

@ -29,13 +29,13 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*! /*!
* \file old_english.h * \file english_old.h
* *
* \brief Old English word list and map. * \brief Older version of English word list and map.
*/ */
#ifndef OLD_ENGLISH_H #ifndef ENGLISH_OLD_H
#define OLD_ENGLISH_H #define ENGLISH_OLD_H
#include <vector> #include <vector>
#include <unordered_map> #include <unordered_map>
@ -48,10 +48,10 @@
*/ */
namespace Language namespace Language
{ {
class OldEnglish: public Base class EnglishOld: public Base
{ {
public: public:
OldEnglish(): Base("OldEnglish", std::vector<std::string>({ EnglishOld(): Base("EnglishOld", std::vector<std::string>({
"like", "like",
"just", "just",
"love", "love",

View File

@ -49,7 +49,7 @@ namespace Language
class French: public Base class French: public Base
{ {
public: public:
French(): Base("French", std::vector<std::string>({ French(): Base("Français", std::vector<std::string>({
"abandon", "abandon",
"abattre", "abattre",
"aboi", "aboi",

View File

@ -51,7 +51,7 @@ namespace Language
class German: public Base class German: public Base
{ {
public: public:
German(): Base("German", std::vector<std::string>({ German(): Base("Deutsch", std::vector<std::string>({
"Abakus", "Abakus",
"Abart", "Abart",
"abbilden", "abbilden",
@ -1678,11 +1678,11 @@ namespace Language
"Zündung", "Zündung",
"Zweck", "Zweck",
"Zyklop" "Zyklop"
}), 4) }), 4)
{ {
populate_maps(); populate_maps();
} }
}; };
} }
#endif #endif

View File

@ -51,7 +51,7 @@ namespace Language
class Italian: public Base class Italian: public Base
{ {
public: public:
Italian(): Base("Italian", std::vector<std::string>({ Italian(): Base("Italiano", std::vector<std::string>({
"abbinare", "abbinare",
"abbonato", "abbonato",
"abisso", "abisso",
@ -1678,11 +1678,11 @@ namespace Language
"zolfo", "zolfo",
"zombie", "zombie",
"zucchero" "zucchero"
}), 4) }), 4)
{ {
populate_maps(); populate_maps();
} }
}; };
} }
#endif #endif

View File

@ -71,7 +71,7 @@ namespace Language
class Japanese: public Base class Japanese: public Base
{ {
public: public:
Japanese(): Base("Japanese", std::vector<std::string>({ Japanese(): Base("日本語", std::vector<std::string>({
"あいこくしん", "あいこくしん",
"あいさつ", "あいさつ",
"あいだ", "あいだ",

View File

@ -72,7 +72,7 @@ namespace Language
class Portuguese: public Base class Portuguese: public Base
{ {
public: public:
Portuguese(): Base("Portuguese", std::vector<std::string>({ Portuguese(): Base("Português", std::vector<std::string>({
"abaular", "abaular",
"abdominal", "abdominal",
"abeto", "abeto",

View File

@ -51,7 +51,7 @@ namespace Language
class Russian: public Base class Russian: public Base
{ {
public: public:
Russian(): Base("Russian", std::vector<std::string>({ Russian(): Base("русский язык", std::vector<std::string>({
"абажур", "абажур",
"абзац", "абзац",
"абонент", "абонент",
@ -1678,11 +1678,11 @@ namespace Language
"яхта", "яхта",
"ячейка", "ячейка",
"ящик" "ящик"
}), 4) }), 4)
{ {
populate_maps(); populate_maps();
} }
}; };
} }
#endif #endif

View File

@ -72,7 +72,7 @@ namespace Language
class Spanish: public Base class Spanish: public Base
{ {
public: public:
Spanish(): Base("Spanish", std::vector<std::string>({ Spanish(): Base("Español", std::vector<std::string>({
"ábaco", "ábaco",
"abdomen", "abdomen",
"abeja", "abeja",

View File

@ -44,7 +44,7 @@
#include "mnemonics/russian.h" #include "mnemonics/russian.h"
#include "mnemonics/french.h" #include "mnemonics/french.h"
#include "mnemonics/dutch.h" #include "mnemonics/dutch.h"
#include "mnemonics/old_english.h" #include "mnemonics/english_old.h"
#include "mnemonics/language_base.h" #include "mnemonics/language_base.h"
#include "mnemonics/singleton.h" #include "mnemonics/singleton.h"