Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2485 closed defect (fixed)

javascript sprintf error since translation update

Reported by: mimo Owned by: sanderd17
Priority: Nice to Have Milestone: Alpha 16
Component: UI & Simulation Keywords:
Cc: Patch:

Description

When changing perspective to an AI player, I've quite often the error ERROR: JavaScript error: uncaught exception: [sprintf] property "name" does not exist

this message happens only after changing perspective and taking an AI player. The string involved is due to BuildRestriction.js, for example markForTranslation("%(name)s cannot be built on another building or resource") when the AI tries several positions to place its building. Putting some printouts in BuildRestriction.js, the variable name is well defined.

To reproduce it easily, it is best to take a map with limited room to build, for example the cyclades skirmish map.

Change History (2)

comment:1 by sanderd17, 10 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 15090:

Fix problem with sprintf errors being thrown when the AI places structures on the wrong places, make the code more uniform. Fixes #2485

comment:2 by sanderd17, 10 years ago

Milestone: BacklogAlpha 16
Note: See TracTickets for help on using tickets.