Skip to content

Commit a1ac31b

Browse files
committed
Add MapLoader and Map strings to reference translation file
1 parent f10f4fa commit a1ac31b

File tree

3 files changed

+99
-10
lines changed

3 files changed

+99
-10
lines changed

src/TSMapEditor/Config/Translations/en/Translation_en.ini

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,91 @@ SettingsPanel.ScrollRateSlow=Slow
5757
SettingsPanel.ScrollRateSlower=Slower
5858
SettingsPanel.ScrollRateSlowest=Slowest
5959

60+
; *************************************************
61+
; MapLoader
62+
; *************************************************
63+
64+
MapLoader.TriggerFix.InvalidTriggerAction=Trigger '{0}' had action "{1}" with invalid value for uncustomizable parameter #{2}: "{3}". It has been automatically corrected to "{4}".
65+
MapLoader.PostCheckMap.InvalidTileIndex=Invalid tile index {0} for cell at {1} - setting it to 0
66+
MapLoader.PostCheckMap.InvalidSubTileIndex=Invalid sub-tile index {0} for cell at {1} (max: {2}) - setting it to 0. TileSet: {3} ({4}), index of tile within its set: {5}
67+
MapLoader.PostCheckMap.MaxSubTileCount=\s\s\s\sMaximum sub-tile count of 0 detected for tile at {0}, also setting the cell's tile index to 0.
68+
MapLoader.PostCheckMap.NullSubTile=Null sub-tile {0} for cell at {1} - clearing the tile. TileSet: {2} ({3}), index of tile within its set: {4}
69+
MapLoader.ReadTerrainObjects.NonexistentTerrainObjectType=Skipping loading of terrain type {0}, placed at {1}, {2}, because it does not exist in Rules.
70+
MapLoader.ReadTerrainObjects.TerrainObjectOutsideOfMap=Terrain object {0} has been placed outside of the valid map area, at {1}, {2}. Skipping placing it on the map.
71+
MapLoader.FindAttachedTag.TagNotFound=Unable to find tag {0} attached to {1} at {2}
72+
MapLoader.ReadBuildings.BuildingTypeNotFound=Unable to find building type {0} - skipping adding it to map.
73+
MapLoader.ReadBuildings.BuildingTypeForUpgradeNotFound=Invalid building upgrade specified for building {0}: {1}
74+
MapLoader.ReadBuildings.UpgradeInvalid=Building {0} has an upgrade {1}, but@{2}does not specify {3} in its PowersUpBuilding= key. Skipping adding upgrade to map.
75+
MapLoader.ReadBuildings.UpgradeCountMismatch=Building {0} at {1} has more upgrades ({2}) than specified by its Upgrades= value ({3}) in Rules. Skipping adding one or more of the building's upgrades.
76+
MapLoader.CheckFoundationCell.TileOutOfBounds=Building {0} has been placed outside of the map at {1}. Skipping adding it to map.
77+
MapLoader.ReadAircraft.AircraftTypeNotFound=Unable to find aircraft type {0} - skipping adding it to map.
78+
MapLoader.ReadUnits.UnitTypeNotFound=Unable to find unit type {0} - skipping adding it to map.
79+
MapLoader.ReadInfantry.InfantryTypeNotFound=Unable to find infantry type {0} - skipping adding it to map.
80+
MapLoader.ReadSmudges.InvalidSmudgeSyntax=Invalid syntax in smudge defined in map: {0}
81+
MapLoader.ReadSmudges.InvalidSmudgeSyntaxAtPosition=Invalid syntax in smudge at {0},{1}: {2}
82+
MapLoader.ReadSmudges.SmudgeTypeNotFound=Cell at {0},{1} contains a smudge '{2}' that does not exist in Rules.ini. Ignoring it.
83+
MapLoader.ReadSmudges.SmudgeOutOfBounds=Smudge at {0},{1} is placed outside of the map. Ignoring it.
84+
MapLoader.ReadOverlays.OverlayIndexOutOfBounds=Ignoring overlay on tile at {0},{1} because it's out of bounds compared to Rules.ini overlay list
85+
MapLoader.ReadWaypoints.InvalidWaypointSyntax=Invalid syntax encountered for waypoint: {0}={1}
86+
MapLoader.ReadWaypoints.WaypointOutOfBounds=Waypoint {0} at {1} was not within the valid map area. It has been moved to {2}.
87+
MapLoader.TriggerFix.InvalidTriggerAction=Trigger "{0}" had action "{1}" with invalid value for uncustomizable parameter #{2}: "{3}". It has been automatically corrected to "{4}".
88+
MapLoader.TriggerFix.InvalidTriggerAction=Trigger "{0}" had action "{1}" with invalid value for uncustomizable parameter #{2}: "{3}". It has been automatically corrected to "{4}".
89+
MapLoader.ReadTags.TriggerNotFound=Ignoring tag {0} because its related trigger {1} does not exist!
90+
MapLoader.ReadAITriggerTypes.InvalidAITriggerType=AITriggerType {0} is invalid, skipping reading it.
91+
MapLoader.ReadAITriggerTypes.PrimaryTeamNotFound=AITriggerType "{0}" ({1}) has a nonexistent team ({2}) specified as its primary team!
92+
MapLoader.ReadAITriggerTypes.InvalidTechLevel=AITriggerType {0} has an invalid tech level, skipping parsing of the AI trigger.
93+
MapLoader.ReadAITriggerTypes.InvalidConditionType=AITriggerType {0} has an invalid condition type, skipping parsing of the AI trigger.
94+
MapLoader.ReadAITriggerTypes.ConditionObjectNotFound=AITriggerType {0} has a non-existent condition object "{1}"
95+
MapLoader.ReadAITriggerTypes.ConditionComparatorParseError=Failed to parse comparator of AITriggerType {0} ({1})! Skipping loading of the AI trigger.
96+
MapLoader.ReadAITriggerTypes.SecondaryTeamNotFound=AITriggerType {0} has a non-existent secondary team type "{1}"
97+
MapLoader.ReadHouses.InvalidBaseNode=Skipping loading invalid base node of house {0} for building type "{1}". The building type does not exist in Rules!
98+
MapLoader.ReadHouses.InvalidCountry=Nonexistent Country= or no Country= specified for House {0}. This makes it default to the first standard Country ({1}).
99+
MapLoader.ReadHouses.NonexistentAlliedHouse=House with name {0} was not found when loading up allies for the house {1}. Skipping the alliance.
100+
MapLoader.ReadLocalVariables.InvalidIndex=Invalid local variable index in entry {0}: {1}, skipping reading local variable.
101+
MapLoader.ReadLocalVariables.DuplicateIndex=Duplicate local variable index in entry {0}: {1}, skipping reading local variable.
102+
MapLoader.ReadLocalVariables.InvalidSyntax=Invalid local variable syntax in entry {0}: {1}, skipping reading local variable.
103+
MapLoader.ReadTubes.InvalidTube=Invalid tube entry: {0}
104+
MapSetup.MapLoadErrors.Title=Errors while loading map
105+
MapSetup.MapLoadErrors.Description=One or more errors were encountered while loading the map:@@{0}
106+
107+
; *************************************************
108+
; Map
109+
; *************************************************
110+
111+
Map.CheckForIssues.ImpassableTile=Cell at {0} has Tiberium on an otherwise impassable cell. This can cause harvesters to get stuck.
112+
Map.CheckForIssues.DuplicateHouseININame=The map has multiple houses named "{0}"! This will result in a corrupted house list in-game!
113+
Map.CheckForIssues.TeamTypeWithoutTaskForce=TeamType "{0}" has no TaskForce set!
114+
Map.CheckForIssues.TeamTypeWithoutScript=TeamType "{0}" has no Script set!
115+
CheckForIssues.TriggerDisabled=Trigger "{0}" ({1}) is disabled and never enabled by another trigger.@Did you forget to enable it? If the trigger exists for debugging purposes, add DEBUG or OBSOLETE to its name to skip this warning.
116+
CheckForIssues.TriggerEnabledByOtherTriggers=Trigger "{0}" ({1}) is enabled by another trigger, but it is never in a disabled state@(it is neither disabled by default nor disabled by other triggers). Did you forget to disable it?
117+
CheckForIssues.TriggerEnableSelf=Trigger "{0}" ({1}) has an action for enabling itself. Is it supposed to enable something else instead?
118+
CheckForIssues.PlayerHouseNotFound=A nonexistent house has been specified in [Basic] Player= .
119+
CheckForIssues.PlayerHouseNotPlayerControlled=The human player's house does not have the "Player-Controlled" flag checked.
120+
CheckForIssues.MaxTubesExceeded=The map has more than {0} tunnel tubes. This might cause issues when units cross the tunnels.
121+
CheckForIssues.UnitFollowsMultipleUnits=Multiple units are configured to make unit {0} at {1} to follow them!@This can cause strange behaviour in the game. {2} at {3} is one of the followed units.
122+
CheckForIssues.NegativeFollowerID=Unit {0} at {1} has a follower ID below -1. It is unknown how the game reacts to this.
123+
CheckForIssues.UnitFollowSelf=Unit {0} at {1} follows itself! This can cause the game to crash or freeze!
124+
CheckForIssues.NoTriggerConditions=Trigger '{0}' has 0 events specified. It will never be fired. Did you forget to give it events?
125+
CheckForIssues.NoTriggerActions=Trigger '{0}' has 0 actions specified. It will not do anything. Did you forget to give it actions?
126+
CheckForIssues.TriggerEnteredByNoObjects=Trigger '{0}' is using the "Entered by..." event without being attached to any object, cell, or team. Did you forget to attach it?
127+
CheckForIssues.TriggerBridgeDestroyedNoCellTags=Trigger '{0}' is using the "Bridge destroyed" event, but it is not attached to any CellTag. Did you forget to place a celltag for it?
128+
CheckForIssues.TriggerEventNoObjectAttached=Trigger '{0}' is using the {1} event without being attached to any object or team. Did you forget to attach it?
129+
CheckForIssues.TriggerAttachedToSelf=Trigger '{0}' is attached to itself (potentially through other triggers). This will cause the game to crash!
130+
CheckForIssues.InvalidTriggerActionTeamType=Trigger '{0}' has a nonexistent TeamType specified as a parameter for one or more of its actions.
131+
CheckForIssues.InvalidTriggerActionHouse=Trigger '{0}' has a nonexistent HouseType specified as a parameter for one or more of its actions.
132+
CheckForIssues.InvalidTriggerOwner=Trigger '{0}' has a nonexistent HouseType '{1}' specified as its owner.
133+
CheckForIssues.TriggerTooManyActions=Trigger '{0}' has more than {1} actions! This can cause the game to crash! Consider splitting it up to multiple triggers.
134+
CheckForIssues.SpecialWaypointUsed=The map makes use of waypoint #{0}. In Tiberian Sun, this waypoint is reserved for special use cases (WAYPT_SPECIAL). Using it as a normal waypoint may cause issues as it may be dynamically moved by game events.
135+
CheckForAITriggerTeamWithMaxZeroIssue.TeamTypeMax=Team '{0}', linked to AITrigger '{1}', has Max=0. This prevents the AI from building the team.
136+
137+
; *************************************************
138+
; EditorMessageBox
139+
; *************************************************
140+
141+
EditorMessageBox.OK=OK
142+
EditorMessageBox.Yes=Yes
143+
EditorMessageBox.No=No
144+
60145
; *************************************************
61146
; Colors
62147
; *************************************************

