pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

add simplifed chinese locale, translation is complete now.

Open Jane620 opened this issue 9 months ago • 7 comments

only for the code part and a small portion of text testing.

Jane620 avatar May 05 '24 09:05 Jane620

I think it would be better to precise if it is traditional Chinese or simplifed Chinese, including not just naming it "cn" both in the name of the folder and in the code

Adri1 avatar May 05 '24 16:05 Adri1

Hello! I can offer assistance with localizing games into Chinese. I have experience in localizing Pokémon fan games!

Aizzzs avatar May 06 '24 06:05 Aizzzs

I think it would be better to precise if it is traditional Chinese or simplifed Chinese, including not just naming it "cn" both in the name of the folder and in the code

I am not 100% on this but the locales for simplified Chinese should be zh-cn while Traditional should be zh-tw

Tempo-anon avatar May 06 '24 15:05 Tempo-anon

#592 I localized the skill names and traits into Chinese.

justhil avatar May 07 '24 10:05 justhil

I think it would be better to precise if it is traditional Chinese or simplifed Chinese, including not just naming it "cn" both in the name of the folder and in the code

I am not 100% on this but the locales for simplified Chinese should be zh-cn while Traditional should be zh-tw

^ Thoughts on this?

Tempo-anon avatar May 08 '24 16:05 Tempo-anon

src/system/settings.ts have just been modified. The names of languages are now labeled in their repsective languages and not just in English, so you may need to edit it

Adri1 avatar May 08 '24 17:05 Adri1

  1. Normalized category fixes for supportedLngs lists

Currently the language codes in "supportedLngs" are all abbreviated, which leads to an error in the automatic language detect (i18next-browser-languagedetector #362 ) , at least for zh-CN recognition, which does not fall back to zh or so-called chs correctly.

  1. Replace similar pixel fonts to display GBK characters correctly.

The pokemon-emerald-pro.ttf does not contain GBK characters, causing Phaser to process GBK characters with the font being displayed on the user's side. For this reason, I replaced pokemon-emerald-pro.ttf with MuZaiPixel

  1. Fixed the vast majority of display overflow errors in translations due to inappropriate text lengths.

Haleclipse avatar May 08 '24 23:05 Haleclipse

#670 Add wordwrap to Chinese words

mercurius-00 avatar May 09 '24 05:05 mercurius-00

I did not have envirement to do this... Who can modify the text.ts to change the font-family and font-size for chinese.

Code as below:

fontFamily: localStorage.getItem('prLang')==="zh_CN"?'simhei':'emerald',

styleOptions.fontFamily = localStorage.getItem('prLang')==="zh_CN"?'MuZaiPixel':'pkmnems';

and same judgement logic for changing font-size, let the size is smaller.

davidyan-hub avatar Jun 07 '24 10:06 davidyan-hub