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

希望能支持配置翻译字典 #98

Closed
yyax opened this issue Jun 17, 2024 · 17 comments · Fixed by #294
Closed

希望能支持配置翻译字典 #98

yyax opened this issue Jun 17, 2024 · 17 comments · Fixed by #294
Labels
enhancement New feature or request

Comments

@yyax
Copy link

yyax commented Jun 17, 2024

设备类型及型号 (或SN)

Front Load Washer 38124878

新功能的描述

好多设备的状态不是我想要的语言,等待homeassistant官方支持又遥遥无期,所以希望midea ac lan能支持配置翻译字典,就像mito那样的,谢谢啦!https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/core/translation_languages.py

@yyax yyax added the enhancement New feature or request label Jun 17, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Hope to support configuring translation dictionary

@caibinqing
Copy link
Collaborator

翻译会完善的,我正准备开始这块,不过估计会先按HA官方方案来一遍。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The translation will be perfected, and I'm about to start it, but I guess I'll do it according to the HA official plan first.

@yyax
Copy link
Author

yyax commented Jun 18, 2024

希望加快进程,辛苦了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I hope to speed up the process. Thank you for your hard work.

@wuwentao
Copy link
Owner

wuwentao commented Aug 19, 2024

@yyax 这个功能应该是根据设备具体类型来添加的,应该 @Necroneco 已经解决了,但是不同的设备可能需要分别添加多种翻译语言,工作量会比较大。不会一次把所有设备都加完,只能有需求了,逐个设备添加吧。
你的设备是滚筒洗衣机么? 也就是0xDB?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@yyax This function should come to Tianjin based on the specific type of device. It should have been solved by @Necroneco. However, different devices may need to add multiple translation languages ​​separately, and the workload will be relatively large.
Is your device a front-loading washing machine? That is 0xDB?

@yyax
Copy link
Author

yyax commented Aug 21, 2024

@yyax这个功能应该是根据设备具体类型来添加的,应该@Necroneco已经解决了,但是不同的设备可能需要分别添加翻译多种语言,工作量会比较大。一次不能把所有设备都加完,只能有需求了,逐个设备添加吧。 你的设备是货架洗衣机嗯?0xDB?

设备有滚筒洗衣机,洗碗机,微蒸烤,燃气热水器......

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@yyax This function should be added according to the specific type of device. It should have been solved by @Necroneco. However, different devices may need to add and translate multiple languages ​​separately, which will cause a relatively large workload. You cannot add all the devices at once, you can only add them one by one as needed. Your device is a shelf washing machine huh? 0xDB?

Equipment includes drum washing machine, dishwasher, micro-steam oven, water heater...

@wuwentao
Copy link
Owner

设备有点多,哈哈,但是现在尴尬的问题并不是技术问题,也不是需要翻译的设备量多大,而是:翻译成什么中文合适……
英文的基本不需要翻译,但是中文换成什么名词,和你app里面的匹配或者显示一致,就无法明确,也就是没有这个设备的话,不确定应该怎么翻译。

以前好像官方的lua脚本是带有完整的中文注释和说明,直接对着注释改就完事了,现在新版的我看了,已经没有注释了。

实在不行,就是只能用最笨的办法去干体力活了:借你账号登录美居,临时改密码,直接登录你账号,一个一个看实际的中文名字,尝试人工翻译一下关机的字段即可。

我先抽空找找是否有旧的带中文注释的lua脚本吧

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


There are a lot of equipment, haha, but the embarrassing problem now is not a technical issue, nor is it the amount of equipment that needs to be translated, but: what Chinese is suitable for translation...
The English version basically does not need to be translated, but it is not clear what nouns should be replaced by Chinese words that match or display in your app. In other words, if you don’t have this device, you are not sure how to translate it.

In the past, it seemed that the official Lua script had complete Chinese comments and instructions, and you could just modify the comments directly. Now I have read the new version, and there are no comments anymore.

If it really doesn't work, I can only use the stupidest way to do physical work: log in to Mercure with your account, change the password temporarily, log in to your account directly, look at the actual Chinese names one by one, and try to manually translate the shutdown fields. .