src/TSMapEditor/Initialization/MapLoader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public static void ReadBuildings(IMap map, IniFile mapIni)
373373
if (string.IsNullOrWhiteSpace(upgradeBuildingType.PowersUpBuilding) || !upgradeBuildingType.PowersUpBuilding.Equals(buildingType.ININame, StringComparison.OrdinalIgnoreCase))
374374
{
375375
AddMapLoadError(string.Format(Translate("MapLoader.ReadBuildings.UpgradeInvalid",
376-
"Building {0} has an upgrade {1}, but \r\n{2} " +
376+
"Building {0} has an upgrade {1}, but" + Environment.NewLine + "{2} " +
377377
"does not specify {3} in its PowersUpBuilding= key. Skipping adding upgrade to map."),
378378
buildingTypeId, upgradeBuildingType.ININame, upgradeBuildingType.ININame, buildingTypeId));
379379
continue;
@@ -918,7 +918,7 @@ private static void TriggerFix(IMap map)
918918
{
919919
string valueToSet = "A";
920920
AddMapLoadError(string.Format(Translate("MapLoader.TriggerFix.InvalidTriggerAction",
921-
"Trigger '{0}' had action \"{1}\" with invalid value for uncustomizable parameter #{2}: \"{3}\". " +
921+
"Trigger \"{0}\" had action \"{1}\" with invalid value for uncustomizable parameter #{2}: \"{3}\". " +
922922
"It has been automatically corrected to \"{4}\"."),
923923
trigger.Name, triggerActionType.Name, lastParamIndex, action.Parameters[lastParamIndex], valueToSet));
924924
action.Parameters[lastParamIndex] = valueToSet;
@@ -1066,7 +1066,7 @@ public static void ReadAITriggerTypes(IMap map, IniFile mapIni)
10661066
{
10671067
AddMapLoadError(string.Format(Translate("MapLoader.ReadAITriggerTypes.ConditionComparatorParseError",
10681068
"Failed to parse comparator of AITriggerType {0} ({1})! Skipping loading of the AI trigger."),
1069-
kvp.Key, aiTriggerType.Name));
1069+
kvp.Key, aiTriggerType.Name));
10701070
continue;
10711071
}
10721072
aiTriggerType.Comparator = comparator.Value;
@@ -1087,7 +1087,7 @@ public static void ReadAITriggerTypes(IMap map, IniFile mapIni)
10871087
{
10881088
AddMapLoadError(string.Format(Translate("MapLoader.ReadAITriggerTypes.SecondaryTeamNotFound",
10891089
"AITriggerType {0} has a non-existent secondary team type \"{1}\""),
1090-
kvp.Key, parts[14]));
1090+
kvp.Key, parts[14]));
10911091
}
10921092
}
10931093

