diff --git a/src/SMAPI/Translation.cs b/src/SMAPI/Translation.cs
index 6eeb50ab..07596f3b 100644
--- a/src/SMAPI/Translation.cs
+++ b/src/SMAPI/Translation.cs
@@ -33,8 +33,8 @@ public class Translation
/// Whether to show a placeholder if the and are both is null or empty.
private bool ShouldUsePlaceholder { get; init; }
- /// Whether to process gender-switch blocks in translation text, if any.
- private bool ShouldApplyGenderSwitchBlocks { get; init; }
+ /// Whether to process switch blocks in translation text, if any.
+ private bool ShouldApplySwitchBlocks { get; init; }
/// The tokens to apply to the translation text, if any.
private Dictionary? TokenValues { get; init; }
@@ -66,7 +66,7 @@ public class Translation
this.Key = key;
this.Text = text;
this.ShouldUsePlaceholder = true;
- this.ShouldApplyGenderSwitchBlocks = true;
+ this.ShouldApplySwitchBlocks = true;
}
/// Construct an instance.
@@ -76,7 +76,7 @@ public class Translation
{
this.CustomDefault = other.CustomDefault;
this.ShouldUsePlaceholder = other.ShouldUsePlaceholder;
- this.ShouldApplyGenderSwitchBlocks = other.ShouldApplyGenderSwitchBlocks;
+ this.ShouldApplySwitchBlocks = other.ShouldApplySwitchBlocks;
this.TokenValues = other.TokenValues;
this.ForceGender = other.ForceGender;
}
@@ -112,17 +112,17 @@ public class Translation
};
}
- /// Whether to automatically process gender-switch blocks (i.e. ) before the text is returned.
- /// Whether to process gender-switch blocks.
+ /// Whether to automatically process switch blocks (i.e. ) before the text is returned.
+ /// Whether to process switch blocks.
/// Returns a new instance if this would change the result, else the current instance.
- public Translation ApplyGenderSwitchBlocks(bool apply)
+ public Translation ApplySwitchBlocks(bool apply)
{
- if (this.ShouldApplyGenderSwitchBlocks == apply)
+ if (this.ShouldApplySwitchBlocks == apply)
return this;
return new Translation(this)
{
- ShouldApplyGenderSwitchBlocks = apply
+ ShouldApplySwitchBlocks = apply
};
}
@@ -212,11 +212,11 @@ public class Translation
});
}
- // apply gender switches
- if (this.ShouldApplyGenderSwitchBlocks)
+ // apply switch blocks
+ if (this.ShouldApplySwitchBlocks)
{
Gender gender = this.ForceGender?.Invoke() ?? Game1.player?.Gender ?? default;
- text = Dialogue.applyGenderSwitchBlocks(gender, text);
+ text = Dialogue.ApplySwitchBlocks(gender, text, this.Key);
}
}