Xtr126 / XtMapper

Keyboard and mouse input mapper
https://xtr126.github.io/XtMapper-docs
GNU General Public License v3.0
226 stars 23 forks source link

Add Chinese language #101

Closed guobao2333 closed 4 months ago

guobao2333 commented 4 months ago

Although I have added Chinese to your application. some parts are hard coded.

Besides, I found some problems with the layout of your application, but it has nothing to do with the language. You may need to fix this problem.

Xtr126 commented 4 months ago

Thanks for your contribution. I extracted some of the hard coded strings from the editor interface. They can be translated now.

guobao2333 commented 4 months ago

@Xtr126 You can now merge the code. Wait, there are several hard codes.

guobao2333 commented 4 months ago

I modified the previous translation by decompiling the built installation package, and now I need to prepare the construction from scratch.

It's because I was lazy, and I still don't remember where there is hard coding, so please wait for me for a moment.

guobao2333 commented 4 months ago

@Xtr126 There are three hard codes as shown in the figure below.

Screenshot_2024-08-01-14-18-32-42 Screenshot_2024-08-01-14-18-41-12

Xtr126 commented 4 months ago

They are exposed dropdown menus: https://github.com/material-components/material-components-android/blob/master/docs/components/Menu.md#exposed-dropdown-menu-example I'm trying to find a way to translate them using string arrays.

Xtr126 commented 4 months ago

@guobao2333 Now they can be translated: https://github.com/Xtr126/XtMapper/blob/a4a429324663b835387ec172977c6d0d4828b04a/app/src/main/res/values-zh-rCN/strings.xml#L72

guobao2333 commented 4 months ago

Your project may not be well known, But I would still recommend using the Crowdin website to manage the localization translation work of the project.

Although there are many people in China, few people participate in the translation work. I also found a very interesting thing. As long as the translation channels are opened for most applications, almost all Chinese will be translated😂.

Well, I won't flatter myself. You can really merge projects now.

Xtr126 commented 4 months ago

Your project may not be well known, But I would still recommend using the Crowdin website to manage the localization translation work of the project.

Although there are many people in China, few people participate in the translation work. I also found a very interesting thing. As long as the translation channels are opened for most applications, almost all Chinese will be translated😂.

Well, I won't flatter myself. You can really merge projects now.

I agree with you, translations should be made easier. I'll look into setting up crowdin, thanks for the suggestion. Initially I was focusing on the functionality as it took a long while to get it to a usable state.

Xtr126 commented 4 months ago

Anyone who wants to test the changes can do so by downloading the artifact from https://github.com/Xtr126/XtMapper/actions/runs/10199678072