I'll take some time to look for old Lua scripts with Chinese comments first.

@yyax
Copy link
Author

yyax commented Aug 21, 2024

有点多,哈哈,但是现在设备尴尬的问题不是技术问题,也不是需要翻译的设备量多大,而是:翻译成什么中文合适…… 英文的基本不需要翻译,但是中文换成什么名词,和你app里面的匹配或者显示一致,就无法明确,如果没有这个条件的话,应该不确定怎么翻译。

以前希望官方的lua脚本带有完整的中文注释和说明,直接对注释修改就完事了,现在我看过新版本,已经没有注释了。

实在不行,就只能用最笨的办法去干体力活了:借你账号登录美居,临时改密码,直接登录你账号,一个看实际的中文名字,尝试人工翻译一下关机的字段即可。

我先抽空寻找是否有旧的带中文注释的lua脚本吧

如果逐个翻译的话确实是个体力活,所以我希望能够外挂字典来翻译就像miot集成那样的。比如洗衣机和洗碗机的状态都有Idle,如果能够外挂Idle=空闲(也可以是其他语言),那么就一下解决了多个设备的空闲状态,我不懂技术,只是说出自己的想法,感谢回复

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


A bit much, haha, but the problem of awkward equipment now is not a technical issue, nor is it the amount of equipment that needs to be translated, but: what Chinese is suitable for translation... The English basically does not need to be translated, but what nouns should be replaced by Chinese, and If the matching or display in your app is consistent, it will not be clear. If there is no such condition, you should not be sure how to translate it.

In the past, I hoped that the official Lua script would have complete Chinese comments and instructions, and I would just modify the comments and be done. Now that I have seen the new version, there are no comments anymore.

If it doesn’t work, you can only use the stupidest way to do physical work: log in to Mercure with your account, change the password temporarily, log in to your account directly, look at the actual Chinese name, and try to manually translate the shutdown field. .

I'll take the time to look for old Lua scripts with Chinese comments first.

Translating them one by one is indeed a laborious task, so I hope to be able to plug in a dictionary to translate, just like miot integration. For example, the status of washing machines and dishwashers both have Idle. If Idle=idle can be plugged in (it can also be in other languages), then the idle status of multiple devices can be solved at once. I don’t know the technology, but I just express my thoughts. Thanks for reply

@caibinqing
Copy link
Collaborator

如果逐个翻译的话确实是个体力活,所以我希望能够外挂字典来翻译就像miot集成那样的。比如洗衣机和洗碗机的状态都有Idle,如果能够外挂Idle=空闲(也可以是其他语言),那么就一下解决了多个设备的空闲状态,我不懂技术,只是说出自己的想法,感谢回复

现在就是这么干的,就是说 即使这么干 它也是个体力活。
然后就像上面说的,没有设备的话 不太清楚用什么词来翻译比较好,所以还是希望有设备的用户可以来贡献一下翻译。

我等下会把所有设备的翻译字段都整理到 translations/{language}.json 中,方便贡献翻译。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Translating one by one is indeed a laborious task, so I hope to be able to plug in a dictionary to translate, just like miot integration. For example, the status of washing machines and dishwashers both have Idle. If Idle=idle can be plugged in (it can also be in other languages), then the idle status of multiple devices can be solved at once. I don’t know the technology, but I just express my thoughts. Thanks for reply

This is what we do now, which means that even if we do this, it is still laborious work.
And as mentioned above, if you don’t have a device, you don’t know what word to use to translate it better, so I still hope that users who have a device can contribute to the translation.

I will organize the translation fields of all devices into translations/{language}.json later to facilitate translation contributions.

@caibinqing
Copy link
Collaborator

@yyax 可以看一下PR #294 ,等合并之后,你可以通过 translations/zh-Hans.json 来贡献翻译。不确定的 key 可以在 midea_devices.py 中查阅。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@yyax You can take a look at PR #294. After merging, you can contribute translations through translations/zh-Hans.json. Uncertain keys can be viewed in midea_devices.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants