Chinese translation

Discuss, plan, and make Translations for FreeOrion
Message
Author
Elistear
Space Krill
Posts: 4
Joined: Wed Apr 29, 2015 3:14 pm

Chinese translation

#1 Post by Elistear »

Hi all,

As far as I can see, there is still no Chinese translation yet, isn't it? I'm sure there will be more Chinese players willing to have a try if there is a Chinese version.

I started to translate recently and current progress is about 20% ~ 30%, not very quickly though:) The text display is good so far.

I have two questions:

1. Comparing to other languages, what I need more is to use a Chinese font. It can be told from the config.xml that there are three font settings to modify, but only two of them can be changed in-game. <font_bold> can only be modified by editing the config.xml. Is there a future feature to add an in-game setting to change this font_bold as it is more user-friendly?

2. I'm currently using v0.4.4 [build 2015-04-27.21dc679] because of the crushing bug, but the stringtable I'm working on is from the last stable version. How can I know there is any key/value updated between different versions? And I'm not familiar with the github yet.

Sorry for any potential misunderstandings because English is not my native language.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Chinese translation

#2 Post by adrian_broher »

Hello Elistear,
Elistear wrote:As far as I can see, there is still no Chinese translation yet, isn't it?
I'm not aware of any chinese translation. The only translations I'm aware of are the ones within the stringtables directory.
Elistear wrote:The text display is good so far.
Care to share some screenshots? I'm curious how the rendering works and looks so far.
Elistear wrote:1. Comparing to other languages, what I need more is to use a Chinese font. It can be told from the config.xml that there are three font settings to modify, but only two of them can be changed in-game. <font_bold> can only be modified by editing the config.xml. Is there a future feature to add an in-game setting to change this font_bold as it is more user-friendly?
It's not that hard to expose the setting in the UI, but I think that exposing the options at all is a bad idea. Ideally users should only set the language and the fitting string table and fonts should be selected accordingly. Also can you suggest a font, that

1. provides the nessecary glyphs for your requirements?
2. is open source compatible?
Elistear wrote:2. I'm currently using v0.4.4 [build 2015-04-27.21dc679] because of the crushing bug, but the stringtable I'm working on is from the last stable version. How can I know there is any key/value updated between different versions? And I'm not familiar with the github yet.
Given the fact, that you use the commit 21dc679 version as translation baseline you can take a look at the history of the file and said commit by:

1. Visit: https://github.com/freeorion/freeorion
2. Click: https://help.github.com/assets/images/h ... button.png
3. Enter the commit in "base": https://help.github.com/assets/images/h ... opdown.png
4. Click "Files changed"
5. find "default/stringtables/en.txt"
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13586
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Chinese translation

#3 Post by Geoff the Medio »

I didn't have any luck getting github to give a useful diff between versions of a single file when there have been so many commits. Instead, I attempted to make a diff, which is attached. Dunno if it worked correctly...
Attachments

[The extension patch has been deactivated and can no longer be displayed.]


Elistear
Space Krill
Posts: 4
Joined: Wed Apr 29, 2015 3:14 pm

Re: Chinese translation

#4 Post by Elistear »

Thank you adrian_broher for your detailed reply.
adrian_broher wrote:Care to share some screenshots?
Please find attached screenshots.
adrian_broher wrote: Ideally users should only set the language and the fitting string table and fonts should be selected accordingly.
Sorry I don't quite get your point here. Do you mean there will be an option to let user to choose the language and the game will set the corresponding string table and the font automatically? Or the user still needs to do that manually? If manually, can you suggest a best way to set the font for <font-bold>? Because currently the only way I can see is to open config.xml and edit this line:
<font-bold>C:\Games\FreeOrion\default\DejaVuSans-Bold.ttf</font-bold>
adrian_broher wrote: Also can you suggest a font, that

1. provides the nessecary glyphs for your requirements?
2. is open source compatible?
I'm using WenQuanYi Micro Hei Mono which is an open source Chinese font so it is all good. Here is the official website for more information: http://wenq.org/wqy2/index.cgi?Home


Also thanks Geoff for the comparison file. I can see that there are quite a number of new keys/updated values. So I have a question here:

Should I stick to the last stable version for now? Because in my opinion, for a translation started from zero, it makes more sense to finish the stable one first rather than keep updating as the English string table is being changed constantly. Any suggestion and advice will be appreciated.
Attachments
Screenshot5.png
Screenshot5.png (291.06 KiB) Viewed 8547 times
Screenshot4.png
Screenshot4.png (274.72 KiB) Viewed 8547 times
Screenshot1.png
Screenshot1.png (630.36 KiB) Viewed 8547 times

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Chinese translation

#5 Post by adrian_broher »

Elistear wrote:Please find attached screenshots.
Thanks a lot. The first thing that catches my attention is the fact that the glyphs look somewhat blurry. Is "WenQuanYi Micro Hei Mono" a sans-serif font?

Also I would like to know if there are other problems for things like the typography, representation. As far as I know there are different typographic differences for:
  • Text emphasis (Western underline has a different meaning as chinese underline, slanting text is not applicable in chinese, but there are some characters to add emphasis to a text block)
  • Number representation
  • ???
Elistear wrote:Sorry I don't quite get your point here. Do you mean there will be an option to let user to choose the language and the game will set the corresponding string table and the font automatically?
Currently there is no option to set <font-bold>. I/we will add an UI option to set the <font-bold> manually.

In my opinion there should be no way to set any font, but only a language, which in turns selects the proper font and stringtable.
Elistear wrote:I'm using WenQuanYi Micro Hei Mono which is an open source Chinese font so it is all good. Here is the official website for more information: http://wenq.org/wqy2/index.cgi?Home
Thanks for the link, I will take a look at that.
Elistear wrote:Should I stick to the last stable version for now? Because in my opinion, for a translation started from zero, it makes more sense to finish the stable one first rather than keep updating as the English string table is being changed constantly. Any suggestion and advice will be appreciated.
I advise against that. We won't update the stable versions anymore, as the name already suggests. When translating I would suggest that you follow the latest en.txt stringtable and use this as the base for all translations. The bulk of strings won't change anyway. Maybe Ouaz (the translator, who is responsible for the current french translation) can give some better advice here. I will ping him.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13586
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Chinese translation

#6 Post by Geoff the Medio »

adrian_broher wrote:In my opinion there should be no way to set any font, but only a language, which in turns selects the proper font and stringtable.
Being able to specifiy the default font files to use at the top of a stringtable file makes sense, particularly for cases that don't work with the DejaVu fonts that are included now, but I wouldn't remove the ability to set the fonts manually from the GUI.
Elistear wrote:I'm using WenQuanYi Micro Hei Mono which is an open source Chinese font so it is all good. Here is the official website for more information: http://wenq.org/wqy2/index.cgi?Home
According to Wikipedia, and the list of Linux distributions that apparently use/include this font set, the license should be fine for inclusion with FreeOrion, but I can't find a clear statement of the license in english on the website. Could you point me to it?

Elistear
Space Krill
Posts: 4
Joined: Wed Apr 29, 2015 3:14 pm

Re: Chinese translation

#7 Post by Elistear »

adrian_broher wrote:The first thing that catches my attention is the fact that the glyphs look somewhat blurry.
I think the blur is caused by the small font size, but I don't consider it as a big deal. Being a Chinese, I find all the characters more than recognizable. Most of the Chinese players will have no trouble on reading them as well. However, I agree that the font size from the previous screenshots can be small for some players. So I set the font size to 14 (the former value is 12) and I think that is clear enough for everyone. (find attached screenshot) But I'm not sure whether there will be any potential display issue under the bigger font. I'll keep an eye on that.
Screenshot6.png
Screenshot6.png (298.45 KiB) Viewed 8514 times
adrian_broher wrote:Is "WenQuanYi Micro Hei Mono" a sans-serif font?
Yes it is.
adrian_broher wrote:Also I would like to know if there are other problems for things like the typography, representation. As far as I know there are different typographic differences for:

Text emphasis (Western underline has a different meaning as chinese underline, slanting text is not applicable in chinese, but there are some characters to add emphasis to a text block)
Number representation
???
Chinese doesn't have underline and slanting text. We use a dot under the character to emphasis, sometimes quote as well. However, those differences mostly take place in the formal publications. On the internet, the rules are not that restricted because of the influence from the western culture. Underline and bold text are all acceptable for emphasis purpose. A few people accept slanting text as well, but personally I don't recommend. It might make the characters hard to read.
Base on the same reason, Arabic numerals don't need any change. They are all good.

