shaonianzhentan / node-red-contrib-ha-mqtt

在HomeAssistant中生成MQTT实体
https://github.com/shaonianzhentan/node-red-contrib-ha-mqtt
MIT License
37 stars 19 forks source link

English translation #4

Closed emkookmer closed 2 years ago

emkookmer commented 2 years ago

These updates by @benfiglin will translate the code to English as requested in #3

benfiglin commented 2 years ago

Hmm I actually wasn't planning on creating a PR for that yet. I had to do a quick and dirty patch and should have done it in a separate branch since there are other things in there that do not belong to the English translation.

benfiglin commented 2 years ago

No need to spam with comments on each missing translation. This fork is incomplete, and should not be merged yet.

benfiglin commented 2 years ago

@emkookmer You really don't read others' comments... do you?

emkookmer commented 2 years ago

Hi @benfiglin ,

I do reed comments, but I was using review mode, which doesn't show comment/replies.

Also I know this branch isn't ready yet, but with this I hoped to create insight for everyone interested.

my apologies, my enthusiasm got the better of me

benfiglin commented 2 years ago

@emkookmer instead of spamming my email with 30 comments, you could have just created a fork and fixed those translation issues.

I needed a quick and dirty solution for myself and used google translate to do the translation (hence the obvious translation mistakes). I also changed other things to fit my needs, so this PR will contain many "breaking" changes. I planned to create a clean PR with a proper translation at some point, but I don't have the time for this right now.

If you have the time, please fork the original and do the fixes since my fork is a breaking change and should not be merged here.

emkookmer commented 2 years ago

Hi @benfiglin

The breaking changes you are referring to, might that be the "device" you added? If so, I think this is a welcome addition even though it's backwards incompatible.

With correct version tagging this shouldn't be a problem.

benfiglin commented 2 years ago

It is very welcome, but it will break the node for those who update. I also changed the default device identifiers which will break the existing devices in HA. Finally, I probably made it unusable for the Chinese users since I removed the use of the pinyin module.

The PR should focus on one and only thing, which is the translation. Other PRs can focus on things like adding a device definition, etc.

Also, you realize that we take someone's work which was made for the Chinese speaking community and make it unusable for them? I think there needs to be a separate repository for the English version of this addon, since I'm sure some would still like to use this one in Chinese. Even better, follow this for internationalization and make both languages available: https://nodered.org/docs/creating-nodes/i18n

Also just a tip, next time use the "Start Review" option instead of posting single comments 😉: image

emkookmer commented 2 years ago

I realize that it was made for the Chinese speaking community, but the same can be said when publishing a library/palette which is used by all other communities.

Thus internationalization is definitely the way to go.

BTW, thanks for the tip

benfiglin commented 2 years ago

I think it should have been made for the default language of Node Red first (en-US) and then add additional languages to it as needed. But since it is already public and used we need to make sure that any changes introduced will not break it for everyone else.

I might look into the internationalization next week or so, and maybe create a proper, clean PR.