Source Code Project Mantis - FSSCP
View Issue Details
0003192FSSCPlocalizationpublic2017-03-05 03:512017-06-24 20:13
ReporterNovachen 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version3.7.4 
Target VersionFixed in Version 
Summary0003192: Freespace look always for the translated strings in the missions, not for the initial default one.
DescriptionIf you translate ranks, medals, weapons and/or shipclass names with the help of XSTR-entries in other languages, you have to use the translated names in the missionfile itself to get them to work, because Freespace2 report errors otherwise, that it can not find a specific weapon/ship/medal/rank during the loading of a mission.
Steps To ReproduceAdd a XSTR to any medalname in the medals.tbl to transfer it to a tstrings.tbl, where you set unique names for this medal for any other language.

Now create a mission with a grant-medal SEXP and load this mission in different languages.
Additional InformationIn the attachment i include a screenshot of fred2, where you can see the available medals. And the error message that it spawns in the game, if i use a language where this medal have another name.

In this case the name is "Dekoriertes Fliegerkreuz" that have to set in the grant-medal SEXP.
TagsNo tags attached.
related to 0002919resolved Goober5000 Tech-add-intel can't handle localization for intel entries 
Attached Files7z Name Error.7z (113,788) 2017-03-05 03:51
http://scp.indiegames.us/mantis/file_download.php?file_id=2716&type=bug
7z MedalTest.7z (6,360) 2017-03-05 07:57
http://scp.indiegames.us/mantis/file_download.php?file_id=2717&type=bug
7z MedalTest-2.7z (6,568) 2017-03-05 08:18
http://scp.indiegames.us/mantis/file_download.php?file_id=2718&type=bug
7z MedalTest-3.7z (6,578) 2017-03-05 08:23
http://scp.indiegames.us/mantis/file_download.php?file_id=2719&type=bug

Notes
(0016875)
m_m   
2017-03-05 06:50   
Could you create a test mod which reproduces this error based on your reproduction steps? It would make reproducing and fixing this issue much easier.
(0016877)
Novachen   
2017-03-05 07:57   
Yes of course.

Here is a mod you can extract in the freespace folder. select "MedalTest" in Mods and select the campaign with one mission that gets you "Wings" after you jump out.

The german font01.vf for language change is included and activated by default.
(0016880)
Novachen   
2017-03-05 08:19   
There was a faulty medaltest-tlc.tbm.
Missed the #end :/

Sorry about that.
(0016881)
m_m   
2017-03-05 08:40   
Ok, I can reproduce this issue although it causes an error at mission load instead of failing to grant the medal for me.

However, this issue can not be fixed very easily since SEXPs can't use the translated names of anything since they are simply not designed for that. I opened a discussion thread on our GitHub repository so hopefully someone else has an idea how this could be handled: https://github.com/scp-fs2open/fs2open.github.com/issues/1285
(0016901)
Goober5000   
2017-06-24 20:13   
This sounds like the same problem I encountered in Mantis 0002919. The tech-add-intel sexp didn't work with translated intel entry names, so the solution was to add tech-add-intel-xstr.

The same will have to be done for grant-medal, and indeed any sexp where the lookup key is a translated token.

Issue History
2017-03-05 03:51NovachenNew Issue
2017-03-05 03:51NovachenFile Added: Name Error.7z
2017-03-05 06:50m_mNote Added: 0016875
2017-03-05 07:57NovachenFile Added: MedalTest.7z
2017-03-05 07:57NovachenNote Added: 0016877
2017-03-05 08:18NovachenFile Added: MedalTest-2.7z
2017-03-05 08:19NovachenNote Added: 0016880
2017-03-05 08:23NovachenFile Added: MedalTest-3.7z
2017-03-05 08:40m_mStatusnew => confirmed
2017-03-05 08:40m_mNote Added: 0016881
2017-06-24 20:12Goober5000Relationship addedrelated to 0002919
2017-06-24 20:13Goober5000Note Added: 0016901