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

translations not work after update to v0.4.5 #199

Closed
boyphongsakorn opened this issue Sep 29, 2021 · 7 comments
Closed

translations not work after update to v0.4.5 #199

boyphongsakorn opened this issue Sep 29, 2021 · 7 comments
Labels
bug Something isn't working fixed bug fixed

Comments

@boyphongsakorn
Copy link

boyphongsakorn commented Sep 29, 2021

i translations from chinese to english is work in v0.4.4
but after update to v0.4.5
translations from chinese to english is not working

@al-one
Copy link
Owner

al-one commented Sep 30, 2021

Show me your translation config.

@boyphongsakorn
Copy link
Author

boyphongsakorn commented Sep 30, 2021

Show me your translation config.

xiaomi_miot:
  translations:
    mode:
      静音: "silent"
      标准: "basic"
      自动: "auto"
      低档: "low"
      中档: "medium"
      高档: "high"
      强力: "strong"
    fan_level:
      静音: "silent"
      标准: "basic"
      自动: "auto"
      低档: "low"
      中档: "medium"
      高档: "high"
      强力: "strong"

this config work in v0.4.4

@al-one al-one added the bug Something isn't working label Oct 9, 2021
al-one added a commit that referenced this issue Oct 9, 2021
@al-one
Copy link
Owner

al-one commented Oct 9, 2021

Please upgrade to commit: d15f369 and try again.

@boyphongsakorn
Copy link
Author

Please upgrade to commit: d15f369 and try again.

it's work, thank you.

@al-one al-one added the fixed bug fixed label Oct 11, 2021
@shummo
Copy link

shummo commented Dec 4, 2021

HI. I need some helmp with the translating.
I have a chuangmi.remote.h102c01 IR remote. I have configured some controller under MI HOME app (TV remote / speaker/ climate).

The Climate controller translated good. But the others not. There are lot's of chinese characters:
The IR Remote attibutes looks like this:

model: chuangmi.remote.h102c01
lan_ip: 192.168.1X.XX
mac_address: 40:X:X:X:X:11
firmware_version: 2.0.6_0001
hardware_version: ''
entity_class: MiotRemoteEntity
state_updater: none
ir_devices:
  - did: ir.1466911367289286656
    name: Air Conditioner Remote Control
    keys: []
  - did: ir.1466911668759097346
    name: TV Remote Control
    keys:
      - id: 1
        name: POWER
        display_name: 电源
      - id: 10032
        name: SmartTv
        display_name: SmartTv
      - id: 10033
        name: Subtitle
        display_name: Subtitle
      - id: 101
        name: '9'
        display_name: '9'
      - id: 10110
        name: Format
        display_name: Format
      - id: 106
        name: MUTE
        display_name: 静音
      - id: 111
        name: INPUT
        display_name: 信号源
      - id: 1112
        name: OPTIONS
        display_name: 选项
      - id: 116
        name: BACK
        display_name: 返回
      - id: 121
      ...

The IR remote SUB device attributes looks like this.

options: 电源, SmartTv, Subtitle, 9, Format, 静音, 信号源, 选项, 返回, EXIT, 交替, HOMEPAGE, 快退, 播放, 快进, 录音, 停止, 暂停, 鼠标, 列表, 信息, 红, 绿, 蓝, 黄, 流光溢彩, 3D, 比例调整, GUIDE, 调整, 智能电视, 流声溢彩, 流光幻彩, 功能列表, 确认, 频道+, SET, 频道-, TV, 菜单, 上, 下, NAVIGATE_LEFT, 右, 音量+, 音量-, 0, 1, RETURN, Source, 2, 3, 4, 帮助, 5, 6, 7, 图文, 8
entity_class: SelectSubEntity
parent_entity_id: remote.imi_remote_2
friendly_name: TV Remote Control
supported_features: 0

I tried to translate it in configuration.yaml like this:

xiaomi_miot:
  translations:
    # Global dictionary
    电源: 'POWER'  #THIS IS THE FIRST CHARACTER

I already tried the following format without success:

    '电源': 'POWER'
    电源: "POWER"
    '电源': "POWER"  stb.

I also tried to rewrite the attribut in customize.yaml. It did the job, but after that the buttons not worked anymore.

Can somebdy help me pls, that how could i translate them?

@al-one
Copy link
Owner

al-one commented Dec 4, 2021

@shummo Added in 454c54b, upgrade to master branch and try:

xiaomi_miot:
  translations:
    ir_devices:
      '电源': POWER

@shummo
Copy link

shummo commented Dec 5, 2021

@shummo Added in 454c54b, upgrade to master branch and try:

xiaomi_miot:
  translations:
    ir_devices:
      '电源': POWER

Thanks you. It's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed bug fixed
Projects
None yet
Development

No branches or pull requests

3 participants