FreeOrion

Forums for the FreeOrion project
It is currently Sat Dec 16, 2017 12:55 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Chinese translation
PostPosted: Mon May 11, 2015 12:00 pm 
Offline
Space Krill

Joined: Wed Apr 29, 2015 3:14 pm
Posts: 4
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.


Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Mon May 11, 2015 1:18 pm 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
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


Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Mon May 11, 2015 1:42 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12044
Location: Munich
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:
File comment: changes since v0.4.4 (hopefully)
en.txt.changes.patch [165.54 KiB]
Downloaded 41 times
Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Tue May 12, 2015 4:59 am 
Offline
Space Krill

Joined: Wed Apr 29, 2015 3:14 pm
Posts: 4
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 1186 times ]
Screenshot4.png
Screenshot4.png [ 274.72 KiB | Viewed 1186 times ]
Screenshot1.png
Screenshot1.png [ 630.36 KiB | Viewed 1186 times ]
Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Tue May 12, 2015 7:30 am 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
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


Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Tue May 12, 2015 7:52 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12044
Location: Munich
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?


Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Tue May 12, 2015 3:13 pm 
Offline
Space Krill

Joined: Wed Apr 29, 2015 3:14 pm
Posts: 4
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.
Attachment:
Screenshot6.png
Screenshot6.png [ 298.45 KiB | Viewed 1153 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?


Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Tue May 12, 2015 8:47 pm 
Offline
Dyson Forest
User avatar

Joined: Wed Aug 13, 2014 7:21 pm
Posts: 213
Location: France
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:

Attachment:
diff_1.PNG
diff_1.PNG [ 10.71 KiB | Viewed 1141 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:

Attachment:
text_editor.png
text_editor.png [ 7.59 KiB | Viewed 56 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:

Attachment:
side_by_side.png
side_by_side.png [ 22.54 KiB | Viewed 56 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! :)

_________________
I release every updated file under the CC-BY-SA 3.0 license.


Last edited by Ouaz on Mon Jul 24, 2017 5:35 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Thu May 14, 2015 1:39 am 
Offline
Space Krill

Joined: Wed Apr 29, 2015 3:14 pm
Posts: 4
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.


Top
 Profile  
 
 Post subject: Re: Chinese translation
PostPosted: Thu May 14, 2015 10:10 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3295
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group