This looks pretty straight forward from looking at the code. I cannot see why it is displaying it 3 (or more) times. I'll fire up my Civ4, swap to German and see what I get. The 'gender / plural' stuff my be mucking me up.
There is a new version of the Full of Resources map script: click
This looks pretty straight forward from looking at the code. I cannot see why it is displaying it 3 (or more) times. I'll fire up my Civ4, swap to German and see what I get. The 'gender / plural' stuff my be mucking me up.
Edit: just fired up Civ4 with BUG loaded and it was looking 100% fine in English, French and German. Can you take another look? If it is still broken, search for the 'TXT_KEY_PROJECT_APOLLO_PROGRAM' key in your xml - that is where it is pulling the info from. For me, it is in the 'CIV4GameTextInfos_Objects.xml' file under vanilla Civ4 (C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\XML\Text).
<German><Text>Apollo-Programm:Apollo-Programmes:Apollo-Programm:Apollo-Programm</Text><Gender>neuter:neuter:neuter:neuter</Gender><Plural>0:0:0:0</Plural></German>
<TEXT>
<Tag>TXT_KEY_PROJECT_APOLLO_PROGRAM</Tag>
<English>Apollo Program</English>
<French>
<Text>Programme Apollo</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</French>
<German>
<Text>Apollo-Programm</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Programma Apollo</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</Italian>
<Spanish>
<Text>el Programa Apollo</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</Spanish>
</TEXT>
just seen, there are now two victoryscreen files, is there a need for both?
thanks.... svn has not deleted it. there was no file and after the update there were those two files. thanks anyway.
popup.addButton(BugUtil.getPlainText("TXT_KEY_MAIN_MENU_OK"))
popup.addButton(BugUtil.getPlainText("TXT_KEY_SCREEN_CANCEL"))
localText.getText("TXT_KEY_PROJECT_APOLLO_PROGRAM", ()) [line 878 and 887]
localText.getText[B]Key[/B]("TXT_KEY_PROJECT_APOLLO_PROGRAM", ()).
pWinner is a pointer at a particular unit. The .sUnitName is not an actual pointer - it is a dumbed down version. This is because the event driving these two items returns different parameters - totally stupid, but there you go.Instead of using pWinner.getName() ...
TXT_KEY_AUTOLOG_WHILE_ATTACKING_DECIMATES (line 527) are using different commands (.sUnitName)...
<German><Text>Apollo-Programm:Apollo-Programmes:Apollo-Programm:Apollo-Programm</Text><Gender>neuter:neuter:neuter:neuter</Gender><Plural>0:0:0:0</Plural></German>
@Cam:
I found the solution for the German grammar not showing up correctly in the Autolog messages. Instead of using pWinner.getName() and pLoser.getName() you have to use pWinner.getNameKey() and pLoser.getNameKey() (lines 467, 471, 478, 482 in autologEventManager.py). I'm so glad that I finally found the problem.![]()
However, this works only for four of six battle messages as TXT_KEY_AUTOLOG_WHILE_ATTACKING_ESCAPES (line 523 in autologEventManager.py) and TXT_KEY_AUTOLOG_WHILE_ATTACKING_DECIMATES (line 527) are using different commands (.sUnitName). It is possible to replace those with a command that recognizes the <Gender>- and <Plural>-tags?
Another thing is the Ok and Cancel buttons for the log entries of players (lines 113/114 and 131/132 in autologEventManager.py). They are not translatable yet, but I played around with it and came up with this solution:
The TXT_KEYs refer to the basic Civ4-XMLs so no need to translate 'em and they definitely work. Are you Ok with it?Code:popup.addButton(BugUtil.getPlainText("TXT_KEY_MAIN_MENU_OK")) popup.addButton(BugUtil.getPlainText("TXT_KEY_SCREEN_CANCEL"))
![]()
If they works even with other languages (as I suppose) fell free to change them
No idea, this is a question for our coders
So OK that I have already thought to do something like this while on bus, and then forgot to do it laterSo I'm very happy that you did
![]()
I think the problem you're having using getTextKey() on the Victory screen is that you're using it on the CyTranslator (localText) object which doesn't have that function. It's only available on CvInfo objects (like CvUnitClassInfo and CvBuildingInfo).
So, is there a way to solve this and the issue with the two Autolog messages that utilize the sUnitName command (see above)?![]()
The one I quoted.What's the first one you mention?
The two sUnitName ones can't be fixed. The DLL only reports the units' names in the CombatLogHit event along with all the modifiers and hit points. It passes along the units' owners, but not their IDs.
What about wrapping the function up into a variable and use that one with 'getNameKey'? Don't hit me if this is total BS.![]()