Quantcast

Use localisation for processing missions. Isn't as flashy, but looks cleaner and works for translations

WildCard_25 [03-24-19 - 04:13]
Use localisation for processing missions. Isn't as flashy, but looks cleaner and works for translations
Filename
MissionControl.lua
ShipControl.lua
diff --git a/MissionControl.lua b/MissionControl.lua
index 97ac92e..994d7b0 100644
--- a/MissionControl.lua
+++ b/MissionControl.lua
@@ -222,7 +222,7 @@ do
 				timeElapsed=0.5
 			else
 				local missionID=aMissions[currentMission]
-				GMC.list.widget:SetFormattedTitle("Processing mission %d of %d (%s)",currentMission,#aMissions,G.GetMissionName(missionID))
+				GMC.list.widget:SetFormattedTitle(L["Processing mission %d of %d"], currentMission, #aMissions)
 				local class=self:GetMissionData(missionID,"class")
 				--print(C("Processing ","Red"),missionID,addon:GetMissionData(missionID,"name"))
 				local minimumChance=0
@@ -302,13 +302,13 @@ function module:OnClick_Start(this,button)
 		return
 	end
 	this:Disable()
-	GMC.list.widget:SetTitleColor(C.Green())
 	self:CreateMissionList(aMissions)
 	wipe(GMCUsedFollowers)
 	wipe(GMC.list.Parties)
 	self:RefreshFollowerStatus()
 	if (#aMissions>0) then
 		GMC.list.widget:SetFormattedTitle(L["Processing mission %d of %d"],1,#aMissions)
+		GMC.list.widget:SetTitleColor(C.Yellow())
 	else
 		GMC.list.widget:SetTitle("No mission matches your criteria")
 		GMC.list.widget:SetTitleColor(C.Red())
diff --git a/ShipControl.lua b/ShipControl.lua
index 4a4ae7e..3c168e9 100644
--- a/ShipControl.lua
+++ b/ShipControl.lua
@@ -264,7 +264,7 @@ do
 					missionID=nextMissionID
 					nextMissionID=OILRIG
 				end
-				GMC.list.widget:SetFormattedTitle("Processing mission %d of %d (%s)",currentMission,#aMissions,G.GetMissionName(missionID))
+				GMC.list.widget:SetFormattedTitle(L["Processing mission %d of %d"], currentMission, #aMissions)
 				local class=self:GetMissionData(missionID,"class")
 				--print(C("Processing ","Red"),missionID,addon:GetMissionData(missionID,"name"))
 				local minimumChance=0
@@ -355,13 +355,13 @@ function module:OnClick_Start(this,button)
 		return
 	end
 	this:Disable()
-	GMC.list.widget:SetTitleColor(C.Green())
 	self:CreateMissionList(aMissions)
 	wipe(GMCUsedFollowers)
 	wipe(GMC.list.Parties)
 	shipyard:RefreshFollowerStatus()
 	if (#aMissions>0) then
 		GMC.list.widget:SetFormattedTitle(L["Processing mission %d of %d"],1,#aMissions)
+		GMC.list.widget:SetTitleColor(C.Yellow())
 	else
 		GMC.list.widget:SetTitle("No mission matches your criteria")
 		GMC.list.widget:SetTitleColor(C.Red())