Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for more languages for mnemonics #2424

Merged
merged 5 commits into from
May 16, 2024

Conversation

wfjvdham
Copy link
Contributor

This pr will add support for french, japanese, czech and portuguese. It does this by using a newer version (v0.21) of the python-mnemonic package. The tests are updated to check if the new languages are created and detected correctly.

Removed this part:

# If we get French as language we have to double check whether it is not really an English mnemonic because of overlaps in the wordlists
if language == "french":
count = 0
for word in words_as_list:
if word in WORDLIST:
count += 1
if count == 12:
language = "english"

The detect_language() function takes into account ambiguity and returns an error if a language cannot successfully be determined in the new version of python-mnemonic.

Copy link

netlify bot commented Mar 18, 2024

Deploy Preview for specter-desktop-docs canceled.

Name Link
🔨 Latest commit a198f3f
🔍 Latest deploy log https://app.netlify.com/sites/specter-desktop-docs/deploys/66462d87441a250008c84cbc

test.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this needs deletion.

@k9ert k9ert merged commit 0ba9de2 into cryptoadvance:master May 16, 2024
9 checks passed
@k9ert
Copy link
Collaborator

k9ert commented May 16, 2024

Thanks for your contribution and sorry for the late feedback.

@wfjvdham
Copy link
Contributor Author

np, thanks!

@k9ert
Copy link
Collaborator

k9ert commented May 17, 2024

@tadeubas
Copy link

I think we shouldn't encourage users to store mnemonics in other languages to avoid dead ends because of the lack of support from other wallets and possible mistakes by the users. A quantitative study with 990 Bitcoin users by Krombholz et al. reported that 22.5% of respondents had lost Bitcoins at least once. The majority of incidents was caused by user mistakes (43.2%).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants