cryptoadvance / cryptoadvance/specter-diy
Implementing a language button
- Dominant language
- Python
- Stars
- 585
- Forks
- 108
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 5
Description
Potentially, we could translate all the language in the DIY. But how would we switch between the languages?
We need to modify the GUI. Where do we want to add the functionality? Probably here:
Maybe before the "Change PIN code". So searching for the "Global Settings" reveals the function where this is located: `update_devsettings()` . It's only about 50 lines long and pretty straightforward. The buttons arrax needs to be **extend**ed at the correct position. One needs to specify a number (the existing number are a bit strange but they don't have any meaning, just choose a "random" one) and check later in the loop (`while True:`) for that number and call a new (async) function in that case. Don't forget the `await` if calling async functions.
The new function need to specify a button per language (sorry, no idea how some sort of dropdown can be used) which can be guesses looking at the `update_devsettings()` function.
So now, what to do if the user chooses one of the supported languages?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in the GUI code containing update_devsettings() and its while True loop; trace how the existing settings buttons dispatch actions. Determine how the supported languages and async selection flow are represented, then verify that the language button appears in the intended Global Settings position and switches the DIY language.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend, internationalization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100