Merge pull request #2528

551a8ea6 mnemonics: new Lojban word list (Wei Tang)
This commit is contained in:
Riccardo Spagni 2017-10-15 17:27:58 +02:00
commit 5df4ecbb83
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
4 changed files with 1706 additions and 3 deletions

View file

@ -46,7 +46,8 @@ set(mnemonics_private_headers
russian.h
singleton.h
spanish.h
esperanto.h)
esperanto.h
lojban.h)
monero_private_headers(mnemonics
${mnemonics_private_headers})

View file

@ -62,6 +62,7 @@
#include "japanese.h"
#include "russian.h"
#include "esperanto.h"
#include "lojban.h"
#include "english_old.h"
#include "language_base.h"
#include "singleton.h"
@ -97,6 +98,7 @@ namespace
Language::Singleton<Language::Japanese>::instance(),
Language::Singleton<Language::Russian>::instance(),
Language::Singleton<Language::Esperanto>::instance(),
Language::Singleton<Language::Lojban>::instance(),
Language::Singleton<Language::EnglishOld>::instance()
});
Language::Base *fallback = NULL;
@ -360,6 +362,10 @@ namespace crypto
{
language = Language::Singleton<Language::Esperanto>::instance();
}
else if (language_name == "Lojban")
{
language = Language::Singleton<Language::Lojban>::instance();
}
else
{
return false;
@ -415,7 +421,8 @@ namespace crypto
Language::Singleton<Language::Russian>::instance(),
Language::Singleton<Language::Japanese>::instance(),
Language::Singleton<Language::Chinese_Simplified>::instance(),
Language::Singleton<Language::Esperanto>::instance()
Language::Singleton<Language::Esperanto>::instance(),
Language::Singleton<Language::Lojban>::instance()
});
for (std::vector<Language::Base*>::iterator it = language_instances.begin();
it != language_instances.end(); it++)

1693
src/mnemonics/lojban.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -45,6 +45,7 @@
#include "mnemonics/french.h"
#include "mnemonics/dutch.h"
#include "mnemonics/esperanto.h"
#include "mnemonics/lojban.h"
#include "mnemonics/english_old.h"
#include "mnemonics/language_base.h"
#include "mnemonics/singleton.h"
@ -167,7 +168,8 @@ TEST(mnemonics, all_languages)
Language::Singleton<Language::Russian>::instance(),
Language::Singleton<Language::French>::instance(),
Language::Singleton<Language::Dutch>::instance(),
Language::Singleton<Language::Esperanto>::instance()
Language::Singleton<Language::Esperanto>::instance(),
Language::Singleton<Language::Lojban>::instance()
});
for (std::vector<Language::Base*>::iterator it = languages.begin(); it != languages.end(); it++)