85 static QString missionTransFile =
"$ISISROOT/appdata/translations/MissionName2DataDir.trn";
87 missionXlater.SetLabel(label);
88 QString mission = missionXlater.Translate(
"MissionName");
91 static QString instTransFile =
"$ISISROOT/appdata/translations/Instruments.trn";
93 instrumentXlater.SetLabel(label);
94 QString instrument = instrumentXlater.Translate(
"InstrumentName");
101 static std::map<QString, std::pair<PvlToPvlTranslationManager, PvlKeyword> > missionTranslators;
102 QString key = mission +
"_" + instrument;
103 std::map<QString, std::pair<PvlToPvlTranslationManager, PvlKeyword> >::iterator
104 translationIterator = missionTranslators.find(key);
106 if(translationIterator == missionTranslators.end()) {
108 FileName snFile((QString)
"$ISISROOT/appdata/translations/" + mission +
109 instrument +
"SerialNumber.trn");
112 Pvl translation(snFile.expanded());
114 if(translation.hasKeyword(
"ObservationKeys")) {
115 observationKeys = translation[
"ObservationKeys"];
119 missionTranslators.insert(
120 std::pair<QString, std::pair<PvlToPvlTranslationManager, PvlKeyword> >
124 translationIterator = missionTranslators.find(key);
127 translationIterator->second.first.SetLabel(label);
128 translationIterator->second.first.Auto(outLabel);
129 PvlGroup snGroup = outLabel.findGroup(
"SerialNumberKeywords");
132 if(!translationIterator->second.second.name().isEmpty()) {
133 snGroup += translationIterator->second.second;