Well, indeed there is a representation issue, which is about the text wrapping. There is no white space in Chinese text. So what you see from the screenshot, the description of the ground troop pod, displaying not that bad only because I add a space between each sentence. But what if a single sentence is too long? Have not come up with a perfect solution yet.
adrian_broher wrote:When translating I would suggest that you follow the latest en.txt stringtable and use this as the base for all translations.
Is there an efficient way to synchronize the string table I'm currently working on (let's call it zh-cn.txt) with the latest one? What I can think of is to find each different item between two en.txt and then insert/modify it in zh-cn.txt. But omitting is very likely to happen if doing in this way. Any suggestion?
Geoff the Medio wrote:but I can't find a clear statement of the license in english on the website. Could you point me to it?
The English version of this website seems not fully developed. They have a statement in Chinese on this page, inside that big red block. However, I have found the release notes of the font. Does it count?

User avatar
Ouaz
Dyson Forest
Posts: 232
Joined: Wed Aug 13, 2014 7:21 pm
Location: France

Re: Chinese translation

#8 Post by Ouaz »

Elistear wrote:Is there an efficient way to synchronize the string table I'm currently working on (let's call it zh-cn.txt) with the latest one? What I can think of is to find each different item between two en.txt and then insert/modify it in zh-cn.txt. But omitting is very likely to happen if doing in this way. Any suggestion?
Hi Elistear!

Here's how I do to keep the FR file synchronized with the latest EN file. It's a fully-manual process, so it needs to be done neatly, but despite this, it's the easiest way to update your file without being lost.

*************
What you need:
*************

- A visual diff program called Meld (http://meldmerge.org/ ; Meld for Windows here > http://sourceforge.net/projects/meld-installer/)

- Notepad 2 or Notepad++... well, any text editor which displays line numbers and which can wrap lines(CTRL+W)

- some GitHub favorites:

* Commit history of en.txt > https://github.com/freeorion/freeorion/ ... les/en.txt
* Latest en.txt (raw) > https://raw.githubusercontent.com/freeo ... les/en.txt

- 3 files:

* your zh-cn.txt
* your local en.txt file which with your zh-cn.txt is synchronized
* the latest en.txt (found on Github)

****************
Synchronize your file
****************

- Download the latest en.txt on GitHub ("save as" with your navigator). As I write this message, its date is May 11th, 2015. So name it en_05112015.txt (edit: or en_20150511.txt -YYYY-MM-DD- like github format).

- With Meld, compare your local en.txt with the latest en.txt. On this screen, you can see the difference between en_05102015.txt (which with my Fr file is synchronized) and en_05112015.txt:
diff_1.PNG
diff_1.PNG (10.71 KiB) Viewed 8502 times
As you see, on line 3645, a full sentence has been replaced by a Key.

With your text editor (Notepad 2 or Notepad ++), open your zh-cn.txt and go to line 3645 (CTRL+G). Here's the example with my FR file:
text_editor.png
text_editor.png (7.59 KiB) Viewed 7417 times
Do the same for each differences that Meld finds (line additions, line modifications, line deletions) . For my part, I translate directly each new modified or added values, so it's done.

Once it's finished, the simplest way to check if you forgot nothing is just to check if the number of lines are equal between the latest en.txt and your zh-cn.txt. ^^

Easy!

*****
Notes
*****

- Check the en.txt commit history regularly (I do it once a week). Compare the date of your local en.txt file and the date of the last commit on GitHub, to see if there's something new.

- As you started the chinese translation from scratch, you avoid the obsolete values in the already translated strings. I see you used the en.txt from April 26th, 2015, so it's good. You can download it again here (https://raw.githubusercontent.com/freeo ... les/en.txt) and compare it with the latest en.txt.
Then, check if each new difference are also on your zh-cn.txt.

EDIT: oops, I see you used the en.txt of the stable release as reference, which is pretty out of date. So you can't avoid it. You have to compare the en.txt of the stable release with the latest en.txt on GitHub... and manually check and merge each difference (and there's a lot) on your zh-cn.txt. :(

- I think it's better to translate side-by-side, i.e. to always have the latest en.txt opened in another window. Here's an example with the FR file:
side_by_side.png
side_by_side.png (22.54 KiB) Viewed 7417 times
As the number of lines is matched, it's easy to navigate, to compare, to check the original english lines, etc. and in the case of the FR translation, it prevents the obsolete values in the already translated strings (I do not translate directly from the untranslated lines in the FR file, and I can check all the lines already translated by a previous translator... a long time ago, so it has great chances to contain obsolete values). Hopefully, don't bother you with that as you're the first chinese translator.

- A quick way to see if you haven't mess with a key or values syntax (or forgot a triple quote) is to launch FO with your latest zh-cn translated file (start or load a game, not just the title screen). Close FO and then open the freeorion log (in Users/Roaming/Freeorion on Windows). If anything went wrong, it will be listed at the beginning of the file.

- I don't know how you translate, but for my part, I translate directly in-game, i.e. I modify my FR file directly in the Stringtables folder while the game is launched, and I used the "Flush Stringtables" button in the Options to check the result in-game.
Useful to check if the translation fits the UI, or iif it matches with the game context.

**************

That's all!

I think I forgot nothing!

Good luck! :)
Last edited by Ouaz on Mon Jul 24, 2017 5:35 pm, edited 1 time in total.
I release every updated file under the CC-BY-SA 3.0 license.

