sp-dev-fx-controls-react icon indicating copy to clipboard operation
sp-dev-fx-controls-react copied to clipboard

ListItemAttachments Control Mistranslation of Chinese text and anachronisms

Open Haiqi-Wu opened this issue 1 year ago • 4 comments

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!

Haiqi-Wu avatar Aug 02 '24 07:08 Haiqi-Wu

Thank you for submitting your first issue to this project.

github-actions[bot] avatar Aug 02 '24 07:08 github-actions[bot]

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?

michaelmaillot avatar Aug 16 '24 13:08 michaelmaillot

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

Haiqi-Wu avatar Aug 22 '24 14:08 Haiqi-Wu

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 🙂

michaelmaillot avatar Sep 20 '24 14:09 michaelmaillot

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 avatar Oct 17 '24 04:10 wuxiaojun514

Hi there,

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

wuxiaojun514 avatar Oct 18 '24 04:10 wuxiaojun514

Thanks guys!

Haiqi-Wu avatar Dec 13 '24 08:12 Haiqi-Wu

We are still using v1 for SPSE, so I wonder if we can apply same to v1 If not possible, can I submit PR to v1?

s1nce avatar Jun 18 '25 07:06 s1nce