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:
@@ -202,8 +202,8 @@ namespace Content.Client.LateJoin
|
||||
var jobLabel = new Label
|
||||
{
|
||||
Text = job.Value != null ?
|
||||
Loc.GetString("late-join-gui-job-slot-capped", ("jobName", prototype.Name), ("amount", job.Value)) :
|
||||
Loc.GetString("late-join-gui-job-slot-uncapped", ("jobName", prototype.Name))
|
||||
Loc.GetString("late-join-gui-job-slot-capped", ("jobName", prototype.LocalizedName), ("amount", job.Value)) :
|
||||
Loc.GetString("late-join-gui-job-slot-uncapped", ("jobName", prototype.LocalizedName))
|
||||
};
|
||||
|
||||
jobSelector.AddChild(jobLabel);
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Content.Client.Preferences.UI
|
||||
var highPriorityJob = humanoid?.JobPriorities.SingleOrDefault(p => p.Value == JobPriority.High).Key;
|
||||
if (highPriorityJob != null)
|
||||
{
|
||||
var jobName = IoCManager.Resolve<IPrototypeManager>().Index<JobPrototype>(highPriorityJob).Name;
|
||||
var jobName = IoCManager.Resolve<IPrototypeManager>().Index<JobPrototype>(highPriorityJob).LocalizedName;
|
||||
description = $"{description}\n{jobName}";
|
||||
}
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@ namespace Content.Client.Preferences.UI
|
||||
|
||||
var firstCategory = true;
|
||||
|
||||
foreach (var job in prototypeManager.EnumeratePrototypes<JobPrototype>().OrderBy(j => j.Name))
|
||||
foreach (var job in prototypeManager.EnumeratePrototypes<JobPrototype>().OrderBy(j => j.LocalizedName))
|
||||
{
|
||||
if(!job.SetPreference) { continue; }
|
||||
|
||||
@@ -1033,7 +1033,7 @@ namespace Content.Client.Preferences.UI
|
||||
Children =
|
||||
{
|
||||
icon,
|
||||
new Label {Text = job.Name, MinSize = (175, 0)},
|
||||
new Label {Text = job.LocalizedName, MinSize = (175, 0)},
|
||||
_optionButton
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user