Elistear
Space Krill
Posts: 4
Joined: Wed Apr 29, 2015 3:14 pm

Re: Chinese translation

#9 Post by Elistear »

Thank you Ouaz for sharing your method! It is so detailed and helpful. I appreciate it a lot. Will try to use the method in the future work for sure.

Considering the big differences between the stable en.txt and the latest one. I'd better start over again using the latest version. I think that's the best way for now.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Chinese translation

#10 Post by MatGB »

Reworking en.txt to make things a lot more user friendly is an ongoing project of mine and others are helping. It is always going to be subject to significant change, but that's fine, mostly what I'm doing is rewording entries to make the explanations better, clearer, etc.

Which is another observation, I'm English and don't use any of the translation files, but I'd recommend making the translations as clear as possible in whatever language you're translating too, if a direct translation is unclear, change it. Also, if you think the English version is unclear, say so in the en.txt thread, as I can add it to my list of things to try to make clearer.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

winfredhuang
Space Krill
Posts: 1
Joined: Thu Nov 01, 2018 3:25 am

Re: Chinese translation

#11 Post by winfredhuang »

I have seen this thread idle for years. I'm also frustrated to see that I can't just assign a different font that contains Chinese characters in version 0.4.8 by simply modifying any configuration file. I need to recompile the whole FreeOrion project to change fonts.
I'd like to take over the Chinese translation, but please make sure that I, as well as anyone enthusiastic to it, am able to change UI fonts freely. Otherwise, FreeOrion will be an unwelcome project for billions of people living in the Asian Continent.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Chinese translation

#12 Post by Dilvish »

winfredhuang wrote: Thu Nov 01, 2018 3:31 am I have seen this thread idle for years. I'm also frustrated to see that I can't just assign a different font that contains Chinese characters in version 0.4.8 by simply modifying any configuration file. I need to recompile the whole FreeOrion project to change fonts.
I'd like to take over the Chinese translation, but please make sure that I, as well as anyone enthusiastic to it, am able to change UI fonts freely. Otherwise, FreeOrion will be an unwelcome project for billions of people living in the Asian Continent.
Looking over this thread, it appears to me that the OP had no trouble modifying the configuration file to use a Chinese font, their only concern was that they had initially wanted to be able to change the font from within Options rather than directly modifying the config file.

Why are you saying you would need to recompile to change fonts?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6090
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Chinese translation

#13 Post by Vezzra »

Isn't it possible to change fonts via the options? I thought the necessary options were present on the UI tab...?

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Chinese translation

#14 Post by Dilvish »

Vezzra wrote: Thu Nov 01, 2018 3:06 pm Isn't it possible to change fonts via the options? I thought the necessary options were present on the UI tab...?
The OP describes it as the game having three different font settings that need to be adjusted for Chinese characters, only two of which could be adjusted via Options, with the third (specifically "font-bold") needing to be manually adjusted via config.xml.

Adrian responded that in his view the game should just entirely determine the font from the language setting, but I don't think that has happened. In the meantime, adding "font-bold" to the UI options page should be a relatively easy accommodation.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

phoenix-pb
Space Krill
Posts: 4
Joined: Thu Mar 07, 2019 7:17 am

Re: Chinese translation

#15 Post by phoenix-pb »

I made a project for chinese translation. The github link is https://github.com/phoenix-pb/FreeOrion ... ranslation.
I have two problem or bug in my translate progress.
first, some tip or title can't display with chinese font.
wrong-2.png
wrong-2.png (895.37 KiB) Viewed 6430 times
wrong-3.png
wrong-3.png (237.61 KiB) Viewed 6430 times
wrong-4.png
wrong-4.png (278.8 KiB) Viewed 6430 times
second, item's description in pedia can't auto wrap when use chinese.
wrong-6.png
wrong-6.png (295.17 KiB) Viewed 6430 times

Post Reply