-
Notifications
You must be signed in to change notification settings - Fork 50
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
fix:The Build Task for i18n to res folder not working properly #245
fix:The Build Task for i18n to res folder not working properly #245
Conversation
Thank you for the pull request!The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Android rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you! Maintainer checklist |
app/build.gradle.kts
Outdated
|
||
val locales = listOf("de", "es", "sv", "en-US") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to expand this with the other localizations that are included in Scribe-i18n?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val locales = file("src/main/assets/i18n/Scribe-i18n/values").listFiles()
?.filter { it.isDirectory }
?.map { it.name }
?: emptyList()
could we use something like this. it will be scalable to all locales we have.
I tried it on workspace and gave me.
[ar, bn, sv, es, en-US, pt, de, fr, mr, ko, ru, hi] ddd
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/ar/ to src/main/res/values-ar/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/bn/ to src/main/res/values-bn/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/sv/ to src/main/res/values-sv/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/es/ to src/main/res/values-es/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/en-US/ to src/main/res/values/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/pt/ to src/main/res/values-pt/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/de/ to src/main/res/values-de/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/fr/ to src/main/res/values-fr/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/mr/ to src/main/res/values-mr/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/ko/ to src/main/res/values-ko/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/ru/ to src/main/res/values-ru/
Preparing to move from src/main/assets/i18n/Scribe-i18n/values/hi/ to src/main/res/values-hi/
Appreciate the help, @MahmoudMabrok! Your version of getting the locales worked great, and from there we needed to add them all to the UI. This has been done by hand so far, but maybe we can figure out a way to load those dynamically as well 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix here, @angrezichatterbox, and also for the collaboration to get it all working, @MahmoudMabrok! 😊
Contributor checklist
./gradlew lintKotlin detekt test
command as directed in the testing section of the contributing guideDescription
The gradle task for transferring files from i18n to the res folder for localization was not transferring files, which caused the i18n update to not be reflected in the res folder.
Related issue