2019-02-20 03:44 EST

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0002920FSSCPPilot datapublic2014-06-14 05:41
Assigned Toniffiwan 
Product Version3.7.1 
Target Version3.7.2Fixed in Version 
Summary0002920: Pilot file code can't handle localization for intel entries
DescriptionI made the same error when coding up tech-add-intel, but the problem created for pilot files is much more complicated.

The problem is that intel entry names are translatable strings, whereas normally names that serve as lookup keys aren't. This is because if you translate the key, obviously it's not going to be good anymore as a lookup entry.

Since the intel names are always going to be translated, the solution is to also translate the lookup keys so that what you look up is the same as what is in the table. The preloader for tech-add-intel-xstr does this. The pilot file code should handle this the same way.

...Actually, the pilot code may already do this. All it does is save keys that are visible in the tech db, right? So that means it saves translated keys. As long as the pilot doesn't switch languages, it may not be a problem.

What about adding in a safeguard to prevent the pilot from switching languages? :)
TagsNo tags attached.
Attached Files

related to 0002919resolvedGoober5000 Tech-add-intel can't handle localization for intel entries 



niffiwan (developer)

I'm thinking of:

a) storing the pilots language in the .plr
b) when leaving the start screen or the barracks; generate an error if the pilots language doesn't match the current FSO language, and don't let the player proceed

Changing the techroom intel entries to work like ships (i.e. change the lookup keys to an array/vector index) would probably be a fair bit of work. I may have a look just to see how much work anyway.


niffiwan (developer)

This seems to do the job in my testing. A pilot created with the language set to German can no longer be selected in the initial selection screen. Nor will the barracks allow this pilot to be selected when exiting the barracks.

Review and comments welcome!



Echelon9 (developer)

Have commented (to the extent I can) on the Github issue.


niffiwan (developer)

Thanks to Echelon9, MageKing17 & Zacam for their reviews. Added commend explaining the reason for the PLR version bump.


niffiwan (developer)

Fix committed to trunk@10817.

+Related Changesets

-Issue History
Date Modified Username Field Change
2013-09-19 02:41 Goober5000 New Issue
2013-09-19 02:41 Goober5000 Status new => assigned
2013-09-19 02:41 Goober5000 Assigned To => niffiwan
2013-09-19 02:41 Goober5000 Relationship added related to 0002919
2013-09-26 21:57 niffiwan Note Added: 0015294
2014-05-15 04:38 niffiwan Note Added: 0015748
2014-05-15 04:38 niffiwan Status assigned => code review
2014-06-14 03:36 Echelon9 Note Added: 0015864
2014-06-14 05:41 niffiwan Note Added: 0015867
2014-06-14 05:41 niffiwan Changeset attached => fs2open trunk r10817
2014-06-14 05:41 niffiwan Note Added: 0015868
2014-06-14 05:41 niffiwan Status code review => resolved
2014-06-14 05:41 niffiwan Resolution open => fixed
+Issue History