More localize (#7869)
* Localize replacement accents * Localize bar signs * Holidays * Localize species
This commit is contained in:
@@ -77,8 +77,9 @@ namespace Content.Server.BarSign.Systems
|
||||
var newPrototype = _random.Pick(prototypes);
|
||||
|
||||
var meta = Comp<MetaDataComponent>(owner);
|
||||
meta.EntityName = newPrototype.Name != string.Empty ? newPrototype.Name : Loc.GetString("barsign-component-name");
|
||||
meta.EntityDescription = newPrototype.Description;
|
||||
var name = newPrototype.Name != string.Empty ? newPrototype.Name : "barsign-component-name";
|
||||
meta.EntityName = Loc.GetString(name);
|
||||
meta.EntityDescription = Loc.GetString(newPrototype.Description);
|
||||
|
||||
component.CurrentSign = newPrototype.ID;
|
||||
return newPrototype;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.Holiday.Greet
|
||||
|
||||
public string Greet(HolidayPrototype holiday)
|
||||
{
|
||||
return _greet;
|
||||
return Loc.GetString(_greet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,10 @@ namespace Content.Server.Holiday.Greet
|
||||
{
|
||||
public sealed class DefaultHolidayGreet : IHolidayGreet
|
||||
{
|
||||
public string Greet(HolidayPrototype holiday) => Loc.GetString("holiday-greet", ("holidayName", holiday.Name));
|
||||
public string Greet(HolidayPrototype holiday)
|
||||
{
|
||||
var holidayName = Loc.GetString(holiday.Name);
|
||||
return Loc.GetString("holiday-greet", ("holidayName", holidayName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Content.Server.Speech.EntitySystems
|
||||
{
|
||||
var words = _proto.Index<ReplacementAccentPrototype>(component.Accent).Words;
|
||||
|
||||
args.Message = words.Length != 0 ? _random.Pick(words) : "";
|
||||
args.Message = words.Length != 0 ? Loc.GetString(_random.Pick(words)) : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user