Skip to content

Commit

Permalink
1.30.2: Fix localization in KSP 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jrossignol committed Sep 8, 2020
1 parent 7f92cd7 commit ddbf6cc
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 29 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Contract Configurator 1.30.2
- Backport localization tags missing from KSP 1.8 into Contract Configurator (thanks MatjaBrown, TomTheHand, IonTracks & Lignite).

Contract Configurator 1.30.1
- Translation for Chinese Simplified (thanks tinygrox).
- Restore compatibility back to KSP 1.8.1.
Expand Down
Binary file modified GameData/ContractConfigurator/CC_RemoteTech.dll
Binary file not shown.
Binary file modified GameData/ContractConfigurator/ContractConfigurator.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions GameData/ContractConfigurator/ContractConfigurator.version
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"NAME":"Contract Configurator",
"URL":"https://raw.githubusercontent.com/jrossignol/ContractConfigurator/master/GameData/ContractConfigurator/ContractConfigurator.version",
"DOWNLOAD":"https://github.com/jrossignol/ContractConfigurator/releases",
"CHANGE_LOG_URL":"https://raw.githubusercontent.com/jrossignol/ContractConfigurator/1.30.1/CHANGES.txt",
"CHANGE_LOG_URL":"https://raw.githubusercontent.com/jrossignol/ContractConfigurator/1.30.2/CHANGES.txt",
"GITHUB":{
"USERNAME":"jrossignol",
"REPOSITORY":"ContractConfigurator",
Expand All @@ -11,7 +11,7 @@
"VERSION":{
"MAJOR":1,
"MINOR":30,
"PATCH":1,
"PATCH":2,
"BUILD":0
},
"KSP_VERSION":{
Expand Down
Binary file modified GameData/ContractConfigurator/KerKonConConExt.dll
Binary file not shown.
8 changes: 8 additions & 0 deletions GameData/ContractConfigurator/Localization/en-us.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,25 @@ Localization
// Part stuff
#cc.parts.battery = Battery
#cc.parts.dock = Docking Port
#cc.parts.grapple = Grappling Device

// Expansions
#cc.expansion.MakingHistory = Making History
#cc.expansion.Serenity = Breaking Ground

// Other stuff
#cc.rateOfClimb = Rate of Climb
#cc.altitude = Altitude
#cc.apoapsis = Apoapsis
#cc.periapsis = Periapsis
#cc.eccentricity = Eccentricity
#cc.inclination = Inclination
#cc.acceleration = Acceleration
#cc.deltav.actual = Delta-v (actual)
#cc.deltav.vacuum = Delta-v (vacuum)
#cc.loadingtip = Configuring Contracts...
#cc.experienceType = Special experience
#cc.anyBody = Any Body

// Passenger loading
#cc.loadPassengers.1 = One or more contracts require passengers to be loaded. Would you like to load them onto this vessel?
Expand Down
9 changes: 9 additions & 0 deletions GameData/ContractConfigurator/Localization/zh-cn.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,26 @@ Localization
// Part stuff
#cc.parts.battery = 电量
#cc.parts.dock = 对接口
#cc.parts.grapple = 抓取航天器

// Expansions
#cc.expansion.MakingHistory = Making History
#cc.expansion.Serenity = Breaking Ground

// Other stuff
#cc.rateOfClimb = 爬升率
#cc.altitude = 海拔
#cc.apoapsis = 最远点
#cc.periapsis = 近拱点
#cc.eccentricity = 离心率
#cc.inclination = 倾角
#cc.acceleration = 加速度
#cc.deltav.actual = Delta-v (实际)
#cc.deltav.vacuum = Delta-v (真空)
#cc.loadingtip = 分配合同中...
#cc.experienceType = 特殊实验
#cc.anyBody = 任何天体

// Passenger loading
#cc.loadPassengers.1 = 一个或多个合同需要搭载乘客。是否让其搭乘本载具?
#cc.loadPassengers.2 = 要搭载的乘客:
Expand Down
4 changes: 2 additions & 2 deletions source/CC_RemoteTech/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0")]
[assembly: AssemblyFileVersion("1.30.1")]
[assembly: AssemblyInformationalVersion("1.30.1")]
[assembly: AssemblyFileVersion("1.30.2")]
[assembly: AssemblyInformationalVersion("1.30.2")]
[assembly: KSPAssembly("CC_RemoteTech", 1, 0)]
[assembly: KSPAssemblyDependency("ContractConfigurator", 1, 0)]
[assembly: KSPAssemblyDependency("RemoteTech", 1, 7)]
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ protected void CreateDelegates()
string output;
if (minAltitude == 0.0)
{
output = Localizer.Format("#cc.param.Orbit.below.meters", Localizer.GetStringByTag("#autoLOC_8000093"), maxAltitude.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.below.meters", Localizer.GetStringByTag("#cc.altitude"), maxAltitude.ToString("N0"));
}
else if (maxAltitude == double.MaxValue)
{
output = Localizer.Format("#cc.param.Orbit.above.meters", Localizer.GetStringByTag("#autoLOC_8000093"), minAltitude.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.above.meters", Localizer.GetStringByTag("#cc.altitude"), minAltitude.ToString("N0"));
}
else
{
output = Localizer.Format("#cc.param.Orbit.between.meters", Localizer.GetStringByTag("#autoLOC_8000093"), minAltitude.ToString("N0"), maxAltitude.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.between.meters", Localizer.GetStringByTag("#cc.altitude"), minAltitude.ToString("N0"), maxAltitude.ToString("N0"));
}

AddParameter(new ParameterDelegate<Vessel>(output, v => v.orbit.PeA >= minAltitude && v.orbit.ApA <= maxAltitude));
Expand All @@ -174,15 +174,15 @@ protected void CreateDelegates()
string output;
if (minApoapsis == 0.0)
{
output = Localizer.Format("#cc.param.Orbit.below.meters", Localizer.GetStringByTag("#autoLOC_8100059"), maxApoapsis.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.below.meters", Localizer.GetStringByTag("#cc.apoapsis"), maxApoapsis.ToString("N0"));
}
else if (maxApoapsis == double.MaxValue)
{
output = Localizer.Format("#cc.param.Orbit.above.meters", Localizer.GetStringByTag("#autoLOC_8100059"), minApoapsis.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.above.meters", Localizer.GetStringByTag("#cc.apoapsis"), minApoapsis.ToString("N0"));
}
else
{
output = Localizer.Format("#cc.param.Orbit.between.meters", Localizer.GetStringByTag("#autoLOC_8100059"), minApoapsis.ToString("N0"), maxApoapsis.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.between.meters", Localizer.GetStringByTag("#cc.apoapsis"), minApoapsis.ToString("N0"), maxApoapsis.ToString("N0"));
}

AddParameter(new ParameterDelegate<Vessel>(output, v => v.orbit.ApA >= minApoapsis && v.orbit.ApA <= maxApoapsis));
Expand All @@ -194,15 +194,15 @@ protected void CreateDelegates()
string output;
if (minPeriapsis == 0.0)
{
output = Localizer.Format("#cc.param.Orbit.below.meters", Localizer.GetStringByTag("#autoLOC_8100060"), maxPeriapsis.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.below.meters", Localizer.GetStringByTag("#cc.periapsis"), maxPeriapsis.ToString("N0"));
}
else if (maxPeriapsis == double.MaxValue)
{
output = Localizer.Format("#cc.param.Orbit.above.meters", Localizer.GetStringByTag("#autoLOC_8100060"), minPeriapsis.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.above.meters", Localizer.GetStringByTag("#cc.periapsis"), minPeriapsis.ToString("N0"));
}
else
{
output = Localizer.Format("#cc.param.Orbit.between.meters", Localizer.GetStringByTag("#autoLOC_8100060"), minPeriapsis.ToString("N0"), maxPeriapsis.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.between.meters", Localizer.GetStringByTag("#cc.periapsis"), minPeriapsis.ToString("N0"), maxPeriapsis.ToString("N0"));
}

AddParameter(new ParameterDelegate<Vessel>(output, v => v.orbit.PeA >= minPeriapsis && v.orbit.PeA <= maxPeriapsis));
Expand All @@ -214,15 +214,15 @@ protected void CreateDelegates()
string output;
if (minEccentricity == 0.0)
{
output = Localizer.Format("#cc.param.Orbit.below.nounits", Localizer.GetStringByTag("#autoLOC_8100061"), maxEccentricity.ToString("F4"));
output = Localizer.Format("#cc.param.Orbit.below.nounits", Localizer.GetStringByTag("#cc.eccentricity"), maxEccentricity.ToString("F4"));
}
else if (maxEccentricity == double.MaxValue)
{
output = Localizer.Format("#cc.param.Orbit.above.nounits", Localizer.GetStringByTag("#autoLOC_8100061"), minEccentricity.ToString("F4"));
output = Localizer.Format("#cc.param.Orbit.above.nounits", Localizer.GetStringByTag("#cc.eccentricity"), minEccentricity.ToString("F4"));
}
else
{
output = Localizer.Format("#cc.param.Orbit.between.nounits", Localizer.GetStringByTag("#autoLOC_8100061"), minEccentricity.ToString("F4"), maxEccentricity.ToString("F4"));
output = Localizer.Format("#cc.param.Orbit.between.nounits", Localizer.GetStringByTag("#cc.eccentricity"), minEccentricity.ToString("F4"), maxEccentricity.ToString("F4"));
}

AddParameter(new ParameterDelegate<Vessel>(output, v => v.orbit.eccentricity >= minEccentricity && v.orbit.eccentricity <= maxEccentricity));
Expand All @@ -234,15 +234,15 @@ protected void CreateDelegates()
string output;
if (minInclination == 0.0)
{
output = Localizer.Format("#cc.param.Orbit.below.degrees", Localizer.GetStringByTag("#autoLOC_8100062"), maxInclination.ToString("F1"));
output = Localizer.Format("#cc.param.Orbit.below.degrees", Localizer.GetStringByTag("#cc.inclination"), maxInclination.ToString("F1"));
}
else if (maxInclination == 180.0)
{
output = Localizer.Format("#cc.param.Orbit.above.degrees", Localizer.GetStringByTag("#autoLOC_8100062"), minInclination.ToString("F1"));
output = Localizer.Format("#cc.param.Orbit.above.degrees", Localizer.GetStringByTag("#cc.inclination"), minInclination.ToString("F1"));
}
else
{
output = Localizer.Format("#cc.param.Orbit.between.degrees", Localizer.GetStringByTag("#autoLOC_8100062"), minInclination.ToString("F1"), maxInclination.ToString("F1"));
output = Localizer.Format("#cc.param.Orbit.between.degrees", Localizer.GetStringByTag("#cc.inclination"), minInclination.ToString("F1"), maxInclination.ToString("F1"));
}

AddParameter(new ParameterDelegate<Vessel>(output, CheckInclination));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public static string ModuleTypeName(string partModule)
case "Generator":
return Localizer.GetStringByTag("#autoLOC_235532");
case "Grapple":
return Localizer.GetStringByTag("#autoLOC_8005456");
return Localizer.GetStringByTag("#cc.parts.grapple");
case "Wheel":
return Localizer.GetStringByTag("#autoLOC_148102");
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ protected void CreateDelegates()
string output;
if (minAltitude == float.MinValue)
{
output = Localizer.Format("#cc.param.Orbit.below.meters", Localizer.GetStringByTag("#autoLOC_8000093"), maxAltitude.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.below.meters", Localizer.GetStringByTag("#cc.altitude"), maxAltitude.ToString("N0"));
}
else if (maxAltitude == float.MaxValue)
{
output = Localizer.Format("#cc.param.Orbit.above.meters", Localizer.GetStringByTag("#autoLOC_8000093"), minAltitude.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.above.meters", Localizer.GetStringByTag("#cc.altitude"), minAltitude.ToString("N0"));
}
else
{
output = Localizer.Format("#cc.param.Orbit.between.meters", Localizer.GetStringByTag("#autoLOC_8000093"), minAltitude.ToString("N0"), maxAltitude.ToString("N0"));
output = Localizer.Format("#cc.param.Orbit.between.meters", Localizer.GetStringByTag("#cc.altitude"), minAltitude.ToString("N0"), maxAltitude.ToString("N0"));
}

AddParameter(new ParameterDelegate<Vessel>(output, CheckVesselAltitude));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public VesselHasVisited(CelestialBody destination, FlightLog.EntryType entryType
{
if (title == null)
{
string bodyStr = (destination != null) ? destination.displayName : Localizer.GetStringByTag("#autoLOC_8000273").ToLower();
string bodyStr = (destination != null) ? destination.displayName : Localizer.GetStringByTag("#cc.anyBody").ToLower();
switch (entryType)
{
case FlightLog.EntryType.BoardVessel:
Expand Down
4 changes: 2 additions & 2 deletions source/ContractConfigurator/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0")]
[assembly: AssemblyFileVersion("1.30.1")]
[assembly: AssemblyInformationalVersion("1.30.1")]
[assembly: AssemblyFileVersion("1.30.2")]
[assembly: AssemblyInformationalVersion("1.30.2")]
[assembly: KSPAssembly("ContractConfigurator", 1, 0)]
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class ExpansionRequirement : ContractRequirement
{
protected enum Expansion
{
[Description("#autoLOC_8400166")] MakingHistory,
[Description("#cc.expansion.MakingHistory")] MakingHistory,
[Description("#cc.expansion.Serenity")] Serenity
}
protected Expansion expansion;
Expand Down
4 changes: 2 additions & 2 deletions source/KerKonConConExt/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0")]
[assembly: AssemblyFileVersion("1.30.1")]
[assembly: AssemblyInformationalVersion("1.30.1")]
[assembly: AssemblyFileVersion("1.30.2")]
[assembly: AssemblyInformationalVersion("1.30.2")]
[assembly: KSPAssembly("KerKonConConExt", 1, 0)]
[assembly: KSPAssemblyDependency("ContractConfigurator", 1, 0)]
[assembly: KSPAssemblyDependency("KerbalKonstructs", 0, 9)]

0 comments on commit ddbf6cc

Please sign in to comment.