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

fix:The Build Task for i18n to res folder not working properly #245

Merged

Conversation

angrezichatterbox
Copy link
Member

Contributor checklist


Description

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

Copy link

github-actions bot commented Nov 16, 2024

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

  • The linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)


val locales = listOf("de", "es", "sv", "en-US")
Copy link
Member

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?

Copy link
Contributor

@MahmoudMabrok MahmoudMabrok Nov 16, 2024

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/

@andrewtavis
Copy link
Member

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 😊

Copy link
Member

@andrewtavis andrewtavis left a 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! 😊

@andrewtavis andrewtavis merged commit 1b73c89 into scribe-org:main Nov 16, 2024
3 checks passed
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.

3 participants