Added Simplified Chinese electrum word list

This commit is contained in:
Nano Akron 2017-04-16 11:24:40 +01:00
parent 9ed496bbc5
commit 54bcd260ff
No known key found for this signature in database
GPG Key ID: 346A337AA2EA8B57
4 changed files with 1720 additions and 1 deletions

View File

@ -33,6 +33,7 @@ set(mnemonics_headers)
set(mnemonics_private_headers
electrum-words.h
chinese_simplified.h
english.h
dutch.h
french.h

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,7 @@
#include <boost/crc.hpp>
#include <boost/algorithm/string/join.hpp>
#include "chinese_simplified.h"
#include "english.h"
#include "dutch.h"
#include "french.h"
@ -84,6 +85,7 @@ namespace
{
// If there's a new language added, add an instance of it here.
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(),
@ -348,6 +350,10 @@ namespace crypto
{
language = Language::Singleton<Language::Russian>::instance();
}
else if (language_name == "Chinese (Simplified)")
{
language = Language::Singleton<Language::Chinese_Simplified>::instance();
}
else
{
return false;
@ -393,6 +399,7 @@ namespace crypto
void get_language_list(std::vector<std::string> &languages)
{
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(),

View File

@ -34,6 +34,7 @@
#include <time.h>
#include <iostream>
#include <boost/algorithm/string.hpp>
#include "mnemonics/chinese_simplified.h"
#include "mnemonics/english.h"
#include "mnemonics/spanish.h"
#include "mnemonics/portuguese.h"
@ -155,6 +156,7 @@ TEST(mnemonics, all_languages)
{
srand(time(NULL));
std::vector<Language::Base*> languages({
Language::Singleton<Language::Chinese_Simplified>::instance(),
Language::Singleton<Language::English>::instance(),
Language::Singleton<Language::Spanish>::instance(),
Language::Singleton<Language::Portuguese>::instance(),
@ -163,7 +165,7 @@ TEST(mnemonics, all_languages)
Language::Singleton<Language::Italian>::instance(),
Language::Singleton<Language::Russian>::instance(),
Language::Singleton<Language::French>::instance(),
Language::Singleton<Language::Dutch>::instance(),
Language::Singleton<Language::Dutch>::instance()
});
for (std::vector<Language::Base*>::iterator it = languages.begin(); it != languages.end(); it++)