Fluent Localisation Fixes (#3344)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -31,8 +31,12 @@ namespace Content.Shared.Construction
|
||||
public override void DoExamine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
message.AddMarkup(string.IsNullOrEmpty(Name)
|
||||
? Loc.GetString("Next, insert an entity with a {0} component.", Component) // Terrible.
|
||||
: Loc.GetString("Next, insert {0}", Name));
|
||||
? Loc.GetString(
|
||||
"construction-insert-entity-with-component",
|
||||
("componentName", Component))// Terrible.
|
||||
: Loc.GetString(
|
||||
"construction-insert-exact-entity",
|
||||
("entityName", Name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -24,8 +24,14 @@ namespace Content.Shared.Construction
|
||||
public override void DoExamine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
message.AddMarkup(string.IsNullOrEmpty(Name)
|
||||
? Loc.GetString("Next, insert {0}", Prototype) // Terrible.
|
||||
: Loc.GetString("Next, insert {0}", Name));
|
||||
? Loc.GetString(
|
||||
"construction-insert-prototype-no-name",
|
||||
("prototypeName", Prototype) // Terrible.
|
||||
)
|
||||
: Loc.GetString(
|
||||
"construction-insert-prototype",
|
||||
("entityName", Name)
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ using Content.Shared.Maps;
|
||||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Localization.Macros;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -20,17 +19,14 @@ namespace Content.Shared
|
||||
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!;
|
||||
[Dependency] private readonly ITextMacroFactory _textMacroFactory = default!;
|
||||
[Dependency] private readonly IResourceManager _resourceManager = default!;
|
||||
|
||||
public override void PreInit()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
_textMacroFactory.DoAutoRegistrations();
|
||||
|
||||
// Default to en-US.
|
||||
Loc.LoadCulture(_resourceManager, _textMacroFactory, new CultureInfo(Culture));
|
||||
Loc.LoadCulture(_resourceManager, new CultureInfo(Culture));
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using System;
|
||||
using System;
|
||||
using Content.Shared.Preferences;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization.Macros;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Shared.GameObjects.Components.Mobs
|
||||
{
|
||||
public abstract class SharedHumanoidAppearanceComponent : Component, IGenderable
|
||||
public abstract class SharedHumanoidAppearanceComponent : Component
|
||||
{
|
||||
private HumanoidCharacterAppearance _appearance;
|
||||
private Sex _sex;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -49,7 +50,11 @@ namespace Content.Shared.GameObjects.Components
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Loc.GetString("{0}: {1:0.##} mol", Name, Amount);
|
||||
// e.g. "Plasma: 2000 mol"
|
||||
return Loc.GetString(
|
||||
"gas-entry-info",
|
||||
("gasName", Name),
|
||||
("gasAmount", Amount));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ using Content.Shared.GameTicking;
|
||||
using Content.Shared.Prototypes;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Utility;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Localization.Macros;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Serialization;
|
||||
@@ -19,7 +19,7 @@ namespace Content.Shared.Preferences
|
||||
/// Character profile. Looks immutable, but uses non-immutable semantics internally for serialization/code sanity purposes.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public class HumanoidCharacterProfile : ICharacterProfile, IGenderable
|
||||
public class HumanoidCharacterProfile : ICharacterProfile
|
||||
{
|
||||
private readonly Dictionary<string, JobPriority> _jobPriorities;
|
||||
private readonly List<string> _antagPreferences;
|
||||
@@ -286,7 +286,12 @@ namespace Content.Shared.Preferences
|
||||
}
|
||||
|
||||
public string Summary =>
|
||||
Loc.GetString(" This is {0}. {2:They} {2:are} {1} years old.", Name, Age, this);
|
||||
Loc.GetString(
|
||||
"humanoid-character-profile-summary",
|
||||
("name", Name),
|
||||
("gender", Gender.ToString().ToLowerInvariant()),
|
||||
("age", Age)
|
||||
);
|
||||
|
||||
public bool MemberwiseEquals(ICharacterProfile maybeOther)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user