-
Notifications
You must be signed in to change notification settings - Fork 171
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
Initial l10n / multilanguage support #620
Draft
kdmukai
wants to merge
220
commits into
SeedSigner:dev
Choose a base branch
from
kdmukai:initial_multilanguage_0.8.0
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Versions `Pillow` up to 9.1.0
…nshot generator screens * Improved `SeedReviewPassphraseScreen` display * Blue "Sign" icon replaces green paper airplane. * New `SeedPassphraseWarningView` before adding passphrase, plus `Settings` option to disable. * TextArea spacing bugfix * Additional note on SeedBackupScreen
* Filter out LANCZOS deprecation warnings from pytest output * Prevent ScreenshotRenderer from attempting to capture background task rendering jobs. * Bugfix to stop loading screen spinner if PSBTParser fails. *
* CS update * PT update * Screenshot generator bugfix
Also eliminates rand diff issues with SeedWordsBackupTestView
Working on a new pi02w development board, have tried up to 80ea2cb but need to review code changes since last review. |
* Scrolling enabled for TopNav titles, Button, LargeIconButton. * Button label text can be different between Active and Inactive states. * Syncing to latest updates in screenshots submodule. * Update to how child Component threads get managed by parent Screen.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a MASSIVE refactor. Apologies to all!!
(this description is still a work-in-progress; more details will be added before this DRAFT PR is flipped to Ready for Review)
Review the new l10n/README.md to get the basics of how the translations are implemented. The biggest key is that we have to be a bit savvy about TWO distinct (yet often overlapping) translation-related tasks:
New:
Submodule dependency on the new
seedsigner-translations
repo.ButtonOption
class to manageView.button_data
entries. Allows us to preserve the existing approach of using class-level attrs to indicate user options in aView
(e.g.MainMenuView.TOOLS
vsMainMenuView.SCAN
). It's wired up to mark the user-facing button labels as needing translation. But never translates those values based on locale (that happens later in theScreen
classes; we need these class-level attrs to remain untranslated). Bonus: cleans up some sloppy tuple-based code in those attrs and enables some nicer handling (see itsreturn_data
field).seedsigner.helpers.l10n.mark_for_translation
: you'll see this imported as_mft
and used for any class-level attr that isn't already covered by theButtonOption
above (e.g. a class-level display field liketitle
that has an English literal string). As far as the translation handling goes, it behaves the same asButtonOption
: mark it for translation, but do not provide the translated version.Screenshot generator made l10n aware, generates screenshots in each supported language.
pytest
: dynamically considers each locale as a separate test to report progress on.pytest.skip
for deactivated locales when the optional--locale
command line arg is present.TopNav
scrollable titles via updatedTextArea
component. Autoscrolls if the title is too long to display.ScrollableTextLine
added as a convenience class that's really just a scrolling single lineTextArea
.Simplified
python-babel
CLI commands viasetup.py
andsetup.cfg
.python-babel
does not havepyproject.toml
integration, unfortunately. Sosetup.py
is back in skeleton form to enable the CLI convenience; the simplicity ofpython setup.py extract_messages
is worth some extra project file cruft.setup.cfg
contains all the configuration for theextract_messages
andcompile_catalog
integrations we need.misc:
tests/run_full_coverage.sh
convenience script to generate local code coverage reports that combine the results from the test suite and the screenshot generator.coverage
file filtering inpyproject.toml
to account for the additional GUI /Screen
coverage provided by the screenshot generator.seedsigner-translations
repo as a submodule for the new l10n tests to pass).This pull request is categorized as a:
Checklist
pytest
and made sure all unit tests pass before sumbitting the PRIf you modified or added functionality/workflow, did you add new unit tests?
I have tested this PR on the following platforms/os: