pnp / sp-dev-fx-controls-react

Reusable React controls for SPFx solutions
https://pnp.github.io/sp-dev-fx-controls-react/
MIT License
384 stars 380 forks source link

ListItemAttachments Control Mistranslation of Chinese text and anachronisms #1858

Open Haiqi-Wu opened 2 months ago

Haiqi-Wu commented 2 months ago

Category

[X ] Enhancement

[ ] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ 3.18.1 ]

Our project needs to implement multi-language support in SPFx, at first I had no hope for the component to adapt to multi-language environments, but when I used it, I found that there was actually multi-language support, which was a pleasant surprise, but unfortunately I found that the support wasn't perfect enough. See the following screenshots for comparison

image image

In Chinese context OK can sometimes be translated as '还行', but the translation here is inappropriate, here it is translated as '好的' or directly as '关闭'.

Whether there are translations elsewhere that don't fit, and whether there are other languages that don't fit, I'm not sure. Please help correct all translations.

Thanks!

github-actions[bot] commented 2 months ago

Thank you for submitting your first issue to this project.

michaelmaillot commented 2 months ago

Hi @Haiqi-Wu,

Thanks for raising this! FYI, each UI component should use translation files which are located here.

As you can see, there's one dedicated to chinese localization. As you raised this translation issue, would you mind giving us a hand and fix mistranslated text you see in the translation file?

Haiqi-Wu commented 2 months ago

Hi @michaelmaillot, sure, but I'm not familiar with operating on github😂, can you give a guide?

michaelmaillot commented 1 month ago

Sure! As it's a SPFx project, you can run it locally with the --locale argument!

One thing to do first: you'll have to add a zh-cn.js file in each SPFx component (ControlsTest webpart, testApp, testForm), otherwise, you'll end up with a webpack error. This file can be a copy of existing en-us.js one in each. You won't have to commit these once your translation fix has been tested.

Then you can add the ListItemAttachments control in the ControlsTest webpart, and just run npx fast-serve --locale=zh-cn (or gulp serve --locale=zh-cn).

Let me know if you need any guidance.

Edit: I've updated the testing components so that you'll just have to run the local server with the expected language, without having to add the localization file first 🙂

wuxiaojun514 commented 5 days ago

Hi @Haiqi-Wu do you need any help on correct resource file? I found it has a lot funny translation on zh-cn.ts e.g.

image I can contribute to fix those translation issue on localization file for Chinese.

wuxiaojun514 commented 4 days ago

Hi there,

I created a PR to fix the translation problems on Chinese resource files #1894 image