Localize jobs (#8968)
* Localize job supervisors * Rename supervisors file * Localize job names * Remove localization for fallback job name * Use LocalizedName for Job * Fix job names case
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Content.Server.Access.Systems
|
||||
_accessSystem.SetAccessToJob(uid, job, extended);
|
||||
|
||||
// and also change job title on a card id
|
||||
_cardSystem.TryChangeJobTitle(uid, job.Name);
|
||||
_cardSystem.TryChangeJobTitle(uid, job.LocalizedName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Content.Server.GameTicking.Commands
|
||||
var jobPrototype = _prototypeManager.Index<JobPrototype>(id);
|
||||
if(stationJobs.TryGetJobSlot(station, jobPrototype, out var slots) == false || slots == 0)
|
||||
{
|
||||
shell.WriteLine($"{jobPrototype.Name} has no available slots.");
|
||||
shell.WriteLine($"{jobPrototype.LocalizedName} has no available slots.");
|
||||
return;
|
||||
}
|
||||
ticker.MakeJoinGame(player, station, id);
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Content.Server.GameTicking
|
||||
InitializeLobbyMusic();
|
||||
InitializeLobbyBackground();
|
||||
InitializeGamePreset();
|
||||
DebugTools.Assert(_prototypeManager.Index<JobPrototype>(FallbackOverflowJob).Name == Loc.GetString(FallbackOverflowJobName),
|
||||
DebugTools.Assert(_prototypeManager.Index<JobPrototype>(FallbackOverflowJob).Name == FallbackOverflowJobName,
|
||||
"Overflow role does not have the correct name!");
|
||||
InitializeGameRules();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Server.Roles
|
||||
public Job(Mind.Mind mind, JobPrototype jobPrototype) : base(mind)
|
||||
{
|
||||
Prototype = jobPrototype;
|
||||
Name = jobPrototype.Name;
|
||||
Name = jobPrototype.LocalizedName;
|
||||
CanBeAntag = jobPrototype.CanBeAntag;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Content.Server.Roles
|
||||
if(Prototype.RequireAdminNotify)
|
||||
chatMgr.DispatchServerMessage(session, Loc.GetString("job-greet-important-disconnect-admin-notify"));
|
||||
|
||||
chatMgr.DispatchServerMessage(session, Loc.GetString("job-greet-supervisors-warning", ("jobName", Name), ("supervisors", Prototype.Supervisors)));
|
||||
chatMgr.DispatchServerMessage(session, Loc.GetString("job-greet-supervisors-warning", ("jobName", Name), ("supervisors", Loc.GetString(Prototype.Supervisors))));
|
||||
|
||||
if(Prototype.JoinNotifyCrew && Mind.CharacterName != null)
|
||||
{
|
||||
|
||||
@@ -173,7 +173,7 @@ public sealed class StationSpawningSystem : EntitySystem
|
||||
var card = pdaComponent.ContainedID;
|
||||
var cardId = card.Owner;
|
||||
_cardSystem.TryChangeFullName(cardId, characterName, card);
|
||||
_cardSystem.TryChangeJobTitle(cardId, jobPrototype.Name, card);
|
||||
_cardSystem.TryChangeJobTitle(cardId, jobPrototype.LocalizedName, card);
|
||||
|
||||
var extendedAccess = false;
|
||||
if (station != null)
|
||||
|
||||
Reference in New Issue
Block a user