Translation / text handling related questions

After investigating this I learned that this is what happens when the modified font IS NOT USED. Somehow you didn't install the font correctly into your system. Maybe you didn't remove the vanilla font first or something. Either way that seems to be the problem.

I tried to manually delete the font at all, and then place it anew - and yes, it appears that I have no rights to do it on my own computer :eek:
I inspected the font properties, and the "security" tab says that only a "TrustedInstaller" is permitted to modify this font. Others (System/Admin/Users) can only read and use (with best regards from Windows :wavey:). The access permits check boxes are grayish, so I can't tick the ones I need, too.

So, in order to get it installed, I must have it from what belongs to the TrustedInstaller group. Or somehow hack my access to it.

EDIT:
"How to hack font access rights" manual found.
Read -OK
Kill the damn thing -OK
Install the blessed thing -OK

Well, it does look the whole way better now. Still some problems do remain as you can see:
€ still goes for П;
[SPACE] still goes for Ь;
ѓ still goes for Д.

Others look like they should, which is a great improvement. No ideas on why it's only a partial success though...
 

Attachments

  • 2014-07-17 19-59-49 Colonization.jpg
    2014-07-17 19-59-49 Colonization.jpg
    115 KB · Views: 161
It reminds me of an anecdote where the Snow Queen promised to release Kai if he manages to assemble the word "happiness" of the letters she would give him.
Then she gave him the letters "A", "R", "S" and "E".

The funniest part though is that the anecdote was there for ages before someone appeared smart enough to solve the puzzle for Russian equivalents. He cheated a little bit by using ' for Ь, which is most uncommon though possible, but still solved what was thought to be insolvable:
Spoiler :
 
Well, it does look the whole way better now. Still some problems do remain as you can see:
€ still goes for П;
[SPACE] still goes for Ь;
ѓ still goes for Д.

Others look like they should, which is a great improvement. No ideas on why it's only a partial success though...
I wrote a conversion table where it takes the UTF-8 value and converts it to the game value. It looks like the concept works and that our computers agree on how to handle this. There is a minor detail where I apparently wrote the wrong numbers in some places, but it doesn't look like there are any serious problems. I wouldn't be surprised if it turns out that there is just a single typo or something, which makes 5 characters or so get an offset error and display incorrectly.

I guess I better copy in the alphabet again and systematically go through all characters. Maybe I should have done so from the start, but... oh well it's not too late.

There is a known issue with billboards. The code to handle those will heavily depend on the first conversion table meaning it would be a waste of time to not deal with billboards last. Speaking of billboards/GameFont. We can reduce the number of Russian characters there by quite a number now. Also I don't think they need to be in GameFont_75. We suddenly increased the number of free slots by quite a deal.
 
I located the problem. It turns out that I hardcoded the font to work only when Windows is set to a western European language, like English :wallbash:

Try setting it to English and it should work. Any English would do.
https://www.coscom.co.jp/learnjapanese801/japanesefont/nonunicode_win7.html

If we are able to get different fonts based on locale, we might be able to scrap the modified font entirely. What we need is a feature to ask windows which locale/charset it is using and then use a fitting conversion table when reading UTF-8 and again when writing billboards. The tradeoff is that you have to set windows to use a language, which uses the same charset as the translation you intend to use. The exception is that English will always work regardless of characterset.

I think a Russian computer playing vanilla will only be able to display English correctly. However I find it unlikely that anybody will be bothered by not getting a proper French or Italian translation if the computer is set to Russian. In fact odds are that nobody noticed.
 
Oh, yesss! I does look good now. Apart from some tiny insignificant detail though. The rectangles. Do you also have them?
 

Attachments

  • 2014-07-18 02-37-56 Скриншот Ñ￾крана.png
    2014-07-18 02-37-56 Скриншот Ñ￾крана.png
    201.7 KB · Views: 49
  • 2014-07-18 02-39-52 Скриншот Ñ￾крана.png
    2014-07-18 02-39-52 Скриншот Ñ￾крана.png
    325.8 KB · Views: 97
  • 2014-07-18 02-42-21 Скриншот Ñ￾крана.png
    2014-07-18 02-42-21 Скриншот Ñ￾крана.png
    278.7 KB · Views: 63
The rectangles. Do you also have them?
Arrrgghhhhh.. Not again. I don't know why they turned like that and I thought I fixed it. They appear like that for a new reason this time and I have no idea what it is.

I think I will branch off a few commits back and try to see if I can make something useful with the locale approach. If it works, it works without modifying the font file and the rectangles will go away. I actually prefer to fix it this way because I don't like issues disappearing and reappearing at random.
 
I discarded the modified font, which removed the rectangles. I then added conversion tables from iconv, which with little effort added support for all charactersets, which use a single byte. The list can be seen here:
http://msdn.microsoft.com/en-us/goglobal/bb964654

Some of those aren't in the font, but that isn't a DLL issue :p

The exe is hardcoded to only use one byte for each character. This mean adding any characterset, which has two byte characters seems impossible.

Next up is figuring out a nice way to convert from locale characterset to GameFont. The tricky part here is that the same character has different GameFont values depending on locale language. For instance character 193 is 193 Á in 1250, while it is 8484 Б in 1251.
 
How are things going with the Russian translation? I seen a post over on the Steam forums asking about a Russian version. Funny about all this Russian interest all of a sudden, well at least seeing talk about it on the forums :) Anyway, I made a post and pointed them to this forum.
 
I'm making the finishing touches to the code itself for generic support for adding more characters as well as support charactersets. It's a system where one XML file is used to tell the GameFont location of unicode characters as well as icons such as yields. I'm not 100% satisfied with it, hence the reason why it isn't committed yet. I need to adjust some minor details first.

I learned that the game uses windows locale codepage and is hardcoded to only work with 8 bit characters :( That makes stuff more difficult, but generally speaking the game can display the language windows is set to use. At the same time GameFont uses unicode. It would have been much easier for us if it just used unicode for everything. The setup where it uses two different systems is confusing and in fact the cause of a vanilla bug. Parts of GameFont.tga is unreachable in vanilla. Because I changed the design to be generic unicode support rather than just adding Cyrillic, this bug is fixed.

The translation of the strings themselves seems to be stalled. Lately I have been wondering if I should contact Daw to make sure everything is ok as he appears to have entered hiding mode.
 
Top Bottom