Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilingual support #107

Open
gaowanliang opened this issue Jun 27, 2020 · 5 comments
Open

Multilingual support #107

gaowanliang opened this issue Jun 27, 2020 · 5 comments

Comments

@gaowanliang
Copy link

gaowanliang commented Jun 27, 2020

I tried to sinicize the game in Chinese, but I noticed that these texts are fixed in the code. If you make changes, I have to find the location of the text again and make changes. Considering that the amount of text is not large now, is it necessary to find a special file to save string data for multilingual support.

@ovidiuch
Copy link
Owner

Good ideas!

@gaowanliang
Copy link
Author

gaowanliang commented Jun 29, 2020

You can go here to check my Chinese version, but if you want to make Chinese version, you need to change the display of some words, such as "Ready" in Chinese, which corresponds to "准备" or "已准备". Using "准备" alone generally has certain ambiguity, so I use "已准备". But if you use "已准备", the text display will be very strange.
image32eda9c9ec44d3be.png
This is because the text size you set here is 1.5em (as if, I forgot),you need to adjust the font size to 0.8em, and at the same time, you need to split "已" and "准备" with "<br />",and also need to adjust the percentage of absolute positioning "top" value.
image2e7a7a9566155f26.png
For example, a sentence in English may be in order to be smooth in Chinese , need two or more sentences. But it's easy to solve. I'm preparing for the exam recently, and I didn't look at your code carefully. If necessary, I can participate in some work.

PS:One of them is translated as "中文汉化由高玩梁制作". This sentence does not correspond to the original sentence. This sentence means that this Chinese version is provided by me (/▽\). There is also this sentence: "如果对手中途离开,TA的方块会卡住,回来了就会继续,你可以通过这个来确定要不要继续和TA玩", which is to show that the shadow of the opponent will stagnate when he is offline.I hope you can pay attention to it. The other sentences basically correspond to the original one by one.

@ovidiuch
Copy link
Owner

ovidiuch commented Jul 5, 2020

You can go here to check my Chinese version

Very nice, do you also have a live demo deployed somewhere?

This is because the text size you set here is 1.5em (as if, I forgot),you need to adjust the font size to 0.8em

I see. It makes sense, because the English texts I chose are meant to fit the design perfectly. But this thinking doesn't scale easily to multiple language. Given that Flatris has limited text, however, I think we can design a language map where we define the value and font size for each text label. This way we continue to fit the texts very nicely in the design. Not sure if the font size should be defined for each text label, or globally for a language.

which is to show that the shadow of the opponent will stagnate when he is offline.I hope you can pay attention to it

Yeah this is a good idea but a separate issue. To simplify we should split this issue into two and handle them separately.

@gaowanliang gaowanliang changed the title Remind me that my opponent left the game && Multilingual support Multilingual support Jul 5, 2020
@gaowanliang
Copy link
Author

I've divided the issue into two parts.

For the Chinese version of the online demo, you can see it here

@ovidiuch
Copy link
Owner

ovidiuch commented Jul 5, 2020

Hehe, I don't know Chinese but the homepage looks cooler than the English one! 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants