Bug Reporting

I'm going to look another time to the tech screen :)
Edit: Now it works. I missed one entry.
But, would this be possible to have the icons in a scrollbox?
Maybe - check how they made the big tech panel scrollable and see if you can duplicate that for the individual tech panels.

I also noted that the icon at the top of the list of GPs is the Great Library. I thought I had put that in as the lightbulb icon - did someone change it?
 
But, would this be possible to have the icons in a scrollbox?

We could use a Multilistbox like used in the IconGrid, but that would require two rows of icons and a vertical scrollbar, requiring even more space than is needed now.
 
It is possible to add a very thin scroll bar - maybe a horizontal bar?
 
In F9 (Info Screen) there is a problem with gender related texts:

attachment.php
and
attachment.php
I see "Power" and "Culture" in the English version and the single translation in the German version here. Have you changed the XML to pick up the gender? What is the proper python code to extract the required gender version from XML?
 
last SVN version: no interface

Spoiler :
Code:
Traceback (most recent call last):
  File "BugConfig", line 356, in parse
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 171, in feed
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 287, in goahead
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 697, in parse_endtag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 730, in finish_endtag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 751, in handle_endtag
  File "BugConfig", line 424, in end_options
  File "BugOptions", line 254, in read
  File "BugOptions", line 268, in create
  File "BugOptions", line 642, in resetValue
  File "BugOptions", line 632, in setValue
  File "BugOptions", line 713, in onChanged
  File "BugOptions", line 741, in doDirties
  File "BugOptions", line 753, in callDirtyFunctions
  File "BugUtil", line 418, in __call__
  File "BugUtil", line 415, in call
  File "BugUpdateChecker", line 21, in onCheckForUpdatesChanged
  File "BugUpdateChecker", line 33, in scheduleSvnCheck
  File "BugUpdateChecker", line 45, in checkForSvnUpdates
  File "BugUpdateChecker", line 53, in getLocalVersion
  File "SvnUtil", line 110, in getLocalRevision
BugError: failed to read SVN entries file
Traceback (most recent call last):
  File "BugConfig", line 356, in parse
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 171, in feed
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 280, in goahead
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 666, in parse_starttag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 703, in finish_starttag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 747, in handle_starttag
  File "BugConfig", line 395, in start_load
  File "BugConfig", line 107, in loadMod
  File "BugInit", line 56, in loadMod
  File "BugConfig", line 356, in parse
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 171, in feed
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 287, in goahead
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 697, in parse_endtag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 730, in finish_endtag
  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 751, in handle_endtag
  File "BugConfig", line 424, in end_options
  File "BugOptions", line 254, in read
  File "BugOptions", line 268, in create
  File "BugOptions", line 642, in resetValue
  File "BugOptions", line 632, in setValue
  File "BugOptions", line 713, in onChanged
  File "BugOptions", line 741, in doDirties
  File "BugOptions", line 753, in callDirtyFunctions
  File "BugUtil", line 418, in __call__
  File "BugUtil", line 415, in call
  File "BugUpdateChecker", line 21, in onCheckForUpdatesChanged
  File "BugUpdateChecker", line 33, in scheduleSvnCheck
  File "BugUpdateChecker", line 45, in checkForSvnUpdates
  File "BugUpdateChecker", line 53, in getLocalVersion
  File "SvnUtil", line 110, in getLocalRevision
