1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

XML-Texts Copy Tool

Discussion in 'Civ4 - Utility Programs' started by swan, Dec 11, 2006.

  1. swan

    swan CivFanatics.ru TEAM

    Joined:
    Mar 14, 2003
    Messages:
    76
    Location:
    Siberia
    This program is intended for copying text entries from one or more files to another.

    The program copies content of one language tag (for example, English) to another language tag (for example, Russian), or to the same language tag from one file to another.

    The program supports copying texts from XML files as well as from and from TXT files to XML files.

    Entries from the source file are copied into the entries of the destination file that are named identically to the entries of the source file. The order of entries can be arbitrary

    The program simplifies the process of simulataneous translation of the same file by several people.
    For example, there are 10 large clauses of civilopedia in a file. The first person translates 3 clauses, the second one - 5 clauses and the third one - 2 clauses. Each of them creates a file that only contains enties that he or she has translated. After processing by this program the final (destaination) file contains the translation of all of 10 texts without use of the vulgar "Copy/Paste" method .

    It is also possible to copy texts from one language tag to another, for instance, from English to French.

    The archive file contains a sample of how the program works: a .bat file along with 2 files (Example_in_file.txt - the file from which the text is copied, Example_destination_file_CIV4GameText_Warlords_Strategy.xml - the file to where the text will be copied).

    The program configuration ini-file contains the following items:
    in_lang - source language tag (copy from)
    out_lang - destination language tag (copy to)
    insert_tab=0 and uuencode=0 - some rarely used parameters that you are unlikely to need since they are used for manipulations with non-Latin based encodings ( like <Russian></Russian>-tags)

    File path shall not have whitespaces in it (space, tab, line return). Total length of line in .bat file shall not exceed 255 symbols

    Download HERE (75Kb)

    Author: sweeper (CivFanatics.ru TEAM)
     
  2. asioasioasio

    asioasioasio Fallout Scrubber

    Joined:
    Mar 4, 2006
    Messages:
    3,058
    Location:
    Poland, EU
    :goodjob: :crazyeye:
    awesome tool
    It'll save 2 weeks of my life - I tested it - couldn't figure it out in the beginning but after few tries and changes in settings i finally merged to files with languages - i would merge this files for about 6 hours and it took me bout only 20 min (keep in mind that i needed time to figure it out :))
     
  3. asioasioasio

    asioasioasio Fallout Scrubber

    Joined:
    Mar 4, 2006
    Messages:
    3,058
    Location:
    Poland, EU
    Hey i have one questions more about this uucode - is it changes the letters non-latin for example &#347;,&#263;,&#324;, &#281; &#261;, &#380;, &#378; to correct code automaticly?

    What shoul i do to turn this option on - I would need this option for <Polish></Polish>

    And one more question - How you made that the correct russian letters are displayed? Did you have problem in translation with displaying latin letters like &#235;&#245;&#228;&#229;&#228;&#246;? are they correctly displayed in game - i have problem here - or i have problems with german letters or i have problem with displayng polish letters - i have everything ok after switching to polish, but after i switch to german or just have cities with german letters - they are displayed as polish - for example &#246; is &#263;

    and thx for this good program
     
  4. swan

    swan CivFanatics.ru TEAM

    Joined:
    Mar 14, 2003
    Messages:
    76
    Location:
    Siberia
    uuencode=1 operates only with Cyrillic Windows-1251 encoding - symbols - &#1040;&#1041;&#1042;... encoding to &# 192;&# 193;&# 194; (without whitespaces after #) etc.

    Game displays letters with values from 192 to 255 (&# 192; etc.) at that encoding, which is default assigned in Windows (in Russian Windows default settings is Windows-1251).

    Sorry for my english.
     

Share This Page