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

Add Dutch translation and reduce hardcoded language in scripts #398

Merged
merged 4 commits into from
Dec 1, 2024

Conversation

createthisnl
Copy link
Contributor

Removed device_count and scanner_count strings. The variables from these strings have been split into separate keys: device_counter_active, device_counter_devices, scanner_counter_active, scanner_counter_scanners. These keys only contain the numerical values ​​and are applied as such in the translation file.

(I also tried to move the status messages to the translation file, but I haven't succeeded yet. The preparations for this are already in the .json translation files.)

For this reason, the translation files for Greek and English have also been updated to work with this adjustment. In addition, I have created a translation file for the Dutch language.

I tested these changes with Home Assistant 2024.11.3

Add Dutch translation
Changed init description string to work with translation file. This was hardcoded in config_flow.py
Changed init description string to work with translation file. This was hardcoded in config_flow.py
Removed device_count and scanner_count strings. The variables from these strings have been split into separate keys: device_counter_active, device_counter_devices, scanner_counter_active, scanner_counter_scanners. These keys only contain the numerical values ​​and are applied as such in the translation file.

I also tried to move the status messages to the translation file, but I haven't succeeded yet. The preparations for this are already in the .json translation files.
@agittins
Copy link
Owner

This is great J-D, thanks!

Yes I had to do some pretty ugly things to create a flow with instructions, some of which seems to break when trying to put it into the translation files, and some of which just needed cleaning up - thanks for your efforts on both counts!

I'm happy to merge this as-is, or happy for you to continue working on solving the status message issue. My preference is probably to merge sooner and do another PR for any later fixes, but whichever works for you.

@createthisnl
Copy link
Contributor Author

Hi Ashley,

You're welcome, thank you for the hard work on this project. With creativity, ugly things do sneak in sometimes. But that doesn't take away from the fact that it definitely adds something in this (yet) complex matter.

I've already been fiddling with getting the status messages into the translation file, but that's a bit more drastic than the change I've done now. Therefore, I also think this is otherwise good as is, and put further optimizations in a separate request later.

I'm glad I can contribute something to the project, and I may check back in for more any time soon. Keep up the good work!

@agittins agittins merged commit d8d6272 into agittins:main Dec 1, 2024
6 checks passed
@agittins
Copy link
Owner

agittins commented Dec 1, 2024

Brilliant, I've merged this now so it will be in the next release. Totally agreed with getting this in now and making iterative improvements later, so that's great.

Thanks again for your contribution (and attention to detail!) - very much appreciated, and look forward to your next foray :-)

agittins pushed a commit to Lash-L/bermuda that referenced this pull request Dec 1, 2024
…ins#398)

* Add Dutch translation
* Update Greek translation
* Update English (base) translation
* Update config_flow.py to work better with translations
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.

2 participants