src/TSMapEditor/Models/Map.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ public List<string> CheckForIssues()
18271827
// Check for more than 127 tunnel tubes
18281828
if (Tubes.Count > MaxTubes)
18291829
{
1830-
issueList.Add(string.Format(Translate(this, "CheckForIssues.MaxTubes",
1830+
issueList.Add(string.Format(Translate(this, "CheckForIssues.MaxTubesExceeded",
18311831
"The map has more than {0} tunnel tubes. This might cause issues when units cross the tunnels."), MaxTubes));
18321832
}
18331833

@@ -1842,7 +1842,7 @@ public List<string> CheckForIssues()
18421842

18431843
if (followedUnits.Contains(unit.FollowerUnit))
18441844
{
1845-
issueList.Add(string.Format(Translate(this, "CheckForIssues.MultipleUnitsFollow",
1845+
issueList.Add(string.Format(Translate(this, "CheckForIssues.UnitFollowsMultipleUnits",
18461846
"Multiple units are configured to make unit {0} at {1} to follow them! " + Environment.NewLine +
18471847
"This can cause strange behaviour in the game. {2} at {3} is one of the followed units."),
18481848
unit.FollowerUnit.UnitType.ININame, unit.FollowerUnit.Position, unit.UnitType.ININame, unit.Position));
@@ -1853,13 +1853,17 @@ public List<string> CheckForIssues()
18531853
}
18541854

18551855
if (followsId < -1)
1856-
issueList.Add(string.Format(Translate(this, "CheckForIssues.NegativeFollowID",
1856+
{
1857+
issueList.Add(string.Format(Translate(this, "CheckForIssues.NegativeFollowerID",
18571858
"Unit {0} at {1} has a follower ID below -1. It is unknown how the game reacts to this."),
1858-
unit.UnitType.ININame, 1));
1859+
unit.UnitType.ININame, 1));
1860+
}
18591861
else if (followsId == i)
1860-
issueList.Add(string.Format(Translate(this, "CheckForIssues.UnitFollowSelf",
1862+
{
1863+
issueList.Add(string.Format(Translate(this, "CheckForIssues.UnitFollowSelf",
18611864
"Unit {0} at {1} follows itself! This can cause the game to crash or freeze!"),
1862-
unit.UnitType.ININame, unit.Position));
1865+
unit.UnitType.ININame, unit.Position));
1866+
}
18631867
}
18641868

18651869
var reportedTeams = new List<TeamType>();

0 commit comments

Comments
 (0)