-
Notifications
You must be signed in to change notification settings - Fork 6
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
I18n support with generated class #140
Closed
HenrikJannsen
wants to merge
12
commits into
bisq-network:main
from
HenrikJannsen:i18n-support-with-generated-class
Closed
I18n support with generated class #140
HenrikJannsen
wants to merge
12
commits into
bisq-network:main
from
HenrikJannsen:i18n-support-with-generated-class
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
Not working yet on ios. Processing of the file content need more work (manual linebreaks not detected yet) and testing.
FOr ios its still not working. several attempts are kept in commented out form...
Build fails as it seems it does not access the src dir with the generated class correctly.
909b7e9
to
032d484
Compare
rebased against main |
gave a time-boxed effort but couldn't get it to work on iOS yet. needs more work. |
this is also trying to solve #137 |
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.
As after several more hours wasted to try to get the resources into iOS, I tried a different approach by creating a gradle task which converts the resources into a kotlin object.
It can be created by:
./gradlew generateResourceBundles
and will be located in
build/generated/commonMain/network/bisq/mobile/i18n/GeneratedResourceBundles.kt
It should be triggered by the relevant build tasks.
The generated kotlin object though seems to not be accessible in the build as it fails with:
Maybe @rodvar has an idea what causes that error and how to fix it.
If we get that build error resolved, we could either use that generated kotlin object for all deploy targets or only for iOS and use the normal resources for android.
There would be some headroom for optimisation to only use the selected language to avoid loading all language strings. The generated kotlin object is 1.6 MB, the resources about 2.2 MB.