View Full Version : Does BUG need a translator?
The Doc Mar 28, 2008, 09:21 AM Hi,
BUG is a really great mod, but I noticed that only a few texts are translated to german. So I modified the XMLs I found in XML\Text-folder to help you out with this. :D
The only thing I can't access is the text for the options-screen of BUG mod. Obviously, there aren't any tags for this in the XML-files. If you would like me to take care of them, just contact me.
Also it would be great, if other german players could give their feedback on the translated parts.
PS: I didn't translate the tags TXT_KEY_HINT_74 to 92 because, as far as I can see, they are mostly already in the game (probably with different wording), as well as 99% of the text in CIV4GameText_BTS.xml.
alerum68 Mar 28, 2008, 02:11 PM Wow. I've been asking for someone to do this for months! Thank you so much Doc! I'll go over them this weekend, and have the put on the SVN ASAP. As for the Options Screen, it would be very difficult because it makes no calls to the XML, having all on-screen text within the Python Code, and not sure how to make multi-language support for Python.
If you'd like to help with more translations, what we really need is a translator for our Help file. Do you know HTML, or have an HTML editor? Also, is German your mother tongue, or did you learn it later? If later, how long ago? Thank you!:)
The Doc Mar 28, 2008, 02:54 PM Hmm, I searched the BUG forum but didn't find any translation thread. Maybe I have overlooked your request. :)
I'm from Germany, so german is my mother tongue. I'm currently working together with the guys at civforum.de on the german translation for Kael's Ubermod FfH2.
I unfortunately don't know much about HTML but I'm using Notepad++ for syntax-highlighting, if this is of any help. (I guess not. :D)
Sam_Yeager Mar 28, 2008, 04:16 PM This (http://forums.civfanatics.com/showthread.php?t=243067) seems to be the thread that Alerum was talking about. It appears that there was some german translation done at some point.
alerum68 Mar 28, 2008, 05:59 PM Yes, that thread will list pretty much everything we are hoping to get translated. Ludwig II translated the old ReadMe.rtf file into German, but I believe that was it... most of our translations are now out of date unfortunally. Anyway, the only thing I request when doing the actual translations is to not just change word for word, but to adapt it so it will seem a native speaker wrote it form the start, and not just translated. Don't be scared to change my words, I won't get mad.:p
As for the HTML editor there are several that will take out the code for you, and allow you to just type like you are in any standard text editor. The HTML files at this point have no graphics in them, so it will be basically HTML tags for formating. If you're interested let me know and I'll send the source HTML for the help file in English, and you can use that as a template and guide to make it so you are just having to replace words, and not even deal with formating. If you're on the SVN the files are there as well.
Now if we can only make CIV have right-to-left text, we could make this complete!
alerum68 Mar 28, 2008, 08:14 PM A few questions about the translations. I noticed the ones in Civ4lerts weren't so much translations, as modifications of the current wording. Were these mistranslations, or desired additions?
The Doc Mar 29, 2008, 04:16 AM Which ones do you mean? The translations for the "CIV4LERTS_ON_CITY"-Tags? Yes, I added some words so that they sound better. As you might know German is a rather precise language, especially when it comes to game rules. For example: In English a city can grow to size x, in German it has to be the population of the city that grows to size x. It's somewhat different to explain in English. :)
ruff_hi Mar 29, 2008, 12:39 PM The option screen text is currently imbedded in the python files. We have an outstanding item regarding moving them to XML but that is still ... errr ... outstanding. To be honest, I have never looking into what is required. I will take a look and see what I can do.
The Doc Mar 29, 2008, 01:49 PM That would be cool. :D
I'm no programmer but maybe you "just" have to replace the plain text of the option names in the python-files with some tags that are located in an XML-file. Then again, this might sound to easy and I'm fantasizing. :D
ruff_hi Mar 29, 2008, 02:48 PM well - it looks easy. I've just done 3 options (not tested yet). I'll boot up the game and see if it actually works. I'm freeing up two items (the text on the screen and the 'hover' text).
EmperorFool Apr 20, 2008, 05:49 AM Don't be scared to change my words, I won't get mad.:p
If you don't read German, how would you even know? :mischief:
Yes, I added some words so that they sound better.
I did some missing Civ4lert translations originally using Babelfish so I expect they read quite poorly. Thank you so much for helping out. As a matter of fact, I completed Ruff's work to move the options screen tabs, labels, titles and hover text to XML files. They are in SVN now. You can get any version of the file from this page (http://civ4bug.svn.sourceforge.net/viewvc/civ4bug/BUG%20Mod/CustomAssets/XML/Text/BUGOptions_CIV4GameText.xml?view=log), but here is a direct link to the latest version (http://civ4bug.svn.sourceforge.net/viewvc/*checkout*/civ4bug/BUG%20Mod/CustomAssets/XML/Text/BUGOptions_CIV4GameText.xml?content-type=text%2Fplain).
Edit: Note that you need the latest version from SVN to test this out. The above XML file won't work by itself.
Edit: I thought the tabs weren't working, but I just tested again and they are. Go for it!
ruff_hi Apr 20, 2008, 06:32 AM I'm thinking of adding some files that pop up a NAG during the first 'other civs' turn. It will check for a key in the BUG.ini file and will display a pop up (and increment the key by 1) depending on the key that says ...
key = 0: "BUG needs translators - interested in helping out for free?"
key = 1: "Come on, you know you should help ... BUG needs translators"
key = 2: "Last chance before we trash your hard drive (joking!) - BUG needs translators"
key > 2: no dialog box
This will also give us a way to communicate with our users in the future (ie add additional messages for higher values of the key.
EmperorFool Apr 20, 2008, 08:08 AM Yes, but who would translate those messages? ;)
Seriously, I'd rather not do that. Consider that we'd maybe get a few people to help, yet we'll have inconvenienced every single user. I would find it very off-putting as a user myself, a la spam.
I would be fine with adding a blurb at the end of the credits, like
Want to be a part of the team or assist with translations, artwork or coding?
Post a message to the BUG forum at civfanatics.com or send an email to civ4bug-contactus@lists.sourceforge.net.
I don't want people to think we called the mod BUG because we like to bug our users. :D
The Doc Apr 23, 2008, 05:01 AM I just finished the first revision of the german translation (yay :D ) and I found some missing tags that are not in the xml-files, so I can't translate them. See pictures below (mostly dropdown-menus). I marked them with red frames.
Also the text on the tabs is translated but doesn't show up. :confused:
EmperorFool Apr 23, 2008, 07:08 AM @The Doc - Wow, that looks amazing! :eek:
The era at the top of the screen in the main interface isn't translated. In the core Civ4 translations, some languages contain the word for "era" as part of the era. For example (totally made up), in English you have "Ancient", but this translates to Spanish as "Era Vieja", so it shows up as "Era Vieja Era". :( I think this is filed as a bug in our tracker.
I'm still working on a way to make the drop-downs translatable. The tab names, however, should be working. They weren't at first for me, but then they just started working for no good reason. I'll check again on my end.
For the Foreign Advisor, the first option (Glance Tab) means to show a whole new tab on the screen. The second option (Glance Tab Smilies) means to put smilies on the Glance Tab (only if the first option is checked, of course). Not knowing German, I can't tell if that is clear from your translation.
I'm stoked to see what you've done so far. Thank you so much! :goodjob:
Edit: Here's what I added for the Military Advisor. You can update SVN and get the addition (it will merge in your changes -- not overwrite them, though I certainly recommend making regular backups to a different directory until you're comfortable with SVN).
<TEXT>
<Tag>TXT_KEY_BUG_OPTLABEL_MILITARY_ADVISOR</Tag>
<English>Military (F5):</English>
<French>Military (F5):</French>
<German>Military (F5):</German>
<Italian>Military (F5):</Italian>
<Spanish>Military (F5):</Spanish>
</TEXT>
It goes in between the Foreign and Technology Advisors, as it is on the screen.
Edit 2: Are the color translations I got from Babelfish okay? If not, they are located at the end of BUG_CIV4GameText.xml.
EmperorFool Apr 23, 2008, 08:02 AM The tab names, however, should be working. They weren't at first for me, but then they just started working for no good reason. I'll check again on my end.
Of course, they're not working anymore. :lol: I'll fix that and add a way to translate the screen title (BUG Mod Options).
I'm close to having the drop-down lists translatable.
The Doc Apr 23, 2008, 08:59 AM @The Doc - Wow, that looks amazing! :eek:
Thanks. :D It's just the first revision and still work in progress.
The era at the top of the screen in the main interface isn't translated. In the core Civ4 translations, some languages contain the word for "era" as part of the era. For example (totally made up), in English you have "Ancient", but this translates to Spanish as "Era Vieja", so it shows up as "Era Vieja Era". :( I think this is filed as a bug in our tracker.
Oh, Ok. Maybe the next patch will help us out with this.
[...]
For the Foreign Advisor, the first option (Glance Tab) means to show a whole new tab on the screen. The second option (Glance Tab Smilies) means to put smilies on the Glance Tab (only if the first option is checked, of course). Not knowing German, I can't tell if that is clear from your translation.
Yes, I know what it does. :) English is not shorter on every occasion. :D
I'm stoked to see what you've done so far. Thank you so much! :goodjob:
Edit: Here's what I added for the Military Advisor. You can update SVN and get the addition (it will merge in your changes -- not overwrite them, though I certainly recommend making regular backups to a different directory until you're comfortable with SVN).
[...]
I'm using Winmerge for version comparison. So that's no problem at all.
Edit 2: Are the color translations I got from Babelfish okay? If not, they are located at the end of BUG_CIV4GameText.xml.
The Colors weren't translated when I first laid eyes on the xml-files of BUG. :dunno: They were among the first things I worked on, iirc.
Of course, they're not working anymore. :lol: I'll fix that and add a way to translate the screen title (BUG Mod Options).
I'm close to having the drop-down lists translatable.
Great to hear. :goodjob:
EmperorFool Apr 23, 2008, 09:01 AM Okay, all done.
Tab titles are translated.
Option lists are translated. Separate items by a vertical bar "|". See the XML file for an example, search for "_LIST". I added all of the existing ones with German translations. Laugh at Babelfish. :lol:
The Credits tab's headers (BUG Team, Mod Authors, Translators) are translated.
I added you as "The Doc" to the Credits tab. Let me know if you want to use a different name.
The one remaining option list related localization issue is that I can't see an easy way to use "," for the decimal point "." that we do in the U.S. For example, "3,14" vs. "3.14" for pi. I notice the game itself doesn't use "," for its numbers in German, so I'm inclined to punt on this one. :)
EmperorFool Apr 23, 2008, 09:13 AM The Colors weren't translated when I first laid eyes on the xml-files of BUG. :dunno: They were among the first things I worked on, iirc.
Ah, I see I only did the Spanish colors originally. I see the German ones on my screen here, so I assumed I had looked them up in the fish as well. I see that Alerum snuck your translations in at the end of March.
The Doc Apr 23, 2008, 11:45 AM Ah, I see I only did the Spanish colors originally. I see the German ones on my screen here, so I assumed I had looked them up in the fish as well. I see that Alerum snuck your translations in at the end of March.
No problem, mate. :D
The Option lists are translated now and work fantastic.
I found some additional things that would be great if they could be put into xmls:
- The dropdown menu of the Customizable Domestic Advisor
- The Raw Commerce / Production display on the city screen
Not translation related things:
- Tooltips for the icons to the right of the dropdown menu in the Customizable Domestic Advisor
- Some wider column headers by default in some of the pages of the Customizable Domestic Advisor
As for "." against ",": I don't think it's necessary to change that if it's too complex to implement it. :)
EmperorFool Apr 23, 2008, 12:01 PM - The dropdown menu of the Customizable Domestic Advisor
Hmm, those are stored in the CustomDomAdv.txt file. Cammagno built all the pages, and there's no reason we couldn't create a version for each language. It is a feature request to make it so you can select different lists without mucking about with files, and this is related. However, it seems a shame since the only difference between the files are the page titles. I'll see if I can think of a way to handle it.
Since the user can add their own pages and change the titles of any page, the titles cannot be stored in XML, and thus they cannot use Civ4's built-in language-choosing code. We'd have to do some manual selection, so this is high cost for low gain I'm afraid -- meaning low priority.
A simple way would be to use the screen itself to translate the titles and then save a copy of the CDA.txt file as CustomDomAdv_German.txt. Then we'd install each version and let the user manually swap in the language of their choice. It won't be dynamic, but it would work. It's even possible that Alerum could tweak the installer to ask for the user's language and set up the correct file as default. :)
- The Raw Commerce / Production display on the city screen
- Tooltips for the icons to the right of the dropdown menu in the Customizable Domestic Advisor
Yup, on my list. I'll make sure these are on the feature tracker on SF.net. The first is trivial. I should just bang that out today.
- Some wider column headers by default in some of the pages of the Customizable Domestic Advisor
Is this because the headers don't fit, or the values don't fit? It's true that the default size for some of the columns is based on the data they hold rather than their header.
The Doc Apr 23, 2008, 12:12 PM [...]
A simple way would be to use the screen itself to translate the titles and then save a copy of the CDA.txt file as CustomDomAdv_German.txt. Then we'd install each version and let the user manually swap in the language of their choice. It won't be dynamic, but it would work. It's even possible that Alerum could tweak the installer to ask for the user's language and set up the correct file as default. :)
Sure. That sounds like a doable solution. I'll take a look into the file.
Yup, on my list. I'll make sure these are on the feature tracker on SF.net. The first is trivial. I should just bang that out today.
Cool. Especially the icons are somewhat hard to understand. I didn't really figure out what stands for what. Would be a great relief if the tooltips could be implemented.
Is this because the headers don't fit, or the values don't fit? It's true that the default size for some of the columns is based on the data they hold rather than their header.
Unfortunately, I've seen both cases occur although the width of the advisor isn't fully utilized.
EmperorFool Apr 23, 2008, 01:15 PM I'll take a look into the file.
Despite being a ".txt" file, it's not completely plaintext. You're better off changing the titles in-game. First hit the "edit" button (third, the little scroll to the right of the page title and arrows). Next hit the button one to its right (fourth) to change the title. You can simply hit the next page button (second) to switch pages and repeat. Once you're done, hit the second-to-last button (little monitor) to save the file.
Especially the icons are somewhat hard to understand.
We want tooltips for both the buttons/icons as well as the column headers. I think we may be SOL for the buttons, though. The headers can be done. There's another Domestic Advisor mod that has this.
I've put the Raw Production/Commerce labels into the XML now. I had to shift the display a little to get those damn German ones to fit. :mischief:
The Doc Apr 24, 2008, 04:52 AM Thanks. Some babelfish translations are actually pretty fitting. :D
I thought about the CDA and wondered when the text-file is called or loaded. If that happens not until ingame, maybe it's possible to use some kind of query to determine which language is used and then load the appropriate file (like English is detected -> load standard CustomDomAdv.txt; German is detected -> load CustomDomAdv_german.txt).
Just some crazy thought I had. :D
EmperorFool Apr 24, 2008, 04:54 AM That's exactly what I'll do. One bummer is that there is no master list of languages in Civ4 like you can get the list of all terrain types. Thus I will have to hard-code language 0 as English and 2 as German. No big deal, as I don't expect Firaxis to change the list or order any time soon. :)
The file is loaded when the screen is opened for the first time, btw.
The Doc Apr 24, 2008, 01:44 PM I added some english tooltips for some options at the "Alerts" tab (see pic) because some had just a point in it. Could you take a look at them and tell me if they are proper English? Improvements would be welcome. :)
<Tag>TXT_KEY_BUG_OPT_ALERT_TECHTRADE_HOVER</Tag>
<English>When checked, displays an alert when a civilization is willing to trade technologies.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_GOLDTRADE_HOVER</Tag>
<English>When checked, displays an alert when a civilization can spare a specified amount of gold.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_GOLDTRADETHRESH_HOVER</Tag>
<English>Determines the threshold for the amount of gold that will display an alert.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_GOLDPERTURNTRADE_HOVER</Tag>
<English>When checked, displays an alert when a civilization can spare a specified amount of gold per turn.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_GOLDPERTURNTRADETHRESH_HOVER</Tag>
<English>Determines the threshold for gold per turn that will display an alert.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_OPENBORDERSTRADE_HOVER</Tag>
<English>When checked, displays an alert when a civilization is willing to sign an "Open Borders" agreement.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_DEFENSIVEPACTTRADE_HOVER</Tag>
<English>When checked, displays an alert when a civilization is willing to sign a "Defensive Pact" agreement.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_PERMANENTALLIANCETRADE_HOVER</Tag>
<English>When checked, displays an alert when a civilization is willing to sign a "Permanent Alliance" agreement.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_DOMPOP_HOVER</Tag>
<English>When checked, displays an alert when your population is close to or exceeds the limit for a Domination victory.</English>
<Tag>TXT_KEY_BUG_OPT_ALERT_DOMLAND_HOVER</Tag>
<English>When checked, displays an alert when your land area is close to or exceeds the limit for a Domination victory.</English>
Also I have a little request: Is it possible to add two titles at the "Advisor" tab (see second pic)? Would be great. :D
alerum68 Apr 24, 2008, 03:49 PM The english on that is perfect Doc.;) I'm sure EF and Ruff could add the tabs, but don't want to speak for them. It's still odd seeing the BUG Mod Options in German... God I love it.;)
EmperorFool Apr 24, 2008, 04:06 PM Sweet, we'll have complete hovers! :) Thanks, those look and read perfect.
And good idea on the two labels. That does clear up that column nicely. They are in SVN ("Ratios:" and "Missions:").
The Doc Apr 25, 2008, 04:33 AM Great to be part of the BUG Mod. :king:
I adjusted the width of some of the columns in the CDA so that the headers and values now fit. The changes are small but work well. I attached the file for English and German. :)
Again, I have two little requests. (Sorry. :D )
Could the dropdown-menu in the CDA and the BUG options screen be like 20px wider by default? That would let the translation fit in without horizontal scrolling bars.
I'll just have to translate some missing hints and the second revision of the translation should be ready for the public.
EmperorFool Apr 25, 2008, 07:32 AM Widening the CDA dropdown should be possible (and shifting over all the icons). To which dropdown are you referring in the BUG Options screen? I don't know that it will be possibly because the code doesn't specify the width for any of the controls. They are autosized by Civ4 using the widths of the items they contain.
Thanks for the CDA files. :)
The Doc Apr 25, 2008, 08:46 AM No dropdown, I mean the whole options screen. :D
EmperorFool Apr 25, 2008, 06:28 PM I widened the screen by 200 pixels (now 1000) to make more room. Most of the tabs look a little goofy (left-shifted), but it should give you plenty of room for translations.
If there's interest, I'll make the width dependent on whether or not the user is using an inferior foreign language. ;)
The Doc Apr 26, 2008, 04:21 AM NOOOOOOOOOOOOOOO! (http://www.youtube.com/watch?v=WWaLxFIVX1s)
Your intentions were good but I just wanted some almost unnoticable widening of 20 pixel because of one tab. All other tabs were perfectly fine with the available space. 200 pixel is really way too much, imho.
EmperorFool Apr 26, 2008, 08:33 AM I got 820. Do I hear 840? Going once. Going twice. Sold for 820 to the gentleman in the white coat! :p
Edit: OMG I just clicked on your NOOOOO link. :lol: Nice!
The Doc Apr 26, 2008, 10:46 AM 820 is perfect. Thank you. :)
I think the translation is ready by monday. :D
Falc Apr 26, 2008, 06:58 PM Done all the French translations in the Assets/XML/Text XML files.
Well, all... I'm at line 1400 in BUGOptions. but it's 2 AM now and the rest'll be for tomorrow, I mean later...
No clue how to translate 'capped chevron' and 'boxed capped chevron' though
EDIT: Please note that I don't have a French game to test how it ends up looking...
EmperorFool Apr 26, 2008, 07:24 PM Great, thanks Falc!
You should be able to switch to French using the normal Options screen (Ctrl-O), bottom of the first tab. If not, just email me the file (same username @gmail.com) and I'll check it out (and merge it into SVN).
alerum68 Apr 26, 2008, 09:29 PM (does a little dance) Now all we need is Cam to reappear and do the Italian translations, and for a Spanish speaker to come along, and we are 100% translated.... I don't mind 50% though.;)
Falc Apr 27, 2008, 11:14 AM Roight, all done. Well, a few minor bits that I'm not 100% happy with, but it'll do. Tweaked things so they appear nice on my 1280x1024 screen, dunno how that'll affect other resolutions.
You want them through mail or can I just upload to the SVN?
EmperorFool Apr 27, 2008, 11:49 AM Sweet! Yes, 50% is infinitely more translated than our previous 0%. :D
Please email me the file(s) and I'll put them into SVN when I get home tomorrow. And how do you want to be listed in the credits if different from "Falc"?
Falc Apr 27, 2008, 11:51 AM Just Falc is fine
EmperorFool Apr 29, 2008, 10:36 PM I have committed the German and French translations provided by The Doc and Falc, respectively. Thanks for your help!
The Doc Apr 30, 2008, 08:22 AM Great. :goodjob:
I found a somewhat odd text-fragment in line 52 of MoreCiv4lerts_CIV4GameText.xml. It reads ">>>>>>> .r647". Don't know if it does any harm. :dunno:
I think, I'll try to translate the help file next. :D
alerum68 Apr 30, 2008, 08:40 AM .r647? That's a big RAR archive... :p If you're willing to take on the help file, I have the source html's on the SVN.
EmperorFool Apr 30, 2008, 09:55 AM Oops, I missed a merge-conflict indicator. Fixed.
@Alerum - It seemed there were two sets of source help HTML files. Can they be made into one, or are they different in (not so) subtle ways?
alerum68 Apr 30, 2008, 02:25 PM There is one help file for BUG and one for BAT. The BAT help file contains all the BUG help files, as well as additional ones for BAT. Both are going to have to have some updating prior to the next release. IIRC the source for BAT doesn't have BUG help in it by default, and it has to be merged prior to compiling. The only other things I have up there is the online help file, which is the same thing as the .chm, but formated for online use.
BTW - Just a friendly reminder about having a link in the options screen to pull up the help files automatically.:)
EmperorFool Apr 30, 2008, 02:55 PM I was referring to the "online" versus chm help source files, not BAT, but you mentioned those as well. So the formating is a little different? Cool.
Thanks for the reminder. I added it to the Features tracker so I won't forget.
Cammagno May 01, 2008, 04:47 PM Unfortunately, I've seen both cases occur although the width of the advisor isn't fully utilized.
Hi! I'm the one who made CDA pages :)
With my screen resolution (1280x1024), and with Italian version (even if now that we have changed almost all the text with icons, the language is no more so important), it doesn't happen at all, because all the column widths has been optimized for it :mischief:
But the good thing of CDA is the starting "C"... it is customizable, so you can increase or decrease the width of each column in each page to fit your desires. :goodjob:
Edit:
I see that you followed my advise before I gave it to you: amazing! :DD
Cammagno May 01, 2008, 04:53 PM That's exactly what I'll do. One bummer is that there is no master list of languages in Civ4 like you can get the list of all terrain types. Thus I will have to hard-code language 0 as English and 2 as German. No big deal, as I don't expect Firaxis to change the list or order any time soon. :)
The file is loaded when the screen is opened for the first time, btw.
But the language can't be read directly from the CivilizationIV.ini, where it is alrerady linked to a number? I fear this is a stupid question... :blush:
Cammagno May 01, 2008, 05:00 PM I got 820. Do I hear 840? Going once. Going twice. Sold for 820 to the gentleman in the white coat! :p
Edit: OMG I just clicked on your NOOOOO link. :lol: Nice!
Can i have some more? ;P
That 840 will be ok... or maybe 10 more... ;P
Ok, I managed to find words even for the 820, but if later (not a priority) you can give me 850, I'll be able to use better words :)
It is more important to get rid of that ugly vertical scrolling bar of which I speak in the bug list on SF... that is really stupid :D
Cammagno May 01, 2008, 05:01 PM (does a little dance) Now all we need is Cam to reappear and do the Italian translations, and for a Spanish speaker to come along, and we are 100% translated.... I don't mind 50% though.;)
I did my part... 75% now :cool:
EmperorFool May 01, 2008, 08:11 PM But the language can't be read directly from the CivilizationIV.ini, where it is alrerady linked to a number?
The language is exposed in Python using
CyGame().getCurrentLanguage()
This returns an int. Geez, I looked for the code that sets which item is selected in the language dropdown on the options screen, but did I bother to look for the code that puts those options into the dropdown in the first place? My oh my, somebody shoot me. :blush:
for i in range(CvGameText().getNumLanguages()):
szKey = "TXT_KEY_LANGUAGE_%d" % i
aszDropdownElements = aszDropdownElements + (localText.getText(szKey, ()),)
Looks like they are stored in the XML files. So I can just stuff the text into "CustomDomAdv_XXX.txt". That means the language name will be in the language itself. That might be a problem (international characters in filenames).
Instead, I'll just create tags in our own XML file using the ISO language codes: EN, FR, DE, IT, SP. Easy-peasy. That way I'll just let Civ4 translate the filename, in a sense, using the user's chosen language. Muy bien!
alerum68 May 01, 2008, 09:08 PM EF I gotta know... when did you start hacking BBSes?:p You think to much like a hacker to have learned legitly.:p So Elite d00d.:p
Sorry, don't know where that came from. Since the language is pulled from python, why couldn't we include "TXT_KEY_LANGUAGE_Russian?:p
EmperorFool May 01, 2008, 09:45 PM Actually, I ran my own BBS back in '86/'87. I started coding in '82 on an Apple //e. Ahhh, those were the days. Learning assembly language out of a book . . .
Back then, coding on the Motorola 6502 (http://www.obelisk.demon.co.uk/6502/instructions.html) microprocessor was a dream. Really, it was like a truly awful bad dream where monsters were chasing you, and you weren't wearing any pants.
DAMAGE_PER_HIT:
0x0A ; 10 points per hit
HEALTH:
0x64 ; start with 100 health
GOT_HIT:
...
PHA ; # of hits
JSR DO_DAMAGE
PLA ; clear parameter
...
DO_DAMAGE:
PLA ; ooh, parameter passing
BEQ DONE ; no hits
TAX
LDA HEALTH
CALC_DAMAGE:
SEC
SBC DAMAGE_PER_HIT ; that's right, no multiply operation!
BEQ DIED ; died if == 0
BCC DIED ; or < 0
DEX ; loop
BNE CALC_DAMAGE
STA HEALTH
DONE:
RTS
DIED:
...
Ya baby! Code was so legible back then, not like this crap we have in today's languages built for pansies! :lol:
health -= numHits * DAMAGE_PER_HIT
if health <= 0:
print "You died"
Weee! That was fun. :)
To answer your question, Alerum, I'll simply ask the game to give me the translation for the key TXT_KEY_CDA_FILENAME, and use the result as the name of the file. The thing is, I cannot get the English word "French" when the user has French selected as their language. Instead, I'll get Français, and I don't know how Python or Windows or SVN will like having a file name with a cedilla in it. I'd rather it just be "FR" and know it will work.
Edit: BTW, for the curious, here's the direct equivalent Python code to the assembly above. Note that you would never code like this in Python.
DAMAGE_PER_HIT = 10
actualHealth = 100
...
doDamage(numHits)
...
def doDamage(numHits):
if numHits != 0:
health = actualHealth
while numHits != 0:
health -= DAMAGE_PER_HIT
if health == 0:
died()
if health < 0:
died()
numHits -= 1
actualHealth = health
alerum68 May 01, 2008, 09:59 PM I ran my BBS (First on Wildcat! then on WWIV) in 92-95.;) And yes, coding back them seemed easier to me then now. Maybe it was because I used basic.:p Nothing wrong with GOTO or IF IMNSHO.:p Hex Values... wow, I haven't seen those in years.:p I used to hack games using a program called Game Wizard that would allow you to edit hex values in memory, then save them to a save game file.:) Nothing like having a level 12 Human Knight become a Level 32767 Elf Wizard. I started in 84 on a Comm64, then went to a PC in 88.... I was only 10 at the time though, so it was a bit of a learning curve for me... "load *.*, 8, 1" was a bit of a change from DOS 3.2... what the hell is a directory?!?! The first language I played around with was probably .bat files, that went to basic, and a bit of C++... then I stopped playing around with code, and was hooked on The Sierra Network. Wish I would have played aorund with coding a bit more... I'd rather have your job then mine.:p
Windows and SVN will handle the unsual character set. (I have file names in arabic on my Vista machine, without a hitch) but no idea on Python. SVN will handle anything you throw at it basically.
EmperorFool May 02, 2008, 01:48 AM My friend had a C64 -- cool machine. :) Such fond memories of that time...
Granted that SVN should handle the crazy characters, it's easier to use ISO codes, and they are a standard. I'll start with that and we'll go from there. We could use English names or the actual foreign names.
Python can do Unicode, but it also does ASCII, and I'm not familiar with the rules yet. Some of the foreign characters in the XMLs I pasted in from Babelfish whereas Firaxis entered them all using the &#xxx; XML entity. Both work in Civ4, but that's in the file. I don't know what Python will do with a filename.
ruff_hi May 02, 2008, 06:05 AM :gripe: will you guys please speak in english!!!
alerum68 May 02, 2008, 08:24 AM la, ya ma3feen. bass yala!!!
Next time I won't be so nice to transliterate it.:p
When did you start playing around with PCs Ruff? Are you an old-schooler nerd type, or did you jump on board post-96?
ruff_hi May 02, 2008, 03:11 PM ahh leet - what a stupid invention. Anyway ... PCs and me ... ages ago. My first exposure to a program language was my older brother showing me a bit of code he was working on ...
x = x + 1
... and I, with my strong maths background, couldn't make sense of it ... I was approaching it from an algebra point of view. That is funny in hindsight.
EmperorFool May 02, 2008, 03:51 PM Hmm, I didn't really think about it at the time, but I actually learned to program BASIC before I took Algebra. That probably helped a lot in my case. Math was always pretty easy, even before coding. But I remember people having a much harder time dealing with variables than I did. Now I know why -- I already knew about them.
But ya, "x = x + 1? No it doesn't! That's impossible." :) Reminds me of those math "tricks" that allow you to prove that 1 = 2 and such.
The Doc May 03, 2008, 06:03 AM Few things that I miss:
- Scoreboard: Added "Worst Enemy" Indicator -> the additional "H" is missing in the tooltip
- "Tag as Dead" option for dead civs -> Can this "Dead" tag be put into the xmls or is it hard coded?
Anyway, it's great to see how BUG progresses. Maybe it will be the first mod that supports all five languages that shipped with Civ4. :D
Cammagno May 03, 2008, 09:43 AM Few things that I miss:
- Scoreboard: Added "Worst Enemy" Indicator -> the additional "H" is missing in the tooltip
You can add it for German, I already did for Italian :)
- "Tag as Dead" option for dead civs -> Can this "Dead" tag be put into the xmls or is it hard coded?
I support you, I also wish to translate it :blush:
Anyway, it's great to see how BUG progresses. Maybe it will be the first mod that supports all five languages that shipped with Civ4. :D
:cool: :cool: :cool:
EmperorFool May 03, 2008, 12:46 PM "Tag as Dead" option for dead civs -> Can this "Dead" tag be put into the xmls or is it hard coded?
Done. :) Please check Babelfish's translations:
Mort
Tot (seriously? Tot?? I've never heard this in any movie with Germans)
Guasto (again, never heard this)
Muerto
The Doc May 03, 2008, 01:14 PM You watch german movies? Or just movies with Germans who speak English? (some bad WW2 flicks, probably? :lol: )
EmperorFool May 03, 2008, 01:27 PM Or just movies with Germans who speak English? (some bad WW2 flicks, probably? :lol: )
Exactly. I edited out the comment I originally wrote about how U.S. movies with Germans are almost entirely about Nazis. In any case, I know a few words like schnell, bitte, etc.
The exception to all this is that I watched the awesome movie Lola Rennt (a.k.a. Run Lola Run) in German more than a few times. In fact, I tried to watch it in English once and switched it back to German in the first five minutes. :)
Ich warte . . . Ich warte . . . Ich warte
alerum68 May 03, 2008, 01:29 PM I actually can pronounce german fairly well, but no idea what it means... result of listening to to much Rammstein.... and EF, you know its a sin to watch a foreign movie dubbed don't you? I learned that watching this bad Zombie movie that was dubbed about 20 years ago.:p
The Doc May 03, 2008, 01:33 PM Hey, that's great. :D Usually, it's the other way round, i.e. Germans watching US-movies in English, because they hate the dubbing.
EmperorFool May 03, 2008, 01:35 PM I firmly believe that every time you watch a dubbed movie, God kills a kitten. :mischief:
alerum68 May 03, 2008, 01:43 PM I watch alot of foreign movies... mainly arabic... though I don't need the subtitles as much anymore. There is this one Italian movie I remember because I was taking... Larry Steven David... and it messed with me so hard... think it was called Leo Lazoli... about a kid who thought his father was a tomato that fell off a truck and went into his mom.:p Anyway, don't worry Doc... not every American watches just American Idol.:p
The Doc May 03, 2008, 01:53 PM You know what American Idol is called in Germany? "Deutschland sucht den Superstar" or DSDS. It's the fifth or sixth season and I really hate it from the bottom of my heart. :D
alerum68 May 03, 2008, 02:26 PM It's invaded Deutschland too?!?! Dear God help us!
Cammagno May 03, 2008, 04:06 PM Done. :) Please check Babelfish's translations:
Guasto (again, never heard this)
"Guasto" means something like "broken".
The Italian translation of "Dead", if referred to a man, is "Morto".
But in this case, being referred to a Civ, I have used a more evocative term, "Scomparso".
End of the second lesson of Italian (the first one was about "Ciao") :D
EmperorFool May 03, 2008, 04:40 PM What would scomparso translate to in English, something like extinct?
End of the second lesson of Italian (the first one was about "Ciao") :D
Hey, I missed that lesson! :(
ruff_hi May 03, 2008, 07:05 PM I was watching a Swedish moving with sub-titles and, in the middle of the movie, they held a party were people from England came over - the actors all spoke English during the party and I thought that I had developed the ability to understand Swedish - very funny.
alerum68 May 03, 2008, 08:43 PM what were YOU on when you were watching that Ruff?:p How "buggy" is MA Ruff? I mean will it cause crashes, or just didn't work quiet the way you'd want it too? I'm willing to put it out as is now, as long as it doesn't have any CTDs or lock-ups.
ruff_hi May 03, 2008, 11:01 PM no known CTD or lock-ups ... just a bit of rough, slightly mis-leading information.
alerum68 May 03, 2008, 11:14 PM I'm okay with that. Will just make sure to put that it's in alpha testing.;)
|
|