Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 12 13 [14] 15 16 17

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

Hessed.Elohim

  • Bay Watcher
  • Spanish Translator
    • View Profile
    • Spanish DF Wiki
Re: Dwarf Fortress localization patch
« Reply #195 on: February 19, 2017, 03:01:29 pm »

:o (ohhhh) .. thanks for doing so (I thought to offer myself to collaborate in what I could, but...) in any case, if you want, you can delegate me the part of the translation (I do not know if the interface will be multilingual)

I'm waiting for that guide

greetings and happy day (I guess?)

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #196 on: February 24, 2017, 06:14:53 am »

ChangeTextPy.7z is fixed now.
How to use: unpack it into DF directory (where Dwarf Fortress.exe is located). All DF 32-bit SDL versions are supported. Run install_fake_ttf.bat. In the init.txt of DF must [PRINT_MODE:2D] and [TRUETYPE:YES].

changetext.py which goes with the package does the following: replaces "Dwarf" with "Human", and reverses order of words in sentences

Code: [Select]
def _ChangeText(s):
    # Examples
    # Replace 'Dwarf' with 'Human':
    s = s.replace('Dwarf', 'Human')
    # Reverse words:
    s = ' '.join(reversed(s.split()))
    return s

Spoiler: Screenshot (click to show/hide)

You can do nearly everything as far as you can implement it in Python :)

For example, here is rather complicated changetext.py script which we use for Russian.
It tries to fix inflection (using Pymorphy2 library) and order of words in sentences, and does some logging for debugging.

P.S. Please notify me if something is not working.
« Last Edit: February 24, 2017, 06:33:14 am by insolor »
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #197 on: March 06, 2017, 12:52:42 pm »

Here the first testing version of df-translate tool:
https://bitbucket.org/dfint/df-translation-client/downloads/df-translate.7z

Only two tabs are implemented for now (I posted screenshots of them earlier in this thread).
GUI hangs during downloading of files on the first tab, I will try to make downloading to be performed in the separate process later. Fixed.
The second tab is functional, so you can use this tool as a replacement of command-line dfrus-py.
The application remembers state of controls between session. Configuration file is stored in user's home directory (c:\users\username\.df-translate.json), you can remove it manually to restore default settings.

I'm planning to implement the third tab in the future to apply translation to external files of DF. I don't know how long it will take.

Source code is located here: https://bitbucket.org/dfint/df-translation-client/src
« Last Edit: March 08, 2017, 11:03:10 am by insolor »
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #198 on: March 08, 2017, 11:02:37 am »

Fixed package of df-translate is uploaded. It did not run if there wasn't some keys in config file (or if there wasn't config file at all). Now the problem is fixed. Also it doesn't hang during translation file downloading.
« Last Edit: March 23, 2017, 11:54:40 am by insolor »
Logged

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #199 on: March 26, 2017, 07:56:27 am »

df-translate updated again: https://bitbucket.org/dfint/df-translation-client/downloads/
* Fixed bug because of which patch worked only with Russian language (thanks to Uğur Öztürk for the report)
* Now you can stop download and patch processes
* Support of a lot of encoding is added. Also, when translation file is chosen in the combobox you see only encodings to which it's possible to encode translation file (i.e. different set of encodings for different languages)
* The program now will show error messages instead of ignoring them. Please, report any errors or problems in this thread or on the issue tracker.

Spoiler (click to show/hide)
Logged

Hessed.Elohim

  • Bay Watcher
  • Spanish Translator
    • View Profile
    • Spanish DF Wiki
Re: Dwarf Fortress localization patch
« Reply #200 on: March 27, 2017, 08:52:42 am »

Many thanks @insolor .. I was looking for, and I found that in df-translate.pyw are the "texts" of the app .. I could upload/send u a Spanish version, so that you compile it? (If I remember correctly, can be done as variants of the same project) or if you explain to me how I do it myself.

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #201 on: March 27, 2017, 12:09:05 pm »

Many thanks @insolor .. I was looking for, and I found that in df-translate.pyw are the "texts" of the app .. I could upload/send u a Spanish version, so that you compile it? (If I remember correctly, can be done as variants of the same project) or if you explain to me how I do it myself.
I will try to use gettext in the application, so it will possible to export text strings as a po file and eg. upload to transifex. For now I think it's too early because the application will change a lot. And also it would be great if someone review and fix English texts of the app before translation to other languages.
Logged

Hessed.Elohim

  • Bay Watcher
  • Spanish Translator
    • View Profile
    • Spanish DF Wiki
Re: Dwarf Fortress localization patch
« Reply #202 on: March 27, 2017, 01:48:31 pm »

I will try to use gettext in the application, so it will possible to export text strings as a po file and eg. upload to transifex. For now I think it's too early because the application will change a lot. And also it would be great if someone review and fix English texts of the app before translation to other languages.

I understand.. i will try to help u with that. :D

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Github
Re: Dwarf Fortress localization patch
« Reply #203 on: March 27, 2017, 02:23:44 pm »

It seems it works, although UI needs some tweaks.
But the program doesn't work when it is complied with PyInstaller (it says "Failed to execute script df-translate"). I will try to use dev version PyInstaller later.

Spoiler (click to show/hide)
Logged

Hessed.Elohim

  • Bay Watcher
  • Spanish Translator
    • View Profile
    • Spanish DF Wiki
Re: Dwarf Fortress localization patch
« Reply #204 on: June 28, 2017, 06:14:41 pm »

Hi.. query.. does anyone have any idea what this is used for?

Spoiler (click to show/hide)

scamtank

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #205 on: June 28, 2017, 08:33:18 pm »

Announcements, probably. Just because your basic default citizens will never give birth to more than 2 sprogs at a time doesn't mean the engine just gets to slack off and not be ready for the possibility.
Logged

Hessed.Elohim

  • Bay Watcher
  • Spanish Translator
    • View Profile
    • Spanish DF Wiki
Re: Dwarf Fortress localization patch
« Reply #206 on: June 28, 2017, 08:53:39 pm »

Thanks x answer :)

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #207 on: June 30, 2017, 09:25:21 am »

Does this work with 64 bit? The repository has no readme or anything...
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 #208 on: June 30, 2017, 09:26:28 am »

Does this work with 64 bit? The repository has no readme or anything...
No, 64 bit version is not supported yet
Logged

armoha

  • Escaped Lunatic
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #209 on: July 05, 2017, 05:58:36 am »

There is Korean translation of DF using modified SDL_ttf.dll. (page: http://nethack.byus.net/gnu4/bbs/board.php?bo_table=df_ko )
Spoiler (click to show/hide)

The issues
  • multi-line report/announcement is translated improperly, due to word order and grammer differences between English and Korean.
  • "Help", DFHack helper functions and "Thoughts and Prefences" aren't translated. They use graphic font.
  • masterwork mark(☼) is broken(?). dunno why.
  • descriptions in symbol screen
output looks simmilar to translation using ChangeTextPy alone.

I have questions about Russian version DF, insolor. How is the TTF output project on "Thoughts and Preferences" screen coming along? How did you manage long combat reports, like named noble dorf hits long-named guy with artifact weapon? Thank you.
Logged
Pages: 1 ... 12 13 [14] 15 16 17