Simplified Chinese UI related works.

Post Reply
User avatar
BD4VOW
Posts: 67
Joined: Sat Feb 18, 2023 3:38 am
Location: Suzhou,China

Simplified Chinese UI related works.

Post by BD4VOW » Sun Mar 12, 2023 11:01 am

Hi Roger,

First I need to know how many charactors we need to use for Chinese UI. here are what I did.
I made an copy of /application/include/user_interface/languages/english.h, and translated the contents to Simplifiled Chinese.
Here are the contents.
https://doc.amo.host/index.php?share/fi ... d=y4fNuvnZ
I put this file as /application/include/user_interface/languages/chinese-simplified.h.

And I tried to output all uniq charactors we need:

Code: Select all

cat application/include/user_interface/languages/chinese-simplified.h | iconv -f gb2312 -t c99 | grep '\\u[0-9a-f]\{4\}' -o | sort | uniq | iconv -f c99 -t gb2312 >> map.txt
I found that it's 236 charactors, that mean it's impossible to implement this using ANSCII extention part like Japanese version.

but few hundreds charactors seems not too much, I will try to experiment a way that may need about 20~30KBytes space for storing different font size for these Chinese charactors, and make the ui render function automaticlly fetch font data from your current font and my new extension font based on text content when rendering, and this may make them compatible and maybe no need to make a seperate Chinese Build.

Just for your information.

I will feed back to here if any progress made.

Amo BD4VOW
Last edited by BD4VOW on Sun Mar 12, 2023 8:02 pm, edited 1 time in total.

User avatar
BD4VOW
Posts: 67
Joined: Sat Feb 18, 2023 3:38 am
Location: Suzhou,China

Re: Simplified Chinese UI related works.

Post by BD4VOW » Sun Mar 12, 2023 11:20 am

BTW, which Font license would be acceptable for us?

Here is a list of Open Source Chinese fonts
https://drxie-github-io.translate.goog/ ... r_pto=wapp

I will try different font presentation based on your license suggestion.

User avatar
BD4VOW
Posts: 67
Joined: Sat Feb 18, 2023 3:38 am
Location: Suzhou,China

Re: Simplified Chinese UI related works.

Post by BD4VOW » Sun Mar 12, 2023 11:30 am

By the way, this is a draft traslation referring to the Chinese voice prompts. but in order to better adapt to Chinese radio communication norms or new habits, there are some translation differences. According to my translation, the Chinese voice prompts also need to be updated, but I don't know how to do it yet, any information can be referenced?

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Simplified Chinese UI related works.

Post by VK3KYY » Sun Mar 12, 2023 8:19 pm

BD4VOW wrote:
Sun Mar 12, 2023 11:20 am
BTW, which Font license would be acceptable for us?

Here is a list of Open Source Chinese fonts
https://drxie-github-io.translate.goog/ ... r_pto=wapp

I will try different font presentation based on your license suggestion.
I did not have time to read the font licence yet

But any font that is non commercial and free with no usage restrictions and no requirement for licence or copyright text to be displayed inside the firmware would be OK.


The firmware can not include anything which has a license like GPL, because inclusion of any GPL component.conflicts with the non-commercial clause in the overall license and also requires the source code to be published for every binary even alpha and beta

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Simplified Chinese UI related works.

Post by VK3KYY » Sun Mar 12, 2023 8:26 pm

BD4VOW wrote:
Sun Mar 12, 2023 11:30 am
By the way, this is a draft traslation referring to the Chinese voice prompts. but in order to better adapt to Chinese radio communication norms or new habits, there are some translation differences. According to my translation, the Chinese voice prompts also need to be updated, but I don't know how to do it yet, any information can be referenced?
There is a python script to build the voice prompt from CSV file(s).

This script is not in the firmware source code. I think it is in the voice prompts folder on the opengd77.com server downloads folxer

The script uses a Text To Speech website to convert to MP3
The MP3 is converted to raw uncompressed audio using ffmoeg
Because the voice prompt is compressed to AMBE , we use the radio to compress the audio, so the radio must be connected to the PC when running the python script


However I did not conform that the AMBE compression. function works OK on the DM-1701

It definitely works on the GD77

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Simplified Chinese UI related works.

Post by VK3KYY » Sun Mar 12, 2023 8:47 pm

BTW.

Not all language strings are used in the UV380.

Suspend mode is GD77 / MK22 CPU onoy
Click suppression is MD9600 only

But do not delete the definitions in the struct for any texts, because the Voice Promt uses the index number / position of the strings in the struct to index into the Voice Prompt Table Of Contents. I.e it uses pointer address arithmetic

possibly we can use #if defined(PLATFORM_XXXX) in the language strings headers so that those strings are not initialised if not applicable to that platform

Also we intend to remove the texts for OpenMD9600 and OpenRD5R etc and only use OpenGD77 for all radios.

but we will not remove those string definitions from the struct, because it would break the Voice Promo lookup. We will rename them to .unused_1 , .unused_2 etc, so those string positions can be used in the future for some other purpose

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Simplified Chinese UI related works.

Post by VK3KYY » Mon Mar 13, 2023 8:58 am

Re: Voice prompts

See this folder

downloads/Voice_Prompts/

The Python script to build a voice prompt file is in


downloads/Voice_Prompts/tools/

CSV files of the work prompts are in the Localisation folder

downloads/localisation/

User avatar
BD4VOW
Posts: 67
Joined: Sat Feb 18, 2023 3:38 am
Location: Suzhou,China

Re: Simplified Chinese UI related works.

Post by BD4VOW » Mon Mar 13, 2023 10:10 am

VK3KYY wrote:
Mon Mar 13, 2023 8:58 am
Re: Voice prompts

See this folder

downloads/Voice_Prompts/

The Python script to build a voice prompt file is in


downloads/Voice_Prompts/tools/

CSV files of the work prompts are in the Localisation folder

downloads/localisation/
OK, thanks! I will feedback to you by mail after everything is done & tested.

User avatar
BD4SMY
Posts: 20
Joined: Fri Jan 26, 2024 10:02 am

Re: Simplified Chinese UI related works.

Post by BD4SMY » Sun Feb 18, 2024 5:55 am

How about this status ongoing? 汉化进展咋样了呀?

Post Reply