Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 9 10 [11] 12 13 ... 17

Author Topic: Dwarf Fortress localization patch  (Read 112617 times)

scamtank

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #150 on: August 13, 2016, 03:15:59 pm »

I still lean on it pretty hard, although I don't expect that level of fiddling from anyone downloading my trash. The most I had was my personal custom "dictionary" as an optional module for the brave. Are there going to be tools that can stomach the 64bit executables?
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #151 on: August 13, 2016, 03:29:45 pm »

I still lean on it pretty hard, although I don't expect that level of fiddling from anyone downloading my trash. The most I had was my personal custom "dictionary" as an optional module for the brave. Are there going to be tools that can stomach the 64bit executables?
64bit support is planned but it is not at the first place in my list. At first I'm going to do some GUI-thing to simplify applying of translation to the game. Then I need to fix charmap patching for 32bit DF 0.32.04 and newer and check if all other things function well. After that I will try to add support of 64bit executables.
« Last Edit: August 13, 2016, 03:45:00 pm by insolor »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #152 on: August 13, 2016, 10:40:58 pm »

I don't use it anymore, but I definitely used to. I don't think those versions are anywhere, though.

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #153 on: August 26, 2016, 07:47:35 pm »

I've merged experimental branch of dfrus-py into develop one. Using of the develop branch of dfrus-py is recommended. Also, dfrus.py must be supplied with dictionary.csv in utf-8 encoding (just don't specify codepage in the po2csv.py command line, it will produce a file in utf-8 by default). I've changed instructions accordingly (both English and Spanish versions), download links ("zip") on that pages are updated too.

Dfrus-py currently supports DF 0.43.03 (more or less stable). Support of DF 0.43.04 and higher is coming (only 32bit). At least it doesn't complain about codepage table anymore, and you can get working executable (with some artifacts in strings, but this will be fixed).
« Last Edit: August 26, 2016, 08:21:27 pm by insolor »
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #154 on: September 01, 2016, 03:42:26 pm »

Is there any way to use this (or something like this) with Linux DF binaries?
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #155 on: September 04, 2016, 03:30:28 am »

Is there any way to use this (or something like this) with Linux DF binaries?
There are some utilities by other developer, but I don't know how stable they are and they definitely haven't tested on languages other then Russian.
I've send her a link to your message, but probably she is busy now with some real life things.
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #156 on: September 04, 2016, 03:49:53 am »

I'm working on a utility to automate a process of making translated DF package.
Spoiler (click to show/hide)
Currently only the first tab is partially implemented. The layout of controls if far from ideal now, so it will be changed.
I will try to make minimal working build as soon as possible.
Logged

Hessed.Elohim

  • Bay Watcher
  • Spanish Translator
    • View Profile
    • Spanish DF Wiki
Re: Dwarf Fortress localization patch
« Reply #157 on: September 04, 2016, 10:54:37 am »

I've merged experimental branch of dfrus-py into develop one. Using of the develop branch of dfrus-py is recommended. Also, dfrus.py must be supplied with dictionary.csv in utf-8 encoding (just don't specify codepage in the po2csv.py command line, it will produce a file in utf-8 by default). I've changed instructions accordingly (both English and Spanish versions), download links ("zip") on that pages are updated too.

Dfrus-py currently supports DF 0.43.03 (more or less stable). Support of DF 0.43.04 and higher is coming (only 32bit). At least it doesn't complain about codepage table anymore, and you can get working executable (with some artifacts in strings, but this will be fixed).

@insolor.. So you have already changed the Spanish instructions too?

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #158 on: September 05, 2016, 02:01:18 am »

I've merged experimental branch of dfrus-py into develop one. Using of the develop branch of dfrus-py is recommended. Also, dfrus.py must be supplied with dictionary.csv in utf-8 encoding (just don't specify codepage in the po2csv.py command line, it will produce a file in utf-8 by default). I've changed instructions accordingly (both English and Spanish versions), download links ("zip") on that pages are updated too.

Dfrus-py currently supports DF 0.43.03 (more or less stable). Support of DF 0.43.04 and higher is coming (only 32bit). At least it doesn't complain about codepage table anymore, and you can get working executable (with some artifacts in strings, but this will be fixed).

@insolor.. So you have already changed the Spanish instructions too?
Yes, there weren't any difficulties. But it would be nice if someone check them.
Logged

Hessed.Elohim

  • Bay Watcher
  • Spanish Translator
    • View Profile
    • Spanish DF Wiki
Re: Dwarf Fortress localization patch
« Reply #159 on: September 05, 2016, 07:49:59 am »

I've merged experimental branch of dfrus-py into develop one. Using of the develop branch of dfrus-py is recommended. Also, dfrus.py must be supplied with dictionary.csv in utf-8 encoding (just don't specify codepage in the po2csv.py command line, it will produce a file in utf-8 by default). I've changed instructions accordingly (both English and Spanish versions), download links ("zip") on that pages are updated too.