BugError: failed to read SVN entries file
Traceback (most recent call last):

  File "CvAppInterface", line 65, in onLoad

  File "CvEventInterface", line 30, in onEvent

  File "BugEventManager", line 250, in handleEvent

  File "BugEventManager", line 295, in _handleInitBugEvent

  File "BugEventManager", line 337, in initBug

  File "BugInit", line 39, in init

  File "BugInit", line 56, in loadMod

  File "BugConfig", line 356, in parse

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 171, in feed

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 280, in goahead

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 666, in parse_starttag

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 703, in finish_starttag

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 747, in handle_starttag

  File "BugConfig", line 395, in start_load

  File "BugConfig", line 107, in loadMod

  File "BugInit", line 56, in loadMod

  File "BugConfig", line 356, in parse

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 171, in feed

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 287, in goahead

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 697, in parse_endtag

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 730, in finish_endtag

  File "e:/main/civilization4/warlords/assets/python/system\xmllib.py", line 751, in handle_endtag

  File "BugConfig", line 424, in end_options

  File "BugOptions", line 254, in read

  File "BugOptions", line 268, in create

  File "BugOptions", line 642, in resetValue

  File "BugOptions", line 632, in setValue

  File "BugOptions", line 713, in onChanged

  File "BugOptions", line 741, in doDirties

  File "BugOptions", line 753, in callDirtyFunctions

  File "BugUtil", line 418, in __call__

  File "BugUtil", line 415, in call

  File "BugUpdateChecker", line 21, in onCheckForUpdatesChanged

  File "BugUpdateChecker", line 33, in scheduleSvnCheck

  File "BugUpdateChecker", line 45, in checkForSvnUpdates

  File "BugUpdateChecker", line 53, in getLocalVersion

  File "SvnUtil", line 110, in getLocalRevision

BugError: failed to read SVN entries file
ERR: Python function onLoad failed, module CvAppInterface
Traceback (most recent call last):

  File "CvAppInterface", line 88, in preGameStart

  File "CvScreensInterface", line 73, in showMainInterface

  File "CvMainInterface", line 2413, in interfaceScreen

  File "CvMainInterface", line 739, in getMaxRow

ZeroDivisionError: integer division or modulo by zero
ERR: Python function preGameStart failed, module CvAppInterface
 
Oops, I left SVN checking turned on. I have committed a config XML that turns it off by default. I will also work on a solution that will ignore errors that happen while initializing options. Hopefully that will stop things like this in the future.
 
[...]

And two jobs for TheDoc ;)
"Location" isn't translated.
attachment.php


And some signs are missing/are shown wrong in the traits' pedia.
attachment.php

[...]

The translation is there. Maybe it isn't utilized. :dunno:

That's a translation from a user at the German Civ forums. The quotation marks that he used aren't supported by Civ's text engine.

I see "Power" and "Culture" in the English version and the single translation in the German version here. Have you changed the XML to pick up the gender? What is the proper python code to extract the required gender version from XML?

See here: click
btw: It happens when you click on the culture label.
 
btw: It happens when you click on the culture label.
Ahh - I missed that. Those two culture text items are actually different variables - one is obviously yellow. I'll take a look at that code and see what I can do.
 
Ahh - I missed that. Those two culture text items are actually different variables - one is obviously yellow. I'll take a look at that code and see what I can do.

I guess, you are using BugUtil for that color change? Is it possible to add a "colorTextKey" and a "getTextKey" function to it (in addition to "colorText" and "getText" which are already present there)? That way the problems with gender and plural tags could be solved once and for all. :dunno:
 
I guess, you are using BugUtil for that color change? Is it possible to add a "colorTextKey" and a "getTextKey" function to it (in addition to "colorText" and "getText" which are already present there)? That way the problems with gender and plural tags could be solved once and for all. :dunno:
Nope. This is the code I am using:

Code:
sTemp1[0] = localText.getText("TXT_KEY_GAME_SCORE", ())
sTemp2[0] = localText.getColorText("TXT_KEY_GAME_SCORE", (), gc.getInfoTypeForString("COLOR_YELLOW"))

What should I be using? put 'Key' after 'Text' and before the '('?
 
Nope. This is the code I am using:

Code:
sTemp1[0] = localText.getText("TXT_KEY_GAME_SCORE", ())
sTemp2[0] = localText.getColorText("TXT_KEY_GAME_SCORE", (), gc.getInfoTypeForString("COLOR_YELLOW"))

What should I be using? put 'Key' after 'Text' and before the '('?

Yeah, but unfortunately you can't use getTextKey with localText (aka CyTranslator).

Edit: Use TXT_KEY_CONCEPT_CULTURE instead of TXT_KEY_COMMERCE_CULTURE that should solve the problem mentioned by Caesium. The first tag is plain text while the other one has gender tags for whatever reason.
 
Again, the problem is that straight-up "phrases" in <TEXT> tags don't have a gender. Can you please point to the file and line of code that is the problem?
 
Again, the problem is that straight-up "phrases" in <TEXT> tags don't have a gender. Can you please point to the file and line of code that is the problem?

Which file? Up until now only the Apollo Program at the victory screen is making problems (line 913 and 922). It can be outputted with BugUtil.getText as well as with localText.getText but they both don't get the gender right. That's why I asked if a getTextKey function could be added to BugUtil because we can edit it unlike CyTranslator.
 
I guess, you are using BugUtil for that color change?
Does BugUtil have a color change function? Does someone have an example that I can clone? That will solve the yellow culture issue.
 
That's why I asked if a getTextKey function could be added to BugUtil because we can edit it unlike CyTranslator.

But what should it do? BugUtil.getText() simply calls CyTranslator.getText(). Since CyTranslator doesn't have getTextKey(), I need to know what it should do.

BTW, here is the original German translation for the AP:

Code:
<Text>
	<Tag>TXT_KEY_PROJECT_APOLLO_PROGRAM</Tag>
	<German>
		<Text>Apollo-Programm</Text>
		<Gender>Male</Gender>
		<Plural>0</Plural>
	</German>
</Text>

I think the only way to access the extra information your community translation has is through an object such as a CvProjectInfo. The Project's name references the above Tag, but the VIctory screen uses the Tag directly.

If I had a working example to go from, I could possibly figure this out.

Does BugUtil have a color change function? Does someone have an example that I can clone? That will solve the yellow culture issue.

Yes:

Code:
szText = BugUtil.colorText("bob", "COLOR_YELLOW")

It doesn't look up the text in XML, so use BugUtil.getText() if necessary:

[code]
szText = BugUtil.colorText(BugUtil.getPlainText("TXT_KEY...", "COLOR_YELLOW")
[/code]

You can pass in a string or integer for the color.
 
But what should it do? BugUtil.getText() simply calls CyTranslator.getText(). Since CyTranslator doesn't have getTextKey(), I need to know what it should do.

BTW, here is the original German translation for the AP:

Code:
<Text>
	<Tag>TXT_KEY_PROJECT_APOLLO_PROGRAM</Tag>
	<German>
		<Text>Apollo-Programm</Text>
		<Gender>Male</Gender>
		<Plural>0</Plural>
	</German>
</Text>

I think the only way to access the extra information your community translation has is through an object such as a CvProjectInfo. The Project's name references the above Tag, but the VIctory screen uses the Tag directly.

If I had a working example to go from, I could possibly figure this out.
[...]

I would be glad to help but I'm not sure what example you need. The Python code, the code for the exposed functions from the SDK or something different? :dunno:
 
See my edit above. That's a simpler solution. :D

Edit: Use TXT_KEY_CONCEPT_CULTURE instead of TXT_KEY_COMMERCE_CULTURE that should solve the problem mentioned by Caesium. The first tag is plain text while the other one has gender tags for whatever reason.

Sure - but only in that limited situation. I would like a solution that is more general.

Code:
szText = BugUtil.colorText("bob", "COLOR_YELLOW")

Thanks for that. I have to grab the normal version from XML and then I'll just use this statement for the yellow version.
 
I would be glad to help but I'm not sure what example you need. The Python code, the code for the exposed functions from the SDK or something different? :dunno:

Python code would be great.
 
Python code would be great.

I think now, I understand better what you meant above when saying: "The Project's name references the above Tag, but the VIctory screen uses the Tag directly."
That means, to use getTextKey we have to create a different tag that holds a variable which then calls the actual project. Is that right?
Here is an example from CvVictoryScreen.py (line 629):
Code:
screen.setTableText(szTable, 0, iRow, localText.getText("TXT_KEY_VICTORY_SCREEN_BUILDING", (szNumber, gc.getProjectInfo(i).getTextKey())), "", WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_LEFT_JUSTIFY)
I'll take a look at the XMLs if we can safely use the old Apollo tag. That would be way easier. :D
 
Back
Top Bottom