babybuddy / babybuddy-for-android

Android client for the Baby Buddy webapp
MIT License
16 stars 6 forks source link

Add Dutch translations #70

Closed zjean closed 6 months ago

zjean commented 6 months ago

(edit by @MrApplejuice)

Add dutch translation files to the project.

MrApplejuice commented 6 months ago

Hey there, thank you for your contribution!

Problem: translated palceholder texts

I found some time review your efforts. Unfortunately, the translation is a bit "borked". You accidentally translated a bunch of message placeholders, for example:

    <string name="popup_message_storing">Opslaan {activiteit}</string>

I did not quite describe this correctly, I think, but the {activiteit} string needs to remain the old English term {activity}:

    <string name="popup_message_storing">Opslaan {activity}</string>

Would be the correct Dutch translation. The reason why this is necessary is that the {activity} part links interfaces with hardcoded strings throughout the codebase. So these "magic names" need to remain unchanged.

It would be really handy if you could fix these renames, it will make the translations really usable. Right now the application I build wit this translation file attached does not work at all...

Missing help translation (optional)

Optional extra: I forgot one resource file, which is generated in a different way, but which is quite important to translate in its own right. That one is resources/help_images/help.md. It is a markdown file which I use for generating the help-pages. If you find some extra time, it would be very nice if you could look into translating that one as well? Creating a new resources/help_images/help-nl.md would do the trick.

If you do not have time to translate this, admittedly, bigger resource file, that is fine, too!

Open tasks for me

I am currently trying to link up all the resources correctly. There are a few misguided choices I made with embedding magic protocol strings in translation files. This is not super handy and needs to be undone so that a translated application can work in the first place. Also, in case you provide a help-nl.md file, I need to hook that one up.

Once the nl/strings.xml file is fixed I will attach a test-build of the application with translations to this PR so that we can see if everything looks correct. Varying lengths of translation strings can sometimes cause layout issues to appear in the application and because this is the first translation of the app, I was not able to check if the layout is sane in all places.

zjean commented 6 months ago

Thanks for your response. Apoligies for my mistakes. I updated the translation file and added the Dutch help file as well.

MrApplejuice commented 6 months ago

Thanks for your response. Apoligies for my mistakes.

No worries, thanks for wrapping your head around the required changes!

I got around to check the translation files, and there was one more simple case of a "mashed up" placeholder. See https://github.com/babybuddy/babybuddy-for-android/pull/71/commits/98d490f33098f1c3f6a487ab0fd76cb60f9ea754 for details.

I opened PR #71 to allow me to do some more code refactoring to make the application ready for the new translations you provided. There are some bugs right now that cause application crashes when the app is using the Dutch translations because of mistakes I made. Also, I clearly did not yet collect all strings, but that can be fixed in one last pass over the application.

Here a sneak-peak of what the app looks like when it uses the translations:

image

This PR can stay open. It will be automatically merged to master once I addressed all remaining issues from #71 .

MrApplejuice commented 6 months ago

@zjean - I now built a test version: https://github.com/babybuddy/babybuddy-for-android/releases/tag/v2.3.2a

If you want to have an early go an test that version, you can install it from that APK. I still need to integrate your translated help.md file though. That will be the last step. I expect the actual release to happen after this weekend.