Skip to content

Conversation

fishjam
Copy link

@fishjam fishjam commented Sep 21, 2025

  1. add translate python tools;
  2. translate current zh_CN text.

Extract translation text and use AI to perform the translation.
Deails refer: #13410

Description

  • this is my local python run result
(base) E:\QGC_Push\qgroundcontrol\tools\translations>python qgc_translate.py
21:12:12.531|INFO|start translate
21:12:12.531|INFO|source_path=..\..\translations\qgc_json_zh_CN.ts, target_path=..\..\translations\qgc_json_zh_CN.ts
21:12:12.536|INFO|dict include 13 items
21:12:12.540|INFO|load qt file: ..\..\translations\qgc_json_zh_CN.ts
21:12:12.560|INFO|handle ..\..\translations\qgc_json_zh_CN.ts complete
21:12:12.560|INFO|  handle 799 messages
21:12:12.565|INFO|  translate 0 items
21:12:12.565|INFO|  found 0 missing, saved in ..\..\translations\qgc_json_zh_CN.ts_missing.txt
21:12:12.565|INFO|source_path=..\..\translations\qgc_source_zh_CN.ts, target_path=..\..\translations\qgc_source_zh_CN.ts
21:12:12.570|INFO|dict include 13 items
21:12:12.570|INFO|load qt file: ..\..\translations\qgc_source_zh_CN.ts
21:12:12.595|INFO|[1]: 'Password:' => '密码:'
21:12:12.600|INFO|[2]: 'Critical Level' => '严重级别'
21:12:12.605|INFO|[3]: 'Max Altitude' => '最大高度'
21:12:12.610|INFO|[4]: 'Device is not open' => '设备未打开'
21:12:12.610|INFO|[5]: 'Unsupported open mode' => '不支持的打开模式'
21:12:12.610|INFO|[6]: 'Timeout while waiting for ready read' => '等待就绪读取超时'
21:12:12.614|INFO|[7]: 'Failed to set RTS' => '设置RTS失败'
21:12:12.614|INFO|[8]: 'Custom baud rate direction is unsupported' => '不支持自定义波特率方向'
21:12:12.619|INFO|[9]: 'Password:' => '密码:'
21:12:12.619|INFO|[10]: 'Max Altitude' => '最大高度'
21:12:12.619|INFO|[11]: 'Date & Time' => '日期与时间'
21:12:12.624|INFO|handle ..\..\translations\qgc_source_zh_CN.ts complete
21:12:12.694|INFO|  handle 3382 messages
21:12:12.694|INFO|  translate 11 items
21:12:12.699|INFO|  found 15 missing, saved in ..\..\translations\qgc_source_zh_CN.ts_missing.txt

Test Steps

Checklist:

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

1. add translate python tools;
2. translate current zh_CN text.
@fishjam fishjam changed the title https://github.com/mavlink/qgroundcontrol/issues/13410 Extract translation text and use AI to perform the translation Sep 21, 2025
@DonLakeFlyer
Copy link
Contributor

As discussed in the Issue this provides no mechanism for review. I'll go with what @hamishwillee says about being paranoid about blindly accepting translations not being a good idea.

@hamishwillee
Copy link
Contributor

As discussed in the Issue this provides no mechanism for review. I'll go with what @hamishwillee says about being paranoid about blindly accepting translations not being a good idea.

AI is anecdotally poor for technical docs. If it matters, you use humans. I think with flying robots it matters.

A possibility though is to autopopulate every single string with an AI translation unapproved. Then only publish strings that are approved. This might make the translation process easier. That said, I'd rather stick with what we have - possibly adding AI integration to suggest strings though - if there is budget for buying the keys.

@DonLakeFlyer
Copy link
Contributor

A possibility though is to autopopulate every single string with an AI translation unapproved.

I don't see that ability in the .ts file format spec.

@fishjam
Copy link
Author

fishjam commented Sep 27, 2025

As I said in the issue

  • The AI translation might also have issues, so it's best to have it double-checked manually.

there are 2 functions for the python:

  1. extract the source text
  2. fill the translated target text

it does not care how you translate the text, by Crowdin or AI, and before you commit and push , you need confirm by git diff.
BTW: I'm chinese, so I just commit the zh_ZN in this commit.

@DonLakeFlyer
Copy link
Contributor

you need confirm by git diff

You are missing the point that git diff is not the process we use to verify translations. We use Crowdin for that. Anyone can do translations on Crowdin, only certified approvers can approve those translations and only then do they come down in a pull request. Crowdin has full ui to handle that whole process. We can subvert that whole process with something new.

Which is why I was looking at marking a translation as not yet approved in the .ts file. With that we could use the Crowdin approval process. But as far as I can tell it's not currently possible.

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