Dfrus-py currently supports DF 0.43.03 (more or less stable). Support of DF 0.43.04 and higher is coming (only 32bit). At least it doesn't complain about codepage table anymore, and you can get working executable (with some artifacts in strings, but this will be fixed).

@insolor.. So you have already changed the Spanish instructions too?
Yes, there weren't any difficulties. But it would be nice if someone check them.


I have already checked also, all in order, thanks for taking the time :D . regards

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #160 on: September 06, 2016, 11:16:35 am »

There are some utilities by other developer, but I don't know how stable they are and they definitely haven't tested on languages other then Russian.
I've send her a link to your message, but probably she is busy now with some real life things.

Thank you very much!

It looks like there is even a version of the tool written in Go (my primary/favorite language) so if something doesn't work I can probably fix it myself without too much trouble :) Of course all the comments are in russian... (Go Google translate!)
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

ockmonek

  • Escaped Lunatic
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #161 on: September 14, 2016, 04:12:08 pm »

Hi Folks,

I did translated some strings in transifex to german.
Now I want create the hardcored .exe for testing.

I used this discription: https://bitbucket.org/dfint/dfint-docs/wiki/Translate%20Executable
Creating the dictionary.csv wasn't the problem with this code:
Code: [Select]
py -3 po2csv.py de.po de.csv cp1252I used cp1252 because the german umlauts (ä,ü,ö etc.)
Is this codepage works?

Then I want create the patched exe with this: (DF 0.43.03 legacy)
Code: [Select]
py -3 dfrus.py -p "Dwarf Fortress.exe" -d de.csv --codepage cp1252
Unfortunally, I was become this UnicodeDecodeError:
Spoiler (click to show/hide)

I try to fix it in dfrus.py to change line 501 so:
Code: [Select]
with open(args.dictionary, encoding='iso-8859-1') as trans:
Then I become this:
Spoiler (click to show/hide)

Any ideas?
My motivation to continue translating is not so big, as long as this test version isn't running.  :-[
« Last Edit: September 14, 2016, 04:33:19 pm by ockmonek »
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #162 on: September 15, 2016, 12:38:25 am »

Hi!
Legacy versions of DF are not supported (in the best case dfrus just will fail to patch charmap table, because there is no such table), only SDL versions are supported.

As for po2csv arguments, dfrus.py currently assumes that csv file is in utf-8 encoding. So the command line must look like this:
Code: [Select]
py -3 po2csv.py de.po de.csv utf-8or
Code: [Select]
py -3 po2csv.py de.po de.csv(utf-8 is used by default)

As for codepages, the patcher currently supports only a limited range of them: cp437 (natively supported by DF), cp737 (Greek), cp850 (Spanish and Portuguese, if I recall correctly), cp860 (Brazilian Portuguese), cp866 and cp1251 (for Russian and other East European languages). As far as I know, cp437 is suitable for German. If not, there must be added suitable DOS codepage into "codepages" dict in patchdf.py. You can ask me and I will add it.
« Last Edit: September 15, 2016, 01:48:46 am by insolor »
Logged

ockmonek

  • Escaped Lunatic
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #163 on: September 15, 2016, 03:46:38 am »

Thanks a lot.
The legacy-version was the problem. ;)
Now, i can create the patched exe and can use csv in any codepage.

The problem now is the missing codepage for german.
Umlauts are not the right one. See here:
Spoiler (click to show/hide)
"About DF" must be "Über DF" Or "Press" = "Drücke"

dfrus doesn't work with cp437 (Codepage437 not implemented.Skipping.). i can't try, but i think isn't the right one for german.
the csv with cp1252 looks good. i think thats the right one for the codepages dict.
I would be nice when you could add it.
« Last Edit: September 15, 2016, 04:04:11 am by ockmonek »
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #164 on: September 15, 2016, 05:00:47 am »

Thanks a lot.
The legacy-version was the problem. ;)
Now, i can create the patched exe and can use csv in any codepage.

The problem now is the missing codepage for german.
Umlauts are not the right one. See here:
Spoiler (click to show/hide)
"About DF" must be "Über DF" Or "Press" = "Drücke"

dfrus doesn't work with cp437 (Codepage437 not implemented.Skipping.). i can't try, but i think isn't the right one for german.
the csv with cp1252 looks good. i think thats the right one for the codepages dict.
I would be nice when you could add it.
Try not to specify codepage both for po2csv.py and dfrus.py:
Code: [Select]
py -3 po2csv.py de.po de.csv
py -3 dfrus.py -p "Dwarf Fortress.exe" -d de.csv
If it won't work anyway, I'll test and fix it.

Update: I've added stub cp437 entry to the codepages dict, so dfrus.py will not complain that cp437 is not implemented anymore. You need to update your local copy of dfrus-py repository.
« Last Edit: September 15, 2016, 05:18:27 am by insolor »
Logged
Pages: 1 ... 9 10 [11] 12 13 ... 17