WirelessAlien / BhagavadGitaApp

A Simple Open-source Android App for Bhagavad Gita
GNU General Public License v3.0
56 stars 8 forks source link

Unnecessary duplication of strings.xml #14

Closed shubhamnanche closed 12 months ago

shubhamnanche commented 12 months ago

String resources are duplicated into night and non-night strings.xml files I may be wrong but I don't know why there was a need to split strings.xml into two different files i.e. in the night and non-night string resource folders of android.

Expected behavior I have my own version of Bhagavad Gita app available on Play Store, and I certainly have not duplicated string resources based on the night mode flags; yet, I am able to retrieve the string resources irrespective of whether the app is running in light mode or dark mode. In your case, since you have lesser string resources, it doesn't impact much on the app size. But yes, you can use just one strings.xml in the res/values folder to reduce a few bytes of the source code.

Additional context In my case, I am using my own translations, not retrieving them from any online repo/website. Also, since my app supports 10 languages, if I were to make two (night and non-night) versions of each strings.xml, it would have significantly affected my app size. It's after all your app, you are the one to decide.

WirelessAlien commented 12 months ago

String resources are duplicated into night and non-night strings.xml files I may be wrong but I don't know why there was a need to split strings.xml into two different files i.e. in the night and non-night string resource folders of android.

I used that for image button (like play/pause), material image button is not available (main problem), when I change day to night mode the the button also becomes black ( means the base icon was black and it keeps black) then I search for a solution to make the icon white during night mode and got that method in stackoverflow. other 1 icons are just for the UI, to keep same colour with the other one. I actually don't know why that happened or my mistake somewhere also I didn't try to find some different solution 🤷‍♂️

shubhamnanche commented 12 months ago

Nevermind.. it's not a major issue. You may try removing the additional strings (night) resource file, and run the app and see if it still works. That won't take long to test. Also, I appreciate your work. It's not an essy feat to achieve this achievement.

A few things that I like about your app -

  1. Provided an option to increase and decrease the font size (pretty good feature). 👏
  2. Incorporated multiple translation/commentaries from multiple authors. 💫
  3. Implemented carousel that displays the shlokas for the day. 🙏
  4. Provided speech outputs for the shlokas in Sanskrit. 🔊

There are a few things that I think needs improvement and I'll raise them as individual issues with exact steps to reciprocate at your end. That way you can try to fix those bugs/issues. Maybe I can raise a PR if I am able to fix them, but first I need to understand your code. Again, good job brother. 😎 (You may close this issue if you want)

WirelessAlien commented 12 months ago

Nevermind.. it's not a major issue. You may try removing the additional strings (night) resource file, and run the app and see if it still works. That won't take long to test. Also, I appreciate your work. It's not an essy feat to achieve this achievement.

Thanks. I will 👍 A few things that I like about your app -

  1. Provided an option to increase and decrease the font size (pretty good feature). 👏
  2. Incorporated multiple translation/commentaries from multiple authors. 💫
  3. Implemented carousel that displays the shlokas for the day. 🙏
  4. Provided speech outputs for the shlokas in Sanskrit. 🔊

Thank you 🙂 There are a few things that I think needs improvement and I'll raise them as individual issues with exact steps to reciprocate at your end. That way you can try to fix those bugs/issues. Maybe I can raise a PR if I am able to fix them, but first I need to understand your code. Again, good job brother. 😎 (You may close this issue if you want)

I am new to coding, just trying to learn so that will be amazing. Again, Thank you. You are welcome 🤝