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 German translation to alarm messages [AlarmLogParser.cpp] #2258

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mattreim
Copy link

@mattreim mattreim commented Sep 7, 2024

No description provided.

@mattreim mattreim changed the title Add German translation to alarm messages Add German translation to alarm messages [AlarmLogParser.cpp] Sep 23, 2024
lib/Hoymiles/src/parser/AlarmLogParser.cpp Outdated Show resolved Hide resolved
lib/Hoymiles/src/parser/AlarmLogParser.cpp Outdated Show resolved Hide resolved
lib/Hoymiles/src/parser/AlarmLogParser.cpp Outdated Show resolved Hide resolved
@stefan123t
Copy link

@mattreim Thanks, are these from the Hoymiles S-Miles Installer App in a German warn_code.json or is this some manual translation by you ?

@mattreim
Copy link
Author

@mattreim Thanks, are these from the Hoymiles S-Miles Installer App in a German warn_code.json or is this some manual translation by you ?

They are all manual translations.

@mattreim
Copy link
Author

I just looked in an .APK and only found en_us/zh_cn.

warn_code.json

@stefan123t
Copy link

stefan123t commented Sep 26, 2024

@mattreim I just checked the current v1.1.29 of the S-Miles Installer APK if they have any translations inside.

https://apkpure.com/s-miles-installer/com.hm.hemaiInstall1

and yes there is warn_code.json (ns, zh_cn and en_us) as you attached it which contains the following codes 211, 73, 72, 47, 46, 14, 13, 12, 11 as mentioned in #1068 (comment)

  "211": {
    "ns": "mi.warn.name.211",
    "zh_cn": "PV3端口无输入",
    "en_us": "PV3 No input"
  },
...
  "73": {
    "ns": "mi.warn.name.73",
    "zh_cn": "过温降载功能启用",
    "en_us": "TW function enable"
  },
  "72": {
    "ns": "mi.warn.name.72",
    "zh_cn": "电网过频降载FW功能启用",
    "en_us": "FW function enable"
  },
  "71": {
    "ns": "mi.warn.name.71",
    "zh_cn": "电网过压降载VW功能启用",
    "en_us": "VW function enable"
  },
...
  "47": {
    "ns": "mi.warn.name.47",
    "zh_cn": "FB过流",
    "en_us": "FB overcurrent"
  },
  "46": {
    "ns": "mi.warn.name.46",
    "zh_cn": "FB过流",
    "en_us": "FB overvoltage"
  },
...
  "36": {
    "ns": "mi.warn.name.36",
    "zh_cn": "INV过流过压",
    "en_us": "INV overvoltage or overcurrent"
  },
...
  "14": {
    "ns": "mi.warn.name.14",
    "zh_cn": "电网相位突变",
    "en_us": "Grid phase mutation"
  },
  "13": {
    "ns": "mi.warn.name.13",
    "zh_cn": "电网频率突变",
    "en_us": "Grid frequency mutation"
  },
  "12": {
    "ns": "mi.warn.name.12",
    "zh_cn": "电网电压幅值大幅跌落",
    "en_us": "Grid voltage sharp drop"
  },
  "11": {
    "ns": "mi.warn.name.11",
    "zh_cn": "浪涌冲击",
    "en_us": "Grid voltage surge"
  },

And a lj_warn_code.json too, the latter being in simplified chinese only.

@tbnobody I translated some of the missing Event IDs like 52, 53 from the chinese lj_warn_code.json:

"52_1": "1. 220V power connection line is disconnected\n2. 220V power relay is damaged",
"52_2": "1. 220V control power supply is abnormal",
"53_1": "1. External IO 24V power supply is abnormal",
"53_2": "1. External IO 24V power supply is abnormal",
"53_3": "1. Internal IO 24V power supply is abnormal",
"53_4": "1. Internal IO 24V power supply is abnormal",

But I did not find 220 as mentioned by @schneeer here #2090 (comment)

@stefan123t stefan123t mentioned this pull request Sep 27, 2024
3 tasks
@stefan123t
Copy link

You may sort the warn_code.json using the following jq query:

cat warn_code.json | jq '. | to_entries | sort_by(.key | tonumber) | from_entries' > warn_code_sorted.json

warn_code_sorted.json

@stefan123t
Copy link

@mattreim this is probably pending for the changes to OpenDTU announced in #1830 and #1679 to add more language locales to the application / web.

@mattreim
Copy link
Author

mattreim commented Oct 9, 2024

Unfortunately, they are already very old.

@stefan123t
Copy link

@mattreim yes until @tbnobody finds the time to implement these “language packs” in general, we will have these additional changes for languages / translations pending I would assume.

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.

3 participants