Removed old Loc.GetString() use instances (#4155)

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
Galactic Chimp
2021-06-21 02:13:54 +02:00
committed by GitHub
parent 4a46fbe6dd
commit 392b820796
523 changed files with 3082 additions and 1551 deletions

View File

@@ -27,7 +27,7 @@ namespace Content.Client.AME.UI
{
IoCManager.InjectDependencies(this);
Title = "Antimatter Control Unit";
Title = Loc.GetString("ame-window-title");
MinSize = SetSize = (250, 250);
@@ -39,37 +39,37 @@ namespace Content.Client.AME.UI
{
Children =
{
new Label {Text = Loc.GetString("Engine Status") + ": "},
(InjectionStatus = new Label {Text = "Not Injecting"})
new Label {Text = Loc.GetString("ame-window-engine-status-label")},
(InjectionStatus = new Label {Text = Loc.GetString("ame-window-engine-injection-status-not-injecting-label")})
}
},
new HBoxContainer
{
Children =
{
(ToggleInjection = new Button {Text = "Toggle Injection", StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
(ToggleInjection = new Button {Text = Loc.GetString("ame-window-toggle-injection-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
}
},
new HBoxContainer
{
Children =
{
new Label {Text = Loc.GetString("Fuel Status") + ": "},
(FuelAmount = new Label {Text = "No fuel inserted"})
new Label {Text = Loc.GetString("ame-window-fuel-status-label")},
(FuelAmount = new Label {Text = Loc.GetString("ame-window-fuel-not-inserted-text")})
}
},
new HBoxContainer
{
Children =
{
(EjectButton = new Button {Text = "Eject", StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
(EjectButton = new Button {Text = Loc.GetString("ame-window-eject-button"), StyleClasses = {StyleBase.ButtonOpenBoth}, Disabled = true}),
}
},
new HBoxContainer
{
Children =
{
new Label {Text = Loc.GetString("Injection amount") + ": "},
new Label {Text = Loc.GetString("ame-window-injection-amount-label")},
(InjectionAmount = new Label {Text = "0"})
}
},
@@ -77,16 +77,16 @@ namespace Content.Client.AME.UI
{
Children =
{
(IncreaseFuelButton = new Button {Text = "Increase", StyleClasses = {StyleBase.ButtonOpenRight}}),
(DecreaseFuelButton = new Button {Text = "Decrease", StyleClasses = {StyleBase.ButtonOpenLeft}}),
(IncreaseFuelButton = new Button {Text = Loc.GetString("ame-window-increase-fuel-button"), StyleClasses = {StyleBase.ButtonOpenRight}}),
(DecreaseFuelButton = new Button {Text = Loc.GetString("ame-window-decrease-fuel-button"), StyleClasses = {StyleBase.ButtonOpenLeft}}),
}
},
new HBoxContainer
{
Children =
{
(RefreshPartsButton = new Button {Text = "Refresh Parts", StyleClasses = {StyleBase.ButtonOpenBoth }, Disabled = true }),
new Label { Text = Loc.GetString("Core count") + ": "},
(RefreshPartsButton = new Button {Text = Loc.GetString("ame-window-refresh-parts-button"), StyleClasses = {StyleBase.ButtonOpenBoth }, Disabled = true }),
new Label { Text = Loc.GetString("ame-window-core-count-label")},
(CoreCount = new Label { Text = "0"}),
}
}
@@ -136,7 +136,7 @@ namespace Content.Client.AME.UI
{
EjectButton.Disabled = true;
ToggleInjection.Disabled = true;
FuelAmount.Text = Loc.GetString("No fuel inserted");
FuelAmount.Text = Loc.GetString("ame-window-fuel-not-inserted-text");
}
else
{
@@ -152,11 +152,11 @@ namespace Content.Client.AME.UI
if (!castState.Injecting)
{
InjectionStatus.Text = Loc.GetString("Not Injecting");
InjectionStatus.Text = Loc.GetString("ame-window-engine-injection-status-not-injecting-label");
}
else
{
InjectionStatus.Text = Loc.GetString("Injecting...");
InjectionStatus.Text = Loc.GetString("ame-window-engine-injection-status-injecting-label");
}
RefreshPartsButton.Disabled = castState.Injecting;

View File

@@ -45,11 +45,11 @@ namespace Content.Client.Access.UI
Columns = 3,
Children =
{
new Label {Text = Loc.GetString("Privileged ID:")},
new Label {Text = Loc.GetString("id-card-console-window-privileged-id")},
(_privilegedIdButton = new Button()),
(_privilegedIdLabel = new Label()),
new Label {Text = Loc.GetString("Target ID:")},
new Label {Text = Loc.GetString("id-card-console-window-target-id")},
(_targetIdButton = new Button()),
(_targetIdLabel = new Label())
}
@@ -71,7 +71,7 @@ namespace Content.Client.Access.UI
// Name
(_fullNameLabel = new Label
{
Text = Loc.GetString("Full name:")
Text = Loc.GetString("id-card-console-window-full-name-label")
}),
(_fullNameLineEdit = new LineEdit
{
@@ -79,14 +79,14 @@ namespace Content.Client.Access.UI
}),
(_fullNameSaveButton = new Button
{
Text = Loc.GetString("Save"),
Text = Loc.GetString("id-card-console-window-save-button"),
Disabled = true
}),
// Title
(_jobTitleLabel = new Label
{
Text = Loc.GetString("Job title:")
Text = Loc.GetString("id-card-console-window-job-title-label")
}),
(_jobTitleLineEdit = new LineEdit
{
@@ -94,7 +94,7 @@ namespace Content.Client.Access.UI
}),
(_jobTitleSaveButton = new Button
{
Text = Loc.GetString("Save"),
Text = Loc.GetString("id-card-console-window-save-button"),
Disabled = true
}),
},
@@ -144,14 +144,14 @@ namespace Content.Client.Access.UI
public void UpdateState(IdCardConsoleBoundUserInterfaceState state)
{
_privilegedIdButton.Text = state.IsPrivilegedIdPresent
? Loc.GetString("Eject")
: Loc.GetString("Insert");
? Loc.GetString("id-card-console-window-eject-button")
: Loc.GetString("id-card-console-window-insert-button");
_privilegedIdLabel.Text = state.PrivilegedIdName;
_targetIdButton.Text = state.IsTargetIdPresent
? Loc.GetString("Eject")
: Loc.GetString("Insert");
? Loc.GetString("id-card-console-window-eject-button")
: Loc.GetString("id-card-console-window-insert-button");
_targetIdLabel.Text = state.TargetIdName;
@@ -165,7 +165,7 @@ namespace Content.Client.Access.UI
_fullNameLineEdit.Editable = interfaceEnabled;
if (!fullNameDirty)
{
_fullNameLineEdit.Text = state.TargetIdFullName ?? "";
_fullNameLineEdit.Text = state.TargetIdFullName ?? string.Empty;
}
_fullNameSaveButton.Disabled = !interfaceEnabled || !fullNameDirty;
@@ -174,7 +174,7 @@ namespace Content.Client.Access.UI
_jobTitleLineEdit.Editable = interfaceEnabled;
if (!jobTitleDirty)
{
_jobTitleLineEdit.Text = state.TargetIdJobTitle ?? "";
_jobTitleLineEdit.Text = state.TargetIdJobTitle ?? string.Empty;
}
_jobTitleSaveButton.Disabled = !interfaceEnabled || !jobTitleDirty;

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Actions;
using Content.Shared.Actions.Components;
using Robust.Shared.GameObjects;
using System.Collections.Generic;
using System.Linq;
namespace Content.Client.Actions.Assignments
{
@@ -70,8 +70,6 @@ namespace Content.Client.Actions.Assignments
}
}
foreach (var (item, itemStates) in itemActionStates)
{
foreach (var itemActionState in itemStates)
@@ -94,10 +92,13 @@ namespace Content.Client.Actions.Assignments
// which once had an associated item but have been revoked (based on our newly provided action states)
// so we can dissociate them from the item. If the provided action states do not
// have a state for this action type + item, we can assume that the action has been revoked for that item.
var assignmentsWithoutItem = new List<KeyValuePair<ActionAssignment,List<(byte Hotbar, byte Slot)>>>();
var assignmentsWithoutItem = new List<KeyValuePair<ActionAssignment, List<(byte Hotbar, byte Slot)>>>();
foreach (var assignmentEntry in _assignments)
{
if (!assignmentEntry.Key.TryGetItemActionWithItem(out var actionType, out var item)) continue;
if (!assignmentEntry.Key.TryGetItemActionWithItem(out var actionType, out var item))
{
continue;
}
// we have this assignment currently tied to an item,
// check if it no longer has an associated item in our dict of states
@@ -110,8 +111,10 @@ namespace Content.Client.Actions.Assignments
continue;
}
}
assignmentsWithoutItem.Add(assignmentEntry);
}
// reassign without the item for each assignment we found that no longer has an associated item
foreach (var (assignment, slots) in assignmentsWithoutItem)
{
@@ -158,7 +161,7 @@ namespace Content.Client.Actions.Assignments
}
else
{
var newList = new List<(byte Hotbar, byte Slot)> {(hotbar, slot)};
var newList = new List<(byte Hotbar, byte Slot)> { (hotbar, slot) };
_assignments[actionType] = newList;
}
}
@@ -179,7 +182,12 @@ namespace Content.Client.Actions.Assignments
// remove this particular assignment from our data structures
// (keeping in mind something can be assigned multiple slots)
var currentAction = _slots[hotbar, slot];
if (!currentAction.HasValue) return;
if (!currentAction.HasValue)
{
return;
}
if (preventAutoPopulate)
{
var assignment = currentAction.Value;
@@ -199,6 +207,7 @@ namespace Content.Client.Actions.Assignments
actionTypes.Add(itemActionType);
}
}
var assignmentList = _assignments[currentAction.Value];
assignmentList = assignmentList.Where(a => a.Hotbar != hotbar || a.Slot != slot).ToList();
if (!assignmentList.Any())
@@ -209,6 +218,7 @@ namespace Content.Client.Actions.Assignments
{
_assignments[currentAction.Value] = assignmentList;
}
_slots[hotbar, slot] = null;
}
@@ -223,7 +233,11 @@ namespace Content.Client.Actions.Assignments
/// if this assignment has been prevented from auto population.</param>
public void AutoPopulate(ActionAssignment toAssign, byte currentHotbar, bool force = true)
{
if (ShouldPreventAutoPopulate(toAssign, force)) return;
if (ShouldPreventAutoPopulate(toAssign, force))
{
return;
}
// if the assignment to make is an item action with an associated item,
// then first look for currently assigned item actions without an item, to replace with this
// assignment
@@ -240,7 +254,7 @@ namespace Content.Client.Actions.Assignments
{
var cost = possibility.Slot + _numSlots * (currentHotbar >= possibility.Hotbar
? currentHotbar - possibility.Hotbar
: (_numHotbars - currentHotbar) + possibility.Hotbar);
: _numHotbars - currentHotbar + possibility.Hotbar);
if (cost < minCost)
{
hotbar = possibility.Hotbar;
@@ -273,8 +287,10 @@ namespace Content.Client.Actions.Assignments
AssignSlot(hotbar, slot, toAssign);
return;
}
continue;
}
// slot's empty, assign
AssignSlot(hotbar, slot, toAssign);
return;
@@ -285,7 +301,10 @@ namespace Content.Client.Actions.Assignments
private bool ShouldPreventAutoPopulate(ActionAssignment assignment, bool force)
{
if (force) return false;
if (force)
{
return false;
}
if (assignment.TryGetAction(out var actionType))
{

View File

@@ -44,7 +44,6 @@ namespace Content.Client.Actions
[ViewVariables]
private bool CurrentlyControlled => _playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity == Owner;
protected override void Shutdown()
{
base.Shutdown();

View File

@@ -68,7 +68,7 @@ namespace Content.Client.Actions.UI
_actionManager = IoCManager.Resolve<ActionManager>();
_gameHud = IoCManager.Resolve<IGameHud>();
Title = Loc.GetString("Actions");
Title = Loc.GetString("ui-actionmenu-title");
MinSize = (300, 300);
Contents.AddChild(new VBoxContainer
@@ -83,17 +83,17 @@ namespace Content.Client.Actions.UI
{
StyleClasses = { StyleNano.StyleClassActionSearchBox },
HorizontalExpand = true,
PlaceHolder = Loc.GetString("Search")
PlaceHolder = Loc.GetString("ui-actionmenu-search-bar-placeholder-text")
}),
(_filterButton = new MultiselectOptionButton<string>()
{
Label = Loc.GetString("Filter")
Label = Loc.GetString("ui-actionmenu-filter-buttonr")
})
}
},
(_clearButton = new Button
{
Text = Loc.GetString("Clear"),
Text = Loc.GetString("ui-actionmenu-clear-button"),
}),
(_filterLabel = new Label()),
new ScrollContainer
@@ -353,7 +353,8 @@ namespace Content.Client.Actions.UI
else
{
_filterLabel.Visible = true;
_filterLabel.Text = Loc.GetString("Filters: {0}", string.Join(", ", _filterButton.SelectedLabels));
_filterLabel.Text = Loc.GetString("ui-actionmenu-filter-label",
("selectedLabels", string.Join(", ", _filterButton.SelectedLabels)));
}
}
@@ -430,7 +431,7 @@ namespace Content.Client.Actions.UI
/// </summary>
private static string Standardize(string rawText, bool splitOnCaseChange = false)
{
rawText ??= "";
rawText ??= string.Empty;
// treat non-alphanumeric characters as whitespace
rawText = NonAlphanumeric.Replace(rawText, " ");

View File

@@ -131,7 +131,7 @@ namespace Content.Client.Actions.UI
VerticalAlignment = VAlignment.Center,
SizeFlagsStretchRatio = 1,
Scale = (0.5f, 0.5f),
ToolTip = Loc.GetString("ui-actionmenu-function-lock-action-slots"),
ToolTip = Loc.GetString("ui-actionsui-function-lock-action-slots"),
TooltipDelay = CustomTooltipDelay
};
settingsContainer.AddChild(_lockButton);
@@ -143,7 +143,7 @@ namespace Content.Client.Actions.UI
VerticalAlignment = VAlignment.Center,
SizeFlagsStretchRatio = 1,
Scale = (0.5f, 0.5f),
ToolTip = Loc.GetString("ui-actionmenu-function-open-abilities-menu"),
ToolTip = Loc.GetString("ui-actionsui-function-open-abilities-menu"),
TooltipDelay = CustomTooltipDelay
};
settingsContainer.AddChild(_settingsButton);

View File

@@ -1,4 +1,4 @@
using Content.Client.Eui;
using Content.Client.Eui;
using Content.Shared.Administration;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Eui;
@@ -63,7 +63,7 @@ namespace Content.Client.Administration.UI
{
_eui = eui;
Title = Loc.GetString("Add reagent...");
Title = Loc.GetString("admin-add-reagent-eui-title");
Contents.AddChild(new VBoxContainer
{
@@ -74,14 +74,14 @@ namespace Content.Client.Administration.UI
Columns = 2,
Children =
{
new Label {Text = Loc.GetString("Cur volume: ")},
new Label {Text = Loc.GetString("admin-add-reagent-eui-current-volume-label") + " "},
(_volumeLabel = new Label()),
new Label {Text = Loc.GetString("Reagent: ")},
(_reagentIdEdit = new LineEdit {PlaceHolder = Loc.GetString("Reagent ID...")}),
new Label {Text = Loc.GetString("Amount: ")},
new Label {Text = Loc.GetString("admin-add-reagent-eui-reagent-label") + " "},
(_reagentIdEdit = new LineEdit {PlaceHolder = Loc.GetString("admin-add-reagent-eui-reagent-id-edit")}),
new Label {Text = Loc.GetString("admin-add-reagent-eui-amount-label") + " "},
(_amountEdit = new LineEdit
{
PlaceHolder = Loc.GetString("A number..."),
PlaceHolder = Loc.GetString("admin-add-reagent-eui-amount-edit"),
HorizontalExpand = true
}),
},
@@ -98,8 +98,8 @@ namespace Content.Client.Administration.UI
ClipText = true
}),
(_addButton = new Button {Text = Loc.GetString("Add")}),
(_addCloseButton = new Button {Text = Loc.GetString("Add & Close")})
(_addButton = new Button {Text = Loc.GetString("admin-add-reagent-eui-add-button")}),
(_addCloseButton = new Button {Text = Loc.GetString("admin-add-reagent-eui-add-close-button")})
}
}
}
@@ -125,31 +125,32 @@ namespace Content.Client.Administration.UI
{
if (string.IsNullOrWhiteSpace(_reagentIdEdit.Text))
{
DoError(Loc.GetString("Must specify reagent ID"));
DoError(Loc.GetString("admin-add-reagent-eui-no-reagent-id-error"));
return;
}
if (!_eui._prototypes.HasIndex<ReagentPrototype>(_reagentIdEdit.Text))
{
DoError(Loc.GetString("'{0}' does not exist.", _reagentIdEdit.Text));
DoError(Loc.GetString("admin-add-reagent-eui-reagent-does-not-exist-error",
("reagent", _reagentIdEdit.Text)));
return;
}
if (string.IsNullOrWhiteSpace(_amountEdit.Text))
{
DoError(Loc.GetString("Must specify reagent amount"));
DoError(Loc.GetString("admin-add-reagent-eui-no-reagent-amount-specified-error"));
return;
}
if (!float.TryParse(_amountEdit.Text, out _))
{
DoError(Loc.GetString("Invalid amount"));
DoError(Loc.GetString("admin-add-reagent-eui-invalid-amount-error"));
return;
}
_addButton.Disabled = false;
_addCloseButton.Disabled = false;
_errorLabel.Text = "";
_errorLabel.Text = string.Empty;
void DoError(string text)
{
@@ -162,7 +163,9 @@ namespace Content.Client.Administration.UI
public void HandleState(AdminAddReagentEuiState state)
{
_volumeLabel.Text = Loc.GetString("{0}/{1}u", state.CurVolume, state.MaxVolume);
_volumeLabel.Text = Loc.GetString("admin-add-reagent-eui-current-and-max-volume-label",
("currentVolume", state.CurVolume),
("maxVolume" ,state.MaxVolume));
}
}
}

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System.Collections.Generic;
using Content.Client.Administration.UI.Tabs;
using Content.Client.HUD;
@@ -25,15 +25,15 @@ namespace Content.Client.Administration.UI
public AdminMenuWindow()
{
MinSize = SetSize = (500, 250);
Title = Loc.GetString("Admin Menu");
Title = Loc.GetString("admin-menu-title");
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
MasterTabContainer.SetTabTitle(0, Loc.GetString("Admin"));
MasterTabContainer.SetTabTitle(1, Loc.GetString("Adminbus"));
MasterTabContainer.SetTabTitle(2, Loc.GetString("Atmos"));
MasterTabContainer.SetTabTitle(3, Loc.GetString("Round"));
MasterTabContainer.SetTabTitle(4, Loc.GetString("Server"));
MasterTabContainer.SetTabTitle(5, Loc.GetString("Players"));
MasterTabContainer.SetTabTitle(0, Loc.GetString("admin-menu-admin-tab"));
MasterTabContainer.SetTabTitle(1, Loc.GetString("admin-menu-adminbus-tab"));
MasterTabContainer.SetTabTitle(2, Loc.GetString("admin-menu-atmos-tab"));
MasterTabContainer.SetTabTitle(3, Loc.GetString("admin-menu-round-tab"));
MasterTabContainer.SetTabTitle(4, Loc.GetString("admin-menu-server-tab"));
MasterTabContainer.SetTabTitle(5, Loc.GetString("admin-menu-players-tab"));
}
protected override void EnteredTree()

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Content.Client.Administration.Managers;
using Content.Client.Eui;
@@ -207,7 +207,7 @@ namespace Content.Client.Administration.UI
al.AddChild(new Label {Text = name});
var titleControl = new Label {Text = admin.Title ?? Loc.GetString("none")};
var titleControl = new Label {Text = admin.Title ?? Loc.GetString("permissions-eui-edit-admin-title-control-text").ToLowerInvariant()};
if (admin.Title == null) // none
{
titleControl.StyleClasses.Add(StyleBase.StyleClassItalic);
@@ -228,7 +228,7 @@ namespace Content.Client.Administration.UI
else
{
italic = true;
rank = Loc.GetString("none");
rank = Loc.GetString("permissions-eui-edit-no-rank-text").ToLowerInvariant();
}
var rankControl = new Label {Text = rank};
@@ -248,14 +248,14 @@ namespace Content.Client.Administration.UI
HorizontalAlignment = Control.HAlignment.Center,
});
var editButton = new Button {Text = Loc.GetString("Edit")};
var editButton = new Button {Text = Loc.GetString("permissions-eui-edit-title-button") };
editButton.OnPressed += _ => OnEditPressed(admin);
al.AddChild(editButton);
if (!_adminManager.HasFlag(combinedFlags))
{
editButton.Disabled = true;
editButton.ToolTip = Loc.GetString("You do not have the required flags to edit this admin.");
editButton.ToolTip = Loc.GetString("permissions-eui-do-not-have-required-flags-to-edit-admin-tooltip");
}
}
@@ -271,14 +271,14 @@ namespace Content.Client.Administration.UI
HorizontalExpand = true,
HorizontalAlignment = Control.HAlignment.Center,
});
var editButton = new Button {Text = Loc.GetString("Edit")};
var editButton = new Button {Text = Loc.GetString("permissions-eui-edit-admin-rank-button") };
editButton.OnPressed += _ => OnEditRankPressed(kv);
_menu.AdminRanksList.AddChild(editButton);
if (!_adminManager.HasFlag(rank.Flags))
{
editButton.Disabled = true;
editButton.ToolTip = Loc.GetString("You do not have the required flags to edit this rank.");
editButton.ToolTip = Loc.GetString("permissions-eui-do-not-have-required-flags-to-edit-rank-tooltip");
}
}
}
@@ -299,19 +299,19 @@ namespace Content.Client.Administration.UI
public Menu(PermissionsEui ui)
{
_ui = ui;
Title = Loc.GetString("Permissions Panel");
Title = Loc.GetString("permissions-eui-menu-title");
var tab = new TabContainer();
AddAdminButton = new Button
{
Text = Loc.GetString("Add Admin"),
Text = Loc.GetString("permissions-eui-menu-add-admin-button"),
HorizontalAlignment = HAlignment.Right
};
AddAdminRankButton = new Button
{
Text = Loc.GetString("Add Admin Rank"),
Text = Loc.GetString("permissions-eui-menu-add-admin-rank-button"),
HorizontalAlignment = HAlignment.Right
};
@@ -320,14 +320,14 @@ namespace Content.Client.Administration.UI
{
Children = {AdminsList, AddAdminButton},
};
TabContainer.SetTabTitle(adminVBox, Loc.GetString("Admins"));
TabContainer.SetTabTitle(adminVBox, Loc.GetString("permissions-eui-menu-admins-tab-title"));
AdminRanksList = new GridContainer {Columns = 3};
var rankVBox = new VBoxContainer
{
Children = { AdminRanksList, AddAdminRankButton}
};
TabContainer.SetTabTitle(rankVBox, Loc.GetString("Admin Ranks"));
TabContainer.SetTabTitle(rankVBox, Loc.GetString("permissions-eui-menu-admin-ranks-tab-title"));
tab.AddChild(adminVBox);
tab.AddChild(rankVBox);
@@ -360,22 +360,23 @@ namespace Content.Client.Administration.UI
if (data is { } dat)
{
var name = dat.UserName ?? dat.UserId.ToString();
Title = Loc.GetString("Edit admin {0}", name);
Title = Loc.GetString("permissions-eui-edit-admin-window-edit-admin-label",
("admin", name));
nameControl = new Label {Text = name};
}
else
{
Title = Loc.GetString("Add admin");
Title = Loc.GetString("permissions-eui-menu-add-admin-button");
nameControl = NameEdit = new LineEdit {PlaceHolder = Loc.GetString("Username/User ID")};
nameControl = NameEdit = new LineEdit {PlaceHolder = Loc.GetString("permissions-eui-edit-admin-window-name-edit-placeholder") };
}
TitleEdit = new LineEdit {PlaceHolder = Loc.GetString("Custom title, leave blank to inherit rank title.")};
TitleEdit = new LineEdit {PlaceHolder = Loc.GetString("permissions-eui-edit-admin-window-title-edit-placeholder") };
RankButton = new OptionButton();
SaveButton = new Button {Text = Loc.GetString("Save"), HorizontalAlignment = HAlignment.Right};
SaveButton = new Button {Text = Loc.GetString("permissions-eui-edit-admin-window-save-button"), HorizontalAlignment = HAlignment.Right};
RankButton.AddItem(Loc.GetString("No rank"), NoRank);
RankButton.AddItem(Loc.GetString("permissions-eui-edit-admin-window-no-rank-button"), NoRank);
foreach (var (rId, rank) in ui._ranks)
{
RankButton.AddItem(rank.Name, rId);
@@ -454,7 +455,7 @@ namespace Content.Client.Administration.UI
if (data != null)
{
// show remove button.
RemoveButton = new Button {Text = Loc.GetString("Remove")};
RemoveButton = new Button {Text = Loc.GetString("permissions-eui-edit-admin-window-remove-flag-button") };
bottomButtons.AddChild(RemoveButton);
}
@@ -527,7 +528,7 @@ namespace Content.Client.Administration.UI
NameEdit = new LineEdit
{
PlaceHolder = Loc.GetString("Rank name"),
PlaceHolder = Loc.GetString("permissions-eui-edit-admin-rank-window-name-edit-placeholder"),
};
if (data != null)
@@ -536,7 +537,7 @@ namespace Content.Client.Administration.UI
}
SaveButton = new Button {
Text = Loc.GetString("Save"),
Text = Loc.GetString("permissions-eui-menu-save-admin-rank-button"),
HorizontalAlignment = HAlignment.Right,
HorizontalExpand = true
};
@@ -568,7 +569,7 @@ namespace Content.Client.Administration.UI
if (data != null)
{
// show remove button.
RemoveButton = new Button {Text = Loc.GetString("Remove")};
RemoveButton = new Button {Text = Loc.GetString("permissions-eui-menu-remove-admin-rank-button") };
bottomButtons.AddChild(RemoveButton);
}

View File

@@ -26,9 +26,9 @@ namespace Content.Client.Administration.UI.SetOutfit
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);
Title = Loc.GetString("Set Outfit");
Title = Loc.GetString("set-outfit-menu-title");
ConfirmButton.Text = Loc.GetString("Confirm");
ConfirmButton.Text = Loc.GetString("set-outfit-menu-confirm-button");
ConfirmButton.OnPressed += ConfirmButtonOnOnPressed;
SearchBar.OnTextChanged += SearchBarOnOnTextChanged;
OutfitList.OnItemSelected += OutfitListOnOnItemSelected;

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using System.Collections.Generic;
using System.Linq;
using Content.Client.StationEvents.Managers;
@@ -21,7 +21,7 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab
protected override void EnteredTree()
{
_data = IoCManager.Resolve<IStationEventManager>().StationEvents.ToList();
_data.Add(_data.Any() ? Loc.GetString("Not loaded") : Loc.GetString("Random"));
_data.Add(_data.Any() ? Loc.GetString("station-events-window-not-loaded-text") : Loc.GetString("station-events-window-random-text"));
foreach (var stationEvent in _data)
{
EventsOptions.AddItem(stationEvent);

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Content.Client.Arcade.UI;
@@ -114,7 +114,7 @@ namespace Content.Client.Arcade
_pauseButton = new Button
{
Text = Loc.GetString("Pause"),
Text = Loc.GetString("blockgame-menu-button-pause"),
TextAlign = Label.AlignMode.Center
};
_pauseButton.OnPressed += (e) => TryPause();

View File

@@ -29,7 +29,7 @@ namespace Content.Client.Atmos.UI
var resourceCache = IoCManager.Resolve<IResourceCache>();
Owner = owner;
var rootContainer = new LayoutContainer {Name = "WireRoot"};
var rootContainer = new LayoutContainer { Name = "WireRoot" };
AddChild(rootContainer);
MouseFilter = MouseFilterMode.Stop;
@@ -85,7 +85,7 @@ namespace Content.Client.Atmos.UI
{
(_nameLabel = new Label
{
Text = Loc.GetString("Gas Analyzer"),
Text = Loc.GetString("gas-analyzer-window-name"),
FontOverride = font,
FontColorOverride = StyleNano.NanoGold,
VerticalAlignment = VAlignment.Center
@@ -95,7 +95,7 @@ namespace Content.Client.Atmos.UI
MinSize = (20, 0),
HorizontalExpand = true,
},
(refreshButton = new Button {Text = "Refresh"}), //TODO: refresh icon?
(refreshButton = new Button {Text = "gas-analyzer-window-refresh-button"}), //TODO: refresh icon?
new Control
{
MinSize = (2, 0),
@@ -115,7 +115,7 @@ namespace Content.Client.Atmos.UI
var middle = new PanelContainer
{
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#202025")},
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.FromHex("#202025") },
Children =
{
(_statusContainer = new VBoxContainer
@@ -129,13 +129,13 @@ namespace Content.Client.Atmos.UI
_topContainer.AddChild(new PanelContainer
{
MinSize = (0, 2),
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#525252ff")}
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.FromHex("#525252ff") }
});
_topContainer.AddChild(middle);
_topContainer.AddChild(new PanelContainer
{
MinSize = (0, 2),
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.FromHex("#525252ff")}
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.FromHex("#525252ff") }
});
CloseButton.OnPressed += _ => Close();
SetSize = (300, 200);
@@ -149,7 +149,7 @@ namespace Content.Client.Atmos.UI
{
_statusContainer.AddChild(new Label
{
Text = Loc.GetString("Error: {0}", state.Error),
Text = Loc.GetString("gas-analyzer-window-error-text", ("errorText", state.Error)),
FontColorOverride = Color.Red
});
return;
@@ -157,12 +157,13 @@ namespace Content.Client.Atmos.UI
_statusContainer.AddChild(new Label
{
Text = Loc.GetString("Pressure: {0:0.##} kPa", state.Pressure)
Text = Loc.GetString("gas-analyzer-window-pressure-text", ("pressure", $"{state.Pressure:0.##}"))
});
_statusContainer.AddChild(new Label
{
Text = Loc.GetString("Temperature: {0:0.#}K ({1:0.#}°C)", state.Temperature,
TemperatureHelpers.KelvinToCelsius(state.Temperature))
Text = Loc.GetString("gas-analyzer-window-temperature-text",
("tempK", $"{state.Temperature:0.#}"),
("tempC", $"{TemperatureHelpers.KelvinToCelsius(state.Temperature):0.#}"))
});
// Return here cause all that stuff down there is gas stuff (so we don't get the seperators)
if (state.Gases == null || state.Gases.Length == 0)
@@ -222,7 +223,7 @@ namespace Content.Client.Atmos.UI
});
tableVal.AddChild(new Label
{
Text = Loc.GetString("{0:0.##} mol", gas.Amount)
Text = Loc.GetString("gas-analyzer-window-molality-text", ("mol", $"{gas.Amount:0.##}"))
});
// Add to the gas bar //TODO: highlight the currently hover one
@@ -230,8 +231,10 @@ namespace Content.Client.Atmos.UI
var right = (i == state.Gases.Length - 1) ? 0f : 2f;
gasBar.AddChild(new PanelContainer
{
ToolTip = Loc.GetString("{0}: {1:0.##} mol ({2:0.#}%)", gas.Name, gas.Amount,
(gas.Amount / totalGasAmount) * 100),
ToolTip = Loc.GetString("gas-analyzer-window-molality-percentage-text",
("gasName", gas.Name),
("amount", $"{gas.Amount:0.##}"),
("percentage", $"{(gas.Amount / totalGasAmount * 100):0.#}")),
HorizontalExpand = true,
SizeFlagsStretchRatio = gas.Amount,
MouseFilter = MouseFilterMode.Pass,

View File

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Shared.Body.Components;
using Content.Shared.Body.Mechanism;
using Content.Shared.Body.Part;
@@ -23,7 +23,7 @@ namespace Content.Client.Body.UI
{
IoCManager.InjectDependencies(this);
Owner = owner;
Title = Loc.GetString("Body Scanner");
Title = Loc.GetString("body-scanner-display-title");
var hSplit = new HBoxContainer
{
@@ -57,7 +57,7 @@ namespace Content.Client.Body.UI
{
new Label
{
Text = "Health: "
Text = $"{Loc.GetString("body-scanner-display-health-label")} "
},
(BodyPartHealth = new Label())
}
@@ -144,7 +144,7 @@ namespace Content.Client.Body.UI
// TODO BODY Part damage
if (part.Owner.TryGetComponent(out IDamageableComponent? damageable))
{
BodyPartHealth.Text = Loc.GetString("{0} damage", damageable.TotalDamage);
BodyPartHealth.Text = Loc.GetString("body-scanner-display-body-part-damage-text",("damage", damageable.TotalDamage));
}
MechanismList.Clear();

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
@@ -18,7 +18,7 @@ namespace Content.Client.Body.UI
public SurgeryWindow()
{
MinSize = SetSize = (300, 400);
Title = Loc.GetString("Surgery");
Title = Loc.GetString("surgery-window-title");
RectClipContent = true;
var vSplitContainer = new VBoxContainer
@@ -105,7 +105,7 @@ namespace Content.Client.Body.UI
(DisplayText = new Label
{
VerticalAlignment = VAlignment.Center,
Text = "N/A",
Text = Loc.GetString("surgery-window-not-available-button-text"),
}),
(new Control
{

View File

@@ -1,4 +1,5 @@
using System;
#nullable enable
using System;
using System.Collections.Generic;
using Content.Client.Stylesheets;
using Content.Shared.Cargo;
@@ -45,19 +46,19 @@ namespace Content.Client.Cargo.UI
Owner = owner;
if (Owner.RequestOnly)
Title = Loc.GetString("Cargo Request Console");
Title = Loc.GetString("cargo-console-menu-request-only-title");
else
Title = Loc.GetString("Cargo Shuttle Console");
Title = Loc.GetString("cargo-console-menu-title");
var rows = new VBoxContainer();
var accountName = new HBoxContainer();
var accountNameLabel = new Label {
Text = Loc.GetString("Account Name: "),
Text = Loc.GetString("cargo-console-menu-account-name-label") + " ",
StyleClasses = { StyleNano.StyleClassLabelKeyText }
};
_accountNameLabel = new Label {
Text = "None" //Owner.Bank.Account.Name
Text = Loc.GetString("cargo-console-menu-account-name-none-text") //Owner.Bank.Account.Name
};
accountName.AddChild(accountNameLabel);
accountName.AddChild(_accountNameLabel);
@@ -66,7 +67,7 @@ namespace Content.Client.Cargo.UI
var points = new HBoxContainer();
var pointsLabel = new Label
{
Text = Loc.GetString("Points: "),
Text = Loc.GetString("cargo-console-menu-points-label") + " ",
StyleClasses = { StyleNano.StyleClassLabelKeyText }
};
_pointsLabel = new Label
@@ -80,12 +81,12 @@ namespace Content.Client.Cargo.UI
var shuttleStatus = new HBoxContainer();
var shuttleStatusLabel = new Label
{
Text = Loc.GetString("Shuttle Status: "),
Text = Loc.GetString("cargo-console-menu-shuttle-status-label") + " ",
StyleClasses = { StyleNano.StyleClassLabelKeyText }
};
_shuttleStatusLabel = new Label
{
Text = Loc.GetString("Away") // Shuttle.Status
Text = Loc.GetString("cargo-console-menu-shuttle-status-away-text") // Shuttle.Status
};
shuttleStatus.AddChild(shuttleStatusLabel);
shuttleStatus.AddChild(_shuttleStatusLabel);
@@ -94,12 +95,12 @@ namespace Content.Client.Cargo.UI
var shuttleCapacity = new HBoxContainer();
var shuttleCapacityLabel = new Label
{
Text = Loc.GetString("Order Capacity: "),
Text = Loc.GetString("cargo-console-menu-order-capacity-label") + " ",
StyleClasses = { StyleNano.StyleClassLabelKeyText }
};
_shuttleCapacityLabel = new Label
{
Text = "0/20"
Text = $"{0}/{20}"
};
shuttleCapacity.AddChild(shuttleCapacityLabel);
shuttleCapacity.AddChild(_shuttleCapacityLabel);
@@ -109,13 +110,13 @@ namespace Content.Client.Cargo.UI
CallShuttleButton = new Button()
{
//Text = Loc.GetString("Call Shuttle"),
Text = Loc.GetString("Activate Telepad"), //Shuttle code pending
Text = Loc.GetString("cargo-console-menu-call-shuttle-button"), //Shuttle code pending
TextAlign = Label.AlignMode.Center,
HorizontalExpand = true
};
PermissionsButton = new Button()
{
Text = Loc.GetString("Permissions"),
Text = Loc.GetString("cargo-console-menu-permissions-button"),
TextAlign = Label.AlignMode.Center
};
buttons.AddChild(CallShuttleButton);
@@ -125,13 +126,13 @@ namespace Content.Client.Cargo.UI
var category = new HBoxContainer();
_categories = new OptionButton
{
Prefix = Loc.GetString("Categories: "),
Prefix = Loc.GetString("cargo-console-menu-categories-label") + " ",
HorizontalExpand = true,
SizeFlagsStretchRatio = 1
};
_searchBar = new LineEdit
{
PlaceHolder = Loc.GetString("Search"),
PlaceHolder = Loc.GetString("cargo-console-menu-search-bar-placeholder"),
HorizontalExpand = true,
SizeFlagsStretchRatio = 1
};
@@ -164,14 +165,14 @@ namespace Content.Client.Cargo.UI
VerticalExpand = true
};
var rAndOVBox = new VBoxContainer();
var requestsLabel = new Label { Text = Loc.GetString("Requests") };
var requestsLabel = new Label { Text = Loc.GetString("cargo-console-menu-requests-label") };
_requests = new VBoxContainer // replace with scroll box so that approval buttons can be added
{
StyleClasses = { "transparentItemList" },
VerticalExpand = true,
SizeFlagsStretchRatio = 1,
};
var ordersLabel = new Label { Text = Loc.GetString("Orders") };
var ordersLabel = new Label { Text = Loc.GetString("cargo-console-menu-orders-label") };
_orders = new VBoxContainer
{
StyleClasses = { "transparentItemList" },
@@ -270,7 +271,7 @@ namespace Content.Client.Cargo.UI
return;
}
_categoryStrings.Add(Loc.GetString("All"));
_categoryStrings.Add(Loc.GetString("cargo-console-menu-populate-categories-all-text"));
var search = _searchBar.Text.Trim().ToLowerInvariant();
foreach (var prototype in Owner.Market.Products)
@@ -305,13 +306,17 @@ namespace Content.Client.Cargo.UI
var row = new CargoOrderRow
{
Order = order,
Icon = {Texture = Owner.Market.GetProduct(order.ProductId)?.Icon.Frame0()},
Icon = { Texture = Owner.Market.GetProduct(order.ProductId)?.Icon.Frame0() },
ProductName =
{
Text =
$"{Owner.Market.GetProduct(order.ProductId)?.Name} (x{order.Amount}) by {order.Requester}"
Text = Loc.GetString(
"cargo-console-menu-populate-orders-cargo-order-row-product-name-text",
("productName", Owner.Market.GetProduct(order.ProductId)?.Name!),
("orderAmount", order.Amount),
("orderRequester", order.Requester))
},
Description = {Text = $"Reasons: {order.Reason}"}
Description = {Text = Loc.GetString("cargo-console-menu-order-reason-description",
("reason", order.Reason))}
};
row.Cancel.OnPressed += (args) => { OnOrderCanceled?.Invoke(args); };
if (order.Approved)
@@ -463,14 +468,14 @@ namespace Content.Client.Cargo.UI
Approve = new Button
{
Text = "Approve",
Text = Loc.GetString("cargo-console-menu-cargo-order-row-approve-button"),
StyleClasses = { StyleNano.StyleClassLabelSubText }
};
hBox.AddChild(Approve);
Cancel = new Button
{
Text = "Cancel",
Text = Loc.GetString("cargo-console-menu-cargo-order-row-cancel-button"),
StyleClasses = { StyleNano.StyleClassLabelSubText }
};
hBox.AddChild(Cancel);

View File

@@ -17,22 +17,22 @@ namespace Content.Client.Cargo.UI
{
IoCManager.InjectDependencies(this);
Title = Loc.GetString("Order Form");
Title = Loc.GetString("cargo-console-order-menu-title");
var vBox = new VBoxContainer();
var gridContainer = new GridContainer { Columns = 2 };
var requesterLabel = new Label { Text = Loc.GetString("Name:") };
var requesterLabel = new Label { Text = Loc.GetString("cargo-console-order-menu-requester-label") };
Requester = new LineEdit();
gridContainer.AddChild(requesterLabel);
gridContainer.AddChild(Requester);
var reasonLabel = new Label { Text = Loc.GetString("Reason:") };
var reasonLabel = new Label { Text = Loc.GetString("cargo-console-order-menu-reason-label:") };
Reason = new LineEdit();
gridContainer.AddChild(reasonLabel);
gridContainer.AddChild(Reason);
var amountLabel = new Label { Text = Loc.GetString("Amount:") };
var amountLabel = new Label { Text = Loc.GetString("cargo-console-order-menu-amount-label:") };
Amount = new SpinBox
{
HorizontalExpand = true,
@@ -49,7 +49,7 @@ namespace Content.Client.Cargo.UI
SubmitButton = new Button()
{
Text = Loc.GetString("OK"),
Text = Loc.GetString("cargo-console-order-menu-submit-button"),
TextAlign = Label.AlignMode.Center,
};
vBox.AddChild(SubmitButton);

View File

@@ -1,4 +1,4 @@
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
@@ -18,7 +18,7 @@ namespace Content.Client.Cargo.UI
MinSize = SetSize = (300, 300);
IoCManager.InjectDependencies(this);
Title = Loc.GetString("Galactic Bank Selection");
Title = Loc.GetString("galactic-bank-selection-menu-title");
_accounts = new ItemList() { SelectMode = ItemList.ItemListSelectMode.Single };

View File

@@ -327,7 +327,7 @@ namespace Content.Client.CharacterAppearance
public MagicMirrorWindow(MagicMirrorBoundUserInterface owner)
{
SetSize = MinSize = (500, 360);
Title = Loc.GetString("Magic Mirror");
Title = Loc.GetString("magic-mirror-window-title");
_hairStylePicker = new HairStylePicker {HorizontalExpand = true};
_hairStylePicker.OnHairStylePicked += newStyle => owner.HairSelected(newStyle, false);

View File

@@ -92,12 +92,12 @@ namespace Content.Client.CharacterInfo.Components
AddChild(new Placeholder()
{
PlaceholderText = Loc.GetString("Health & status effects")
PlaceholderText = Loc.GetString("character-info-health-and-status-effects-text")
});
AddChild(new Label
{
Text = Loc.GetString("Objectives"),
Text = Loc.GetString("character-info-objectives-label"),
HorizontalAlignment = HAlignment.Center
});
ObjectivesContainer = new VBoxContainer();
@@ -105,7 +105,7 @@ namespace Content.Client.CharacterInfo.Components
AddChild(new Placeholder()
{
PlaceholderText = Loc.GetString("Antagonist Roles")
PlaceholderText = Loc.GetString("character-info-roles-antagonist-text")
});
}

View File

@@ -357,7 +357,7 @@ namespace Content.Client.Chat.Managers
var messageText = FormattedMessage.EscapeText(message.Message);
if (!string.IsNullOrEmpty(message.MessageWrap))
{
messageText = string.Format(message.MessageWrap, messageText);
messageText = string.Format(message.MessageWrap, messageText);
}
if (message.MessageColorOverride != Color.Transparent)

View File

@@ -60,8 +60,9 @@ namespace Content.Client.Chemistry.Components
_parent._uiUpdateNeeded = false;
_label.SetMarkup(Loc.GetString(
"Volume: [color=white]{0}/{1}[/color]",
_parent.CurrentVolume, _parent.TotalVolume));
"hypospray-volume-text",
("currentVolume", _parent.CurrentVolume),
("totalVolume", _parent.TotalVolume)));
}
}
}

View File

@@ -71,12 +71,14 @@ namespace Content.Client.Chemistry.Components
//Update current volume and injector state
var modeStringLocalized = _parent.CurrentMode switch
{
InjectorToggleMode.Draw => Loc.GetString("Draw"),
InjectorToggleMode.Inject => Loc.GetString("Inject"),
_ => Loc.GetString("Invalid")
InjectorToggleMode.Draw => Loc.GetString("injector-draw-text"),
InjectorToggleMode.Inject => Loc.GetString("injector-inject-text"),
_ => Loc.GetString("injector-invalid-injector-toggle-mode")
};
_label.SetMarkup(Loc.GetString("Volume: [color=white]{0}/{1}[/color] | [color=white]{2}[/color]",
_parent.CurrentVolume, _parent.TotalVolume, modeStringLocalized));
_label.SetMarkup(Loc.GetString("injector-volume-label",
("currentVolume", _parent.CurrentVolume),
("totalVolume", _parent.TotalVolume),
("modeString", modeStringLocalized)));
}
}
}

View File

@@ -31,7 +31,7 @@ namespace Content.Client.Chemistry.UI
//Setup window layout/elements
_window = new ChemMasterWindow
{
Title = Loc.GetString("ChemMaster 4000"),
Title = Loc.GetString("chem-master-bound-user-interface-title"),
};
_window.OpenCentered();
@@ -58,7 +58,7 @@ namespace Content.Client.Chemistry.UI
{
base.UpdateState(state);
var castState = (ChemMasterBoundUserInterfaceState)state;
var castState = (ChemMasterBoundUserInterfaceState) state;
_window?.UpdateState(castState); //Update window state
}
@@ -73,7 +73,6 @@ namespace Content.Client.Chemistry.UI
{
SendMessage(new UiActionMessage(action, null, null, null, pillAmount, bottleAmount));
}
}
protected override void Dispose(bool disposing)

View File

@@ -66,9 +66,9 @@ namespace Content.Client.Chemistry.UI
{
Children =
{
new Label {Text = Loc.GetString("Container")},
new Label {Text = Loc.GetString("chem-master-window-container-label")},
new Control {HorizontalExpand = true},
(EjectButton = new Button {Text = Loc.GetString("Eject")})
(EjectButton = new Button {Text = Loc.GetString("chem-master-window-eject-button")})
}
},
//Wrap the container info in a PanelContainer so we can color it's background differently.
@@ -91,7 +91,7 @@ namespace Content.Client.Chemistry.UI
{
new Label
{
Text = Loc.GetString("No container loaded.")
Text = Loc.GetString("chem-master-window-no-container-loaded-text")
}
}
}),
@@ -106,10 +106,10 @@ namespace Content.Client.Chemistry.UI
{
Children =
{
new Label {Text = Loc.GetString("Buffer")},
new Label {Text = Loc.GetString("chem-master-window-buffer-text")},
new Control {HorizontalExpand = true},
(BufferTransferButton = new Button {Text = Loc.GetString("Transfer"), Pressed = BufferModeTransfer, StyleClasses = { StyleBase.ButtonOpenRight }}),
(BufferDiscardButton = new Button {Text = Loc.GetString("Discard"), Pressed = !BufferModeTransfer, StyleClasses = { StyleBase.ButtonOpenLeft }})
(BufferTransferButton = new Button {Text = Loc.GetString("chem-master-window-transfer-button"), Pressed = BufferModeTransfer, StyleClasses = { StyleBase.ButtonOpenRight }}),
(BufferDiscardButton = new Button {Text = Loc.GetString("chem-master-window-discard-button"), Pressed = !BufferModeTransfer, StyleClasses = { StyleBase.ButtonOpenLeft }})
}
},
@@ -133,7 +133,7 @@ namespace Content.Client.Chemistry.UI
{
new Label
{
Text = Loc.GetString("Buffer empty.")
Text = Loc.GetString("chem-master-window-buffer-empty-text")
}
}
}),
@@ -148,7 +148,7 @@ namespace Content.Client.Chemistry.UI
{
Children =
{
new Label {Text = Loc.GetString("Packaging ")},
new Label {Text = $"{Loc.GetString("chem-master-window-packaging-text")} "},
}
},
@@ -182,7 +182,7 @@ namespace Content.Client.Chemistry.UI
{
new Label
{
Text = Loc.GetString("Pills:")
Text = $"{Loc.GetString("chem-master-window-pills-label")} "
},
},
@@ -204,12 +204,12 @@ namespace Content.Client.Chemistry.UI
var pillVolume = new Label
{
Text = " max 50u/each ",
Text = $" {Loc.GetString("chem-master-window-max-pills-volume-text")} ",
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
};
PillInfo.AddChild((pillVolume));
CreatePills = new Button {Text = Loc.GetString("Create")};
CreatePills = new Button {Text = Loc.GetString("chem-master-window-create-pill-button") };
PillInfo.AddChild(CreatePills);
//Bottles
@@ -219,7 +219,7 @@ namespace Content.Client.Chemistry.UI
{
new Label
{
Text = Loc.GetString("Bottles:")
Text = Loc.GetString("cham-master-window-bottles-label")
},
},
@@ -241,12 +241,12 @@ namespace Content.Client.Chemistry.UI
var bottleVolume = new Label
{
Text = " max 30u/each ",
Text = $" {Loc.GetString("chem-master-window-max-bottle-volume-text")} ",
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
};
BottleInfo.AddChild((bottleVolume));
CreateBottles = new Button {Text = Loc.GetString("Create")};
CreateBottles = new Button {Text = Loc.GetString("chem-master-window-create-bottle-button") };
BottleInfo.AddChild(CreateBottles);
}
@@ -311,7 +311,7 @@ namespace Content.Client.Chemistry.UI
if (!state.HasBeaker)
{
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("No container loaded.")});
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("chem-master-window-no-container-loaded-text") });
return;
}
@@ -330,7 +330,7 @@ namespace Content.Client.Chemistry.UI
foreach (var reagent in state.ContainerReagents)
{
var name = Loc.GetString("Unknown reagent");
var name = Loc.GetString("chem-master-window-unknown-reagent-text");
//Try to the prototype for the given reagent. This gives us it's name.
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
{
@@ -357,7 +357,7 @@ namespace Content.Client.Chemistry.UI
MakeChemButton("5", ReagentUnit.New(5), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
MakeChemButton("10", ReagentUnit.New(10), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
MakeChemButton("25", ReagentUnit.New(25), reagent.ReagentId, false, StyleBase.ButtonOpenBoth),
MakeChemButton("All", ReagentUnit.New(-1), reagent.ReagentId, false, StyleBase.ButtonOpenLeft),
MakeChemButton(Loc.GetString("chem-master-window-buffer-all-amount"), ReagentUnit.New(-1), reagent.ReagentId, false, StyleBase.ButtonOpenLeft),
}
});
}
@@ -367,14 +367,14 @@ namespace Content.Client.Chemistry.UI
if (!state.BufferReagents.Any())
{
BufferInfo.Children.Add(new Label {Text = Loc.GetString("Buffer empty.")});
BufferInfo.Children.Add(new Label {Text = Loc.GetString("chem-master-window-buffer-empty-text") });
return;
}
var bufferHBox = new HBoxContainer();
BufferInfo.AddChild(bufferHBox);
var bufferLabel = new Label {Text = "buffer: "};
var bufferLabel = new Label { Text = $"{Loc.GetString("chem-master-window-buffer-label")} " };
bufferHBox.AddChild(bufferLabel);
var bufferVol = new Label
{
@@ -385,7 +385,7 @@ namespace Content.Client.Chemistry.UI
foreach (var reagent in state.BufferReagents)
{
var name = Loc.GetString("Unknown reagent");
var name = Loc.GetString("chem-master-window-unknown-reagent-text");
//Try to the prototype for the given reagent. This gives us it's name.
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
{
@@ -413,7 +413,7 @@ namespace Content.Client.Chemistry.UI
MakeChemButton("5", ReagentUnit.New(5), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
MakeChemButton("10", ReagentUnit.New(10), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
MakeChemButton("25", ReagentUnit.New(25), reagent.ReagentId, true, StyleBase.ButtonOpenBoth),
MakeChemButton("All", ReagentUnit.New(-1), reagent.ReagentId, true, StyleBase.ButtonOpenLeft),
MakeChemButton(Loc.GetString("chem-master-window-buffer-all-amount"), ReagentUnit.New(-1), reagent.ReagentId, true, StyleBase.ButtonOpenLeft),
}
});
}

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Chemistry.Dispenser;
using JetBrains.Annotations;
@@ -35,7 +35,7 @@ namespace Content.Client.Chemistry.UI
//Setup window layout/elements
_window = new ReagentDispenserWindow
{
Title = Loc.GetString("Reagent dispenser"),
Title = Loc.GetString("reagent-dispenser-bound-user-interface-title"),
};
_window.OpenCentered();

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Content.Client.Stylesheets;
using Content.Shared.Chemistry.Dispenser;
using Content.Shared.Chemistry.Reagent;
@@ -81,7 +81,7 @@ namespace Content.Client.Chemistry.UI
{
Children =
{
new Label {Text = Loc.GetString("Amount")},
new Label {Text = Loc.GetString("reagent-dispenser-window-amount-to-dispense-label")},
//Padding
new Control {MinSize = (20, 0)},
(DispenseButton1 = new Button {Text = "1", Group = dispenseAmountGroup, StyleClasses = { StyleBase.ButtonOpenRight }}),
@@ -108,9 +108,9 @@ namespace Content.Client.Chemistry.UI
{
Children =
{
new Label {Text = Loc.GetString("Container: ")},
(ClearButton = new Button {Text = Loc.GetString("Clear"), StyleClasses = {StyleBase.ButtonOpenRight}}),
(EjectButton = new Button {Text = Loc.GetString("Eject"), StyleClasses = {StyleBase.ButtonOpenLeft}})
new Label {Text = Loc.GetString("reagent-dispenser-window-container-label") + " "},
(ClearButton = new Button {Text = Loc.GetString("reagent-dispenser-window-clear-button"), StyleClasses = {StyleBase.ButtonOpenRight}}),
(EjectButton = new Button {Text = Loc.GetString("reagent-dispenser-window-eject-button"), StyleClasses = {StyleBase.ButtonOpenLeft}})
}
},
//Wrap the container info in a PanelContainer so we can color it's background differently.
@@ -133,7 +133,7 @@ namespace Content.Client.Chemistry.UI
{
new Label
{
Text = Loc.GetString("No container loaded.")
Text = Loc.GetString("reagent-dispenser-window-no-container-loaded-text")
}
}
}),
@@ -163,7 +163,7 @@ namespace Content.Client.Chemistry.UI
}
else
{
ChemicalList.AddChild(new Button {Text = Loc.GetString("Reagent name not found")});
ChemicalList.AddChild(new Button {Text = Loc.GetString("reagent-dispenser-window-reagent-name-not-found-text") });
}
}
}
@@ -259,7 +259,7 @@ namespace Content.Client.Chemistry.UI
if (!state.HasBeaker)
{
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("No container loaded.")});
ContainerInfo.Children.Add(new Label {Text = Loc.GetString("reagent-dispenser-window-no-container-loaded-text") });
return;
}
@@ -283,7 +283,7 @@ namespace Content.Client.Chemistry.UI
foreach (var reagent in state.ContainerReagents)
{
var name = Loc.GetString("Unknown reagent");
var name = Loc.GetString("reagent-dispenser-window-unknown-reagent-text");
//Try to the prototype for the given reagent. This gives us it's name.
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype? proto))
{
@@ -304,7 +304,7 @@ namespace Content.Client.Chemistry.UI
},
new Label
{
Text = $"{reagent.Quantity}u",
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", reagent.Quantity)),
StyleClasses = {StyleNano.StyleClassPowerStateGood}
}
}
@@ -319,7 +319,7 @@ namespace Content.Client.Chemistry.UI
new Label {Text = $"{name}: "},
new Label
{
Text = $"{reagent.Quantity}u",
Text = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", reagent.Quantity)),
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
}
}

View File

@@ -1,4 +1,4 @@
using Robust.Client.UserInterface;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization;
@@ -13,7 +13,7 @@ namespace Content.Client.Cloning.UI
public AcceptCloningWindow()
{
Title = Loc.GetString("Cloning Machine");
Title = Loc.GetString("accept-cloning-window-title");
Contents.AddChild(new VBoxContainer
{
@@ -25,7 +25,7 @@ namespace Content.Client.Cloning.UI
{
(new Label()
{
Text = Loc.GetString("You are being cloned!\nTransfer your soul to the clone body?")
Text = Loc.GetString("accept-cloning-window-prompt-text-part")
}),
new HBoxContainer
{
@@ -34,7 +34,7 @@ namespace Content.Client.Cloning.UI
{
(AcceptButton = new Button
{
Text = Loc.GetString("Yes"),
Text = Loc.GetString("accept-cloning-window-accept-button"),
}),
(new Control()
@@ -44,7 +44,7 @@ namespace Content.Client.Cloning.UI
(DenyButton = new Button
{
Text = Loc.GetString("No"),
Text = Loc.GetString("accept-cloning-window-deny-button"),
})
}
},

View File

@@ -33,7 +33,7 @@ namespace Content.Client.Cloning.UI
SetSize = MinSize = (250, 300);
_scanManager = scanManager;
Title = Loc.GetString("Cloning Machine");
Title = Loc.GetString("cloning-pod-window-title");
Contents.AddChild(new VBoxContainer
{
@@ -54,7 +54,7 @@ namespace Content.Client.Cloning.UI
{
(CloneButton = new Button
{
Text = Loc.GetString("Clone")
Text = Loc.GetString("cloning-pod-clone-button")
})
}
},
@@ -72,7 +72,7 @@ namespace Content.Client.Cloning.UI
}),
(EjectButton = new Button
{
Text = Loc.GetString("Eject Body")
Text = Loc.GetString("cloning-pod-eject-body-button")
}),
new HBoxContainer
{
@@ -80,11 +80,11 @@ namespace Content.Client.Cloning.UI
{
new Label()
{
Text = Loc.GetString("Neural Interface: ")
Text = Loc.GetString($"{Loc.GetString("cloning-pod-neural-interface-label")} ")
},
(_mindState = new Label()
{
Text = Loc.GetString("No Activity"),
Text = Loc.GetString("cloning-pod-no-activity-text"),
FontColorOverride = Color.Red
}),
}
@@ -108,7 +108,7 @@ namespace Content.Client.Cloning.UI
_cloningProgressBar.MaxValue = state.Maximum;
UpdateProgress();
_mindState.Text = Loc.GetString(state.MindPresent ? "Consciousness Detected" : "No Activity");
_mindState.Text = Loc.GetString(state.MindPresent ? "cloning-pod-mind-present-text" : "cloning-pod-no-activity-text");
_mindState.FontColorOverride = state.MindPresent ? Color.Green : Color.Red;
}
@@ -235,7 +235,7 @@ namespace Content.Client.Cloning.UI
{
VerticalAlignment = VAlignment.Center,
HorizontalExpand = true,
Text = "",
Text = string.Empty,
ClipText = true
})
}

View File

@@ -1,4 +1,4 @@
using Content.Shared.Construction.Prototypes;
using Content.Shared.Construction.Prototypes;
using Content.Shared.Examine;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -23,7 +23,7 @@ namespace Content.Client.Construction
{
if (Prototype == null) return;
message.AddMarkup(Loc.GetString("Building: [color=cyan]{0}[/color]\n", Prototype.Name));
message.AddMarkup(Loc.GetString("construction-ghost-examine-message", ("name", Prototype.Name)));
if (!_prototypeManager.TryIndex(Prototype.Graph, out ConstructionGraphPrototype? graph)) return;
var startNode = graph.Nodes[Prototype.StartNode];

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
@@ -84,9 +84,9 @@ namespace Content.Client.Construction.UI
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);
Title = Loc.GetString("Construction");
Title = Loc.GetString("construction-menu-title");
BuildButton.Text = Loc.GetString("Place construction ghost");
BuildButton.Text = Loc.GetString("construction-menu-place-ghost");
RecipesList.OnItemSelected += obj => RecipeSelected?.Invoke(this, obj.ItemList[obj.ItemIndex]);
RecipesList.OnItemDeselected += _ => RecipeSelected?.Invoke(this, null);
@@ -97,11 +97,11 @@ namespace Content.Client.Construction.UI
PopulateRecipes?.Invoke(this, (SearchBar.Text, Categories[obj.Id]));
};
BuildButton.Text = Loc.GetString("Place construction ghost");
BuildButton.Text = Loc.GetString("construction-menu-place-ghost");
BuildButton.OnToggled += args => BuildButtonToggled?.Invoke(this, args.Pressed);
ClearButton.Text = Loc.GetString("Clear All");
ClearButton.Text = Loc.GetString("construction-menu-clear-all");
ClearButton.OnPressed += _ => ClearAllGhosts?.Invoke(this, EventArgs.Empty);
EraseButton.Text = Loc.GetString("Eraser Mode");
EraseButton.Text = Loc.GetString("construction-menu-eraser-mode");
EraseButton.OnToggled += args => EraseButtonToggled?.Invoke(this, args.Pressed);
}
@@ -121,7 +121,7 @@ namespace Content.Client.Construction.UI
public void SetRecipeInfo(string name, string description, Texture iconTexture, bool isItem)
{
BuildButton.Disabled = false;
BuildButton.Text = Loc.GetString(isItem ? "Place construction ghost" : "Craft");
BuildButton.Text = Loc.GetString(isItem ? "construction-menu-place-ghost" : "construction-menu-craft");
TargetName.SetMessage(name);
TargetDesc.SetMessage(description);
TargetTexture.Texture = iconTexture;

View File

@@ -61,11 +61,11 @@ namespace Content.Client.Crayon
}
_parent._uiUpdateNeeded = false;
_label.SetMarkup(Loc.GetString("Drawing: [color={0}]{1}[/color] ({2}/{3})",
_parent.Color,
_parent.SelectedState,
_parent.Charges,
_parent.Capacity));
_label.SetMarkup(Loc.GetString("crayon-drawing-label",
("color",_parent.Color),
("state",_parent.SelectedState),
("charges", _parent.Charges),
("capacity",_parent.Capacity)));
}
}
}

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Content.Client.Stylesheets;
using Content.Shared.Crayon;
using Robust.Client.Graphics;
@@ -24,7 +24,7 @@ namespace Content.Client.Crayon.UI
public CrayonWindow(CrayonBoundUserInterface owner)
{
MinSize = SetSize = (250, 300);
Title = Loc.GetString("Crayon");
Title = Loc.GetString("crayon-window-title");
Owner = owner;
var vbox = new VBoxContainer();

View File

@@ -35,7 +35,7 @@ namespace Content.Client.Credits
{
IoCManager.InjectDependencies(this);
Title = Loc.GetString("Credits");
Title = Loc.GetString("credits-window-title");
var rootContainer = new TabContainer();
@@ -56,9 +56,9 @@ namespace Content.Client.Credits
rootContainer.AddChild(patronsList);
rootContainer.AddChild(licensesList);
TabContainer.SetTabTitle(patronsList, Loc.GetString("Patrons"));
TabContainer.SetTabTitle(ss14ContributorsList, Loc.GetString("Credits"));
TabContainer.SetTabTitle(licensesList, Loc.GetString("Open Source Licenses"));
TabContainer.SetTabTitle(patronsList, Loc.GetString("credits-window-patrons-tab"));
TabContainer.SetTabTitle(ss14ContributorsList, Loc.GetString("credits-window-ss14contributorslist-tab"));
TabContainer.SetTabTitle(licensesList, Loc.GetString("credits-window-licenses-tab"));
PopulatePatronsList(patronsList);
PopulateCredits(ss14ContributorsList);
@@ -106,7 +106,7 @@ namespace Content.Client.Credits
Button patronButton;
vBox.AddChild(patronButton = new Button
{
Text = "Become a Patron",
Text = Loc.GetString("credits-window-become-patron-button"),
HorizontalAlignment = HAlignment.Center
});
@@ -163,8 +163,8 @@ namespace Content.Client.Credits
SeparationOverride = 20,
Children =
{
new Label {Text = "Want to get on this list?"},
(contributeButton = new Button {Text = "Contribute!"})
new Label {Text = Loc.GetString("credits-window-contributor-encouragement-label") },
(contributeButton = new Button {Text = Loc.GetString("credits-window-contribute-button")})
}
});
@@ -194,10 +194,10 @@ namespace Content.Client.Credits
vBox.AddChild(label);
}
AddSection("Space Station 14 Contributors", "GitHub.txt");
AddSection("Space Station 13 Codebases", "SpaceStation13.txt");
AddSection("Original Space Station 13 Remake Team", "OriginalRemake.txt");
AddSection("Special Thanks", "SpecialThanks.txt", true);
AddSection(Loc.GetString("credits-window-contributors-section-title"), "GitHub.txt");
AddSection(Loc.GetString("credits-window-codebases-section-title"), "SpaceStation13.txt");
AddSection(Loc.GetString("credits-window-original-remake-team-section-title"), "OriginalRemake.txt");
AddSection(Loc.GetString("credits-window-special-thanks-section-title"), "SpecialThanks.txt", true);
contributorsList.AddChild(vBox);
@@ -205,6 +205,7 @@ namespace Content.Client.Credits
IoCManager.Resolve<IUriOpener>().OpenUri(UILinks.GitHub);
}
// TODO this doesn't looked used anywhere
private static IEnumerable<string> Lines(TextReader reader)
{
while (true)

View File

@@ -44,9 +44,9 @@ namespace Content.Client.Disposal.UI
{
Children =
{
new Label {Text = Loc.GetString("State: ")},
new Label {Text = $"{Loc.GetString("disposal-mailing-unit-window-state-label")} "},
new Control {MinSize = (4, 0)},
(_unitState = new Label {Text = Loc.GetString("Ready")})
(_unitState = new Label {Text = Loc.GetString("disposal-mailing-unit-window-ready-state")})
}
},
new Control {MinSize = (0, 10)},
@@ -55,7 +55,7 @@ namespace Content.Client.Disposal.UI
HorizontalExpand = true,
Children =
{
new Label {Text = Loc.GetString("Pressure:")},
new Label {Text = Loc.GetString("disposal-mailing-unit-pressure-label")},
new Control {MinSize = (4, 0)},
(_pressureBar = new ProgressBar
{
@@ -78,7 +78,7 @@ namespace Content.Client.Disposal.UI
HorizontalExpand = true,
Children =
{
new Label {Text = Loc.GetString("Handle:")},
new Label {Text = Loc.GetString("disposal-mailing-unit-handle-label")},
new Control
{
MinSize = (4, 0),
@@ -87,7 +87,7 @@ namespace Content.Client.Disposal.UI
(Engage = new Button
{
MinSize = (16, 0),
Text = Loc.GetString("Engage"),
Text = Loc.GetString("disposal-mailing-unit-engage-button"),
ToggleMode = true,
Disabled = true
})
@@ -99,7 +99,7 @@ namespace Content.Client.Disposal.UI
HorizontalExpand = true,
Children =
{
new Label {Text = Loc.GetString("Eject:")},
new Label {Text = Loc.GetString("disposal-mailing-unit-eject-label")},
new Control
{
MinSize = (4, 0),
@@ -108,7 +108,7 @@ namespace Content.Client.Disposal.UI
(Eject = new Button
{
MinSize = (16, 0),
Text = Loc.GetString("Eject Contents"),
Text = Loc.GetString("disposal-mailing-unit-eject-button"),
//HorizontalAlignment = HAlignment.Right
})
}
@@ -118,7 +118,7 @@ namespace Content.Client.Disposal.UI
{
Children =
{
(Power = new CheckButton {Text = Loc.GetString("Power")}),
(Power = new CheckButton {Text = Loc.GetString("disposal-mailing-unit-power-button")}),
}
}
}
@@ -134,7 +134,7 @@ namespace Content.Client.Disposal.UI
{
new Label
{
Text = Loc.GetString("Select a destination:")
Text = Loc.GetString("disposal-mailing-unit-destination-select-label")
}
}
},
@@ -176,7 +176,7 @@ namespace Content.Client.Disposal.UI
{
new Label
{
Text = Loc.GetString("This unit:")
Text = Loc.GetString("disposal-mailing-unit-unit-self-reference")
},
new Control
{

View File

@@ -1,4 +1,4 @@
using Content.Shared.Disposal.Components;
using Content.Shared.Disposal.Components;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
@@ -18,13 +18,13 @@ namespace Content.Client.Disposal.UI
public DisposalRouterWindow()
{
MinSize = SetSize = (500, 110);
Title = Loc.GetString("Disposal Router");
Title = Loc.GetString("disposal-router-window-title");
Contents.AddChild(new VBoxContainer
{
Children =
{
new Label {Text = Loc.GetString("Tags:")},
new Label {Text = Loc.GetString("disposal-router-window-tags-label")},
new Control {MinSize = (0, 10)},
new HBoxContainer
{
@@ -34,11 +34,11 @@ namespace Content.Client.Disposal.UI
{
HorizontalExpand = true,
MinSize = (320, 0),
ToolTip = Loc.GetString("A comma separated list of tags"),
ToolTip = Loc.GetString("disposal-router-window-tag-input-tooltip"),
IsValid = tags => TagRegex.IsMatch(tags)
}),
new Control {MinSize = (10, 0)},
(Confirm = new Button {Text = Loc.GetString("Confirm")})
(Confirm = new Button {Text = Loc.GetString("disposal-router-window-tag-input-confirm-button")})
}
}
}

View File

@@ -1,4 +1,4 @@
using Content.Shared.Disposal.Components;
using Content.Shared.Disposal.Components;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
@@ -18,13 +18,13 @@ namespace Content.Client.Disposal.UI
public DisposalTaggerWindow()
{
MinSize = SetSize = (500, 110);
Title = Loc.GetString("Disposal Tagger");
Title = Loc.GetString("disposal-tagger-window-title");
Contents.AddChild(new VBoxContainer
{
Children =
{
new Label {Text = Loc.GetString("Tag:")},
new Label {Text = Loc.GetString("disposal-tagger-window-tag-input-label")},
new Control {MinSize = (0, 10)},
new HBoxContainer
{
@@ -37,7 +37,7 @@ namespace Content.Client.Disposal.UI
IsValid = tag => TagRegex.IsMatch(tag)
}),
new Control {MinSize = (10, 0)},
(Confirm = new Button {Text = Loc.GetString("Confirm")})
(Confirm = new Button {Text = Loc.GetString("disposal-tagger-window-tag-confirm-button")})
}
}
}

View File

@@ -343,7 +343,7 @@ namespace Content.Client.DragDrop
if (outOfRange)
{
_playerManager.LocalPlayer?.ControlledEntity?.PopupMessage(Loc.GetString("You can't reach there!"));
_playerManager.LocalPlayer?.ControlledEntity?.PopupMessage(Loc.GetString("drag-drop-system-out-of-range-text"));
}
_dragDropHelper.EndDrag();

View File

@@ -14,7 +14,7 @@ namespace Content.Client.Examine
public override void GetData(IEntity user, IEntity target, VerbData data)
{
data.Visibility = VerbVisibility.Visible;
data.Text = Loc.GetString("Examine");
data.Text = Loc.GetString("examine-verb-name");
data.IconTexture = "/Textures/Interface/VerbIcons/examine.svg.192dpi.png";
}

View File

@@ -13,9 +13,9 @@ namespace Content.Client.Ghost
{
public class GhostGui : Control
{
private readonly Button _returnToBody = new() {Text = Loc.GetString("Return to body")};
private readonly Button _ghostWarp = new() {Text = Loc.GetString("Ghost Warp")};
private readonly Button _ghostRoles = new() {Text = Loc.GetString("Ghost Roles")};
private readonly Button _returnToBody = new() {Text = Loc.GetString("ghost-gui-return-to-body-button") };
private readonly Button _ghostWarp = new() {Text = Loc.GetString("ghost-gui-ghost-warp-button") };
private readonly Button _ghostRoles = new() {Text = Loc.GetString("ghost-gui-ghost-roles-button") };
private readonly GhostComponent _owner;
public GhostTargetWindow? TargetWindow { get; }
@@ -86,7 +86,7 @@ namespace Content.Client.Ghost
public GhostTargetWindow(GhostComponent owner, IEntityNetworkManager netManager)
{
MinSize = SetSize = (300, 450);
Title = "Ghost Warp";
Title = Loc.GetString("ghost-target-window-title");
_owner = owner;
_netManager = netManager;
@@ -146,7 +146,7 @@ namespace Content.Client.Ghost
{
var currentButtonRef = new Button
{
Text = $"Warp: {name}",
Text = Loc.GetString("ghost-target-window-current-button", ("name", name)),
TextAlign = Label.AlignMode.Right,
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center,

View File

@@ -71,7 +71,7 @@ namespace Content.Client.Gravity
Owner = ui;
Title = Loc.GetString("Gravity Generator Control");
Title = Loc.GetString("gravity-generator-window-title");
var vBox = new VBoxContainer
{
@@ -79,12 +79,12 @@ namespace Content.Client.Gravity
};
Status = new Label
{
Text = Loc.GetString("Current Status: " + (Owner.IsOn ? "On" : "Off")),
Text = $"{Loc.GetString("gravity-generator-window-status-label")} {Loc.GetString(Owner.IsOn ? "gravity-generator-window-is-on" : "gravity-generator-window-is-off")}",
FontColorOverride = Owner.IsOn ? Color.ForestGreen : Color.Red
};
Switch = new Button
{
Text = Loc.GetString(Owner.IsOn ? "Turn Off" : "Turn On"),
Text = Loc.GetString(Owner.IsOn ? "gravity-generator-window-turn-off-button" : "gravity-generator-window-turn-on-button"),
TextAlign = Label.AlignMode.Center,
MinSize = new Vector2(150, 60)
};
@@ -97,9 +97,9 @@ namespace Content.Client.Gravity
public void UpdateButton()
{
Status.Text = Loc.GetString("Current Status: " + (Owner.IsOn ? "On" : "Off"));
Status.Text = $"{Loc.GetString("gravity-generator-window-status-label")} {Loc.GetString(Owner.IsOn ? "gravity-generator-window-is-on" : "gravity-generator-window-is-off")}";
Status.FontColorOverride = Owner.IsOn ? Color.ForestGreen : Color.Red;
Switch.Text = Loc.GetString(Owner.IsOn ? "Turn Off" : "Turn On");
Switch.Text = Loc.GetString(Owner.IsOn ? "gravity-generator-window-turn-off-button" : "gravity-generator-window-turn-on-button");
}
}
}

View File

@@ -200,7 +200,7 @@ namespace Content.Client.HUD
// Escape
_buttonEscapeMenu = new TopButton(escapeTexture, EngineKeyFunctions.EscapeMenu, _inputManager)
{
ToolTip = Loc.GetString("Open escape menu."),
ToolTip = Loc.GetString("game-hud-open-escape-menu-button-tooltip"),
MinSize = (70, 64),
StyleClasses = {StyleBase.ButtonOpenRight}
};
@@ -212,7 +212,7 @@ namespace Content.Client.HUD
// Character
_buttonCharacterMenu = new TopButton(characterTexture, ContentKeyFunctions.OpenCharacterMenu, _inputManager)
{
ToolTip = Loc.GetString("Open character menu."),
ToolTip = Loc.GetString("game-hud-open-character-menu-button-tooltip"),
MinSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
@@ -225,7 +225,7 @@ namespace Content.Client.HUD
// Inventory
_buttonInventoryMenu = new TopButton(inventoryTexture, ContentKeyFunctions.OpenInventoryMenu, _inputManager)
{
ToolTip = Loc.GetString("Open inventory menu."),
ToolTip = Loc.GetString("game-hud-open-inventory-menu-button-tooltip"),
MinSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
@@ -238,7 +238,7 @@ namespace Content.Client.HUD
// Crafting
_buttonCraftingMenu = new TopButton(craftingTexture, ContentKeyFunctions.OpenCraftingMenu, _inputManager)
{
ToolTip = Loc.GetString("Open crafting menu."),
ToolTip = Loc.GetString("game-hud-open-crafting-menu-button-tooltip"),
MinSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
@@ -251,7 +251,7 @@ namespace Content.Client.HUD
// Actions
_buttonActionsMenu = new TopButton(actionsTexture, ContentKeyFunctions.OpenActionsMenu, _inputManager)
{
ToolTip = Loc.GetString("Open actions menu."),
ToolTip = Loc.GetString("game-hud-open-actions-menu-button-tooltip"),
MinSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
@@ -264,7 +264,7 @@ namespace Content.Client.HUD
// Admin
_buttonAdminMenu = new TopButton(adminTexture, ContentKeyFunctions.OpenAdminMenu, _inputManager)
{
ToolTip = Loc.GetString("Open admin menu."),
ToolTip = Loc.GetString("game-hud-open-admin-menu-button-tooltip"),
MinSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
@@ -277,7 +277,7 @@ namespace Content.Client.HUD
// Sandbox
_buttonSandboxMenu = new TopButton(sandboxTexture, ContentKeyFunctions.OpenSandboxWindow, _inputManager)
{
ToolTip = Loc.GetString("Open sandbox menu."),
ToolTip = Loc.GetString("game-hud-open-sandbox-menu-button-tooltip"),
MinSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}

View File

@@ -1,4 +1,4 @@
using Content.Client.Changelog;
using Content.Client.Changelog;
using Content.Client.Credits;
using Content.Client.Links;
using Robust.Client.UserInterface;
@@ -26,16 +26,16 @@ namespace Content.Client.Info
var uriOpener = IoCManager.Resolve<IUriOpener>();
var discordButton = new Button {Text = Loc.GetString("Discord")};
var discordButton = new Button {Text = Loc.GetString("server-info-discord-button") };
discordButton.OnPressed += args => uriOpener.OpenUri(UILinks.Discord);
var websiteButton = new Button {Text = Loc.GetString("Website")};
var websiteButton = new Button {Text = Loc.GetString("server-info-website-button") };
websiteButton.OnPressed += args => uriOpener.OpenUri(UILinks.Website);
var reportButton = new Button { Text = Loc.GetString("Report Bugs") };
var reportButton = new Button { Text = Loc.GetString("server-info-report-button") };
reportButton.OnPressed += args => uriOpener.OpenUri(UILinks.BugReport);
var creditsButton = new Button { Text = Loc.GetString("Credits") };
var creditsButton = new Button { Text = Loc.GetString("server-info-credits-button") };
creditsButton.OnPressed += args => new CreditsWindow().Open();
var changelogButton = new ChangelogButton

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Content.Client.HUD;
using Content.Client.Items.Managers;
@@ -284,7 +284,7 @@ namespace Content.Client.Inventory
public HumanInventoryWindow(IGameHud gameHud)
{
Title = Loc.GetString("Your Inventory");
Title = Loc.GetString("human-inventory-window-title");
Resizable = false;
var buttonDict = new Dictionary<Slots, ItemSlotButton>();

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Content.Client.Strip;
using Content.Shared.Strip.Components;
using JetBrains.Annotations;
@@ -28,7 +28,7 @@ namespace Content.Client.Inventory
{
base.Open();
_strippingMenu = new StrippingMenu($"{Owner.Owner.Name}'s inventory");
_strippingMenu = new StrippingMenu($"{Loc.GetString("strippable-bound-user-interface-stripping-menu-title",("ownerName", Owner.Owner.Name))}");
_strippingMenu.OnClose += Close;
_strippingMenu.OpenCentered();
@@ -76,7 +76,7 @@ namespace Content.Client.Inventory
{
foreach (var (id, name) in Handcuffs)
{
_strippingMenu.AddButton(Loc.GetString("Restraints"), name, (ev) =>
_strippingMenu.AddButton(Loc.GetString("strippable-bound-user-interface-stripping-menu-handcuffs-button"), name, (ev) =>
{
SendMessage(new StrippingHandcuffButtonPressed(id));
});

View File

@@ -90,8 +90,8 @@ namespace Content.Client.Kitchen.UI
{
var currentlySelectedTimeButton = (Button) _menu.CookTimeButtonVbox.GetChild(cState.ActiveButtonIndex);
currentlySelectedTimeButton.Pressed = true;
var label = cState.ActiveButtonIndex <= 0 ? Loc.GetString("INSTANT") : cState.CurrentCookTime.ToString();
_menu.CookTimeInfoLabel.Text = $"{Loc.GetString("COOK TIME")}: {label}";
var label = cState.ActiveButtonIndex <= 0 ? Loc.GetString("microwave-bound-user-interface-instant-button") : cState.CurrentCookTime.ToString();
_menu.CookTimeInfoLabel.Text = $"{Loc.GetString("microwave-bound-user-interface-cook-time-label")}: {label}";
}
}
@@ -181,7 +181,7 @@ namespace Content.Client.Kitchen.UI
SetSize = MinSize = (512, 256);
Owner = owner;
Title = Loc.GetString("Microwave");
Title = Loc.GetString("microwave-menu-title");
DisableCookingPanelOverlay = new PanelContainer
{
MouseFilter = MouseFilterMode.Stop,
@@ -233,14 +233,14 @@ namespace Content.Client.Kitchen.UI
StartButton = new Button
{
Text = Loc.GetString("Start"),
Text = Loc.GetString("microwave-menu-start-button"),
TextAlign = Label.AlignMode.Center,
};
EjectButton = new Button
{
Text = Loc.GetString("Eject All Contents"),
ToolTip = Loc.GetString("This vaporizes all reagents, but ejects any solids."),
Text = Loc.GetString("microwave-menu-eject-all-text"),
ToolTip = Loc.GetString("microwave-menu-eject-all-tooltip"),
TextAlign = Label.AlignMode.Center,
};
@@ -266,7 +266,7 @@ namespace Content.Client.Kitchen.UI
{
var newButton = new MicrowaveCookTimeButton
{
Text = index <= 0 ? Loc.GetString("INSTANT") : index.ToString(),
Text = index <= 0 ? Loc.GetString("microwave-menu-instant-button") : index.ToString(),
CookTime = (uint)index,
TextAlign = Label.AlignMode.Center,
ToggleMode = true,
@@ -286,7 +286,7 @@ namespace Content.Client.Kitchen.UI
CookTimeInfoLabel = new Label
{
Text = Loc.GetString("COOK TIME: 1"),
Text = Loc.GetString("microwave-menu-cook-time-label", ("time", 1)), // TODO, hardcoded value
Align = Label.AlignMode.Center,
Modulate = Color.White,
VerticalAlignment = VAlignment.Center

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Kitchen.Components;
using Robust.Client.GameObjects;
@@ -146,7 +146,7 @@ namespace Content.Client.Kitchen.UI
//Looks like we have a beaker attached.
if (reagents.Count <= 0)
{
_menu.BeakerContentBox.BoxContents.AddItem(Loc.GetString("Empty"));
_menu.BeakerContentBox.BoxContents.AddItem(Loc.GetString("grinder-menu-beaker-content-box-is-empty"));
}
else
{
@@ -236,7 +236,7 @@ namespace Content.Client.Kitchen.UI
{
SetSize = MinSize = (512, 256);
Owner = owner;
Title = Loc.GetString("All-In-One Grinder 3000");
Title = Loc.GetString("grinder-menu-title");
var hSplit = new HBoxContainer();
@@ -247,14 +247,14 @@ namespace Content.Client.Kitchen.UI
GrindButton = new Button
{
Text = Loc.GetString("Grind"),
Text = Loc.GetString("grinder-menu-grind-button"),
TextAlign = Label.AlignMode.Center,
MinSize = (64, 64)
};
JuiceButton = new Button
{
Text = Loc.GetString("Juice"),
Text = Loc.GetString("grinder-menu-juice-button"),
TextAlign = Label.AlignMode.Center,
MinSize = (64, 64)
};
@@ -267,7 +267,7 @@ namespace Content.Client.Kitchen.UI
});
vBoxGrindJuiceButtonPanel.AddChild(JuiceButton);
ChamberContentBox = new LabelledContentBox(Loc.GetString("Chamber"), Loc.GetString("Eject Contents"))
ChamberContentBox = new LabelledContentBox(Loc.GetString("grinder-menu-chamber-content-box-label"), Loc.GetString("grinder-menu-chamber-content-box-button"))
{
//Modulate = Color.Red,
VerticalExpand = true,
@@ -276,7 +276,7 @@ namespace Content.Client.Kitchen.UI
};
BeakerContentBox = new LabelledContentBox(Loc.GetString("Beaker"), Loc.GetString("Eject Beaker"))
BeakerContentBox = new LabelledContentBox(Loc.GetString("grinder-menu-beaker-content-box-label"), Loc.GetString("grinder-menu-beaker-content-box-button"))
{
//Modulate = Color.Blue,
VerticalExpand = true,

View File

@@ -35,8 +35,8 @@ namespace Content.Client.LateJoin
IoCManager.InjectDependencies(this);
var gameTicker = EntitySystem.Get<ClientGameTicker>();
Title = Loc.GetString("late-join-gui-title");
Title = Loc.GetString("Late Join");
var jobList = new VBoxContainer();
var vBox = new VBoxContainer
@@ -67,7 +67,8 @@ namespace Content.Client.LateJoin
category = new VBoxContainer
{
Name = department,
ToolTip = Loc.GetString("Jobs in the {0} department", department)
ToolTip = Loc.GetString("late-join-gui-jobs-amount-in-department-tooltip",
("departmentName", department))
};
if (firstCategory)
@@ -89,7 +90,7 @@ namespace Content.Client.LateJoin
{
new Label
{
Text = Loc.GetString("{0} jobs", department)
Text = Loc.GetString("late-join-gui-department-jobs-label", ("departmentName", department))
}
}
});

View File

@@ -91,7 +91,7 @@ namespace Content.Client.Lathe.UI
{
_icon.Texture = Texture.Transparent;
_nameLabel.Text = "-------";
_description.Text = "Not producing anything.";
_description.Text = "lathequeue-menu-not-producing-text";
}
public void PopulateList()

View File

@@ -1,4 +1,4 @@
using Content.Client.Stylesheets;
using Content.Client.Stylesheets;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;

View File

@@ -142,7 +142,7 @@ namespace Content.Client.Lobby
var gameTicker = EntitySystem.Get<ClientGameTicker>();
if (gameTicker.IsGameStarted)
{
_lobby.StartTime.Text = "";
_lobby.StartTime.Text = string.Empty;
return;
}
@@ -150,7 +150,7 @@ namespace Content.Client.Lobby
if (gameTicker.Paused)
{
text = Loc.GetString("Paused");
text = Loc.GetString("lobby-state-paused");
}
else
{
@@ -158,7 +158,7 @@ namespace Content.Client.Lobby
var seconds = difference.TotalSeconds;
if (seconds < 0)
{
text = Loc.GetString(seconds < -5 ? "Right Now?" : "Right Now");
text = Loc.GetString(seconds < -5 ? "lobby-state-right-now-question" : "lobby-state-right-now-confirmation");
}
else
{
@@ -166,7 +166,7 @@ namespace Content.Client.Lobby
}
}
_lobby.StartTime.Text = Loc.GetString("Round Starts In: {0}", text);
_lobby.StartTime.Text = Loc.GetString("lobby-state-round-start-countdown-text", ("timeLeft", text));
}
private void PlayerManagerOnPlayerListUpdated(object? sender, EventArgs e)
@@ -211,14 +211,14 @@ namespace Content.Client.Lobby
if (gameTicker.IsGameStarted)
{
_lobby.ReadyButton.Text = Loc.GetString("Join");
_lobby.ReadyButton.Text = Loc.GetString("lobby-state-ready-button-join-state");
_lobby.ReadyButton.ToggleMode = false;
_lobby.ReadyButton.Pressed = false;
}
else
{
_lobby.StartTime.Text = "";
_lobby.ReadyButton.Text = Loc.GetString("Ready Up");
_lobby.StartTime.Text = string.Empty;
_lobby.ReadyButton.Text = Loc.GetString("lobby-state-ready-button-ready-up-state");
_lobby.ReadyButton.ToggleMode = true;
_lobby.ReadyButton.Disabled = false;
_lobby.ReadyButton.Pressed = gameTicker.AreWeReady;
@@ -237,7 +237,7 @@ namespace Content.Client.Lobby
foreach (var session in _playerManager.Sessions.OrderBy(s => s.Name))
{
var readyState = "";
var readyState = string.Empty;
// Don't show ready state if we're ingame
if (!gameTicker.IsGameStarted)
{
@@ -249,10 +249,10 @@ namespace Content.Client.Lobby
readyState = status switch
{
LobbyPlayerStatus.NotReady => Loc.GetString("Not Ready"),
LobbyPlayerStatus.Ready => Loc.GetString("Ready"),
LobbyPlayerStatus.Observer => Loc.GetString("Observer"),
_ => "",
LobbyPlayerStatus.NotReady => Loc.GetString("lobby-state-player-status-not-ready"),
LobbyPlayerStatus.Ready => Loc.GetString("lobby-state-player-status-ready"),
LobbyPlayerStatus.Observer => Loc.GetString("lobby-state-player-status-observer"),
_ => string.Empty,
};
}

View File

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Client.CharacterAppearance;
using Content.Client.HUD.UI;
using Content.Client.Inventory;
@@ -35,12 +35,12 @@ namespace Content.Client.Lobby.UI
var header = new NanoHeading
{
Text = Loc.GetString("Character")
Text = Loc.GetString("lobby-character-preview-panel-header")
};
CharacterSetupButton = new Button
{
Text = Loc.GetString("Customize"),
Text = Loc.GetString("lobby-character-preview-panel-character-setup-button"),
HorizontalAlignment = HAlignment.Left
};
@@ -55,7 +55,7 @@ namespace Content.Client.Lobby.UI
vBox.AddChild(header);
_unloaded = new Label {Text = "Your character preferences have not yet loaded, please stand by."};
_unloaded = new Label {Text = Loc.GetString("lobby-character-preview-panel-unloaded-preferences-label")};
_loaded = new VBoxContainer {Visible = false};
@@ -147,7 +147,7 @@ namespace Content.Client.Lobby.UI
foreach (var slot in AllSlots)
{
var itemType = gear.GetGear(slot, profile);
if (itemType != "")
if (itemType != string.Empty)
{
var item = entityMan.SpawnEntity(itemType, MapCoordinates.Nullspace);
inventory.SetSlotVisuals(slot, item);

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Text.RegularExpressions;
using Content.Client.Changelog;
using Content.Client.EscapeMenu.UI;
@@ -105,8 +105,8 @@ namespace Content.Client.MainMenu
{
var invalidReason = Loc.GetString(reason.ToText());
_userInterfaceManager.Popup(
Loc.GetString("Invalid username:\n{0}", invalidReason),
Loc.GetString("Invalid Username"));
Loc.GetString("main-menu-invalid-username-with-reason", ("invalidReason", invalidReason)),
Loc.GetString("main-menu-invalid-username"));
return;
}
@@ -182,7 +182,7 @@ namespace Content.Client.MainMenu
private void _onConnectFailed(object? _, NetConnectFailArgs args)
{
_userInterfaceManager.Popup($"Failed to connect:\n{args.Reason}");
_userInterfaceManager.Popup(Loc.GetString("main-menu-failed-to-connect",("reason", args.Reason)));
_netManager.ConnectFailed -= _onConnectFailed;
_setConnectingState(false);
}
@@ -242,12 +242,12 @@ namespace Content.Client.MainMenu
var userNameHBox = new HBoxContainer {SeparationOverride = 4};
vBox.AddChild(userNameHBox);
userNameHBox.AddChild(new Label {Text = "Username:"});
userNameHBox.AddChild(new Label {Text = Loc.GetString("main-menu-username-label") });
var currentUserName = _configurationManager.GetCVar(CVars.PlayerName);
UserNameBox = new LineEdit
{
Text = currentUserName, PlaceHolder = "Username",
Text = currentUserName, PlaceHolder = Loc.GetString("main-menu-username-text"),
HorizontalExpand = true
};
@@ -255,12 +255,12 @@ namespace Content.Client.MainMenu
JoinPublicServerButton = new Button
{
Text = "Join Public Server",
Text = Loc.GetString("main-menu-join-public-server-button"),
StyleIdentifier = "mainMenu",
TextAlign = Label.AlignMode.Center,
#if !FULL_RELEASE
Disabled = true,
ToolTip = "Cannot connect to public server with a debug build."
ToolTip = Loc.GetString("main-menu-join-public-server-button-tooltip")
#endif
};
@@ -280,7 +280,7 @@ namespace Content.Client.MainMenu
DirectConnectButton = new Button
{
Text = "Direct Connect",
Text = Loc.GetString("main-menu-direct-connect-button"),
TextAlign = Label.AlignMode.Center,
StyleIdentifier = "mainMenu",
};
@@ -292,7 +292,7 @@ namespace Content.Client.MainMenu
OptionsButton = new Button
{
Text = "Options",
Text = Loc.GetString("main-menu-options-button"),
TextAlign = Label.AlignMode.Center,
StyleIdentifier = "mainMenu",
};
@@ -301,7 +301,7 @@ namespace Content.Client.MainMenu
QuitButton = new Button
{
Text = "Quit",
Text = Loc.GetString("main-menu-quit-button"),
TextAlign = Label.AlignMode.Center,
StyleIdentifier = "mainMenu",
};

View File

@@ -23,11 +23,11 @@ namespace Content.Client.MedicalScanner.UI
{
(ScanButton = new Button
{
Text = Loc.GetString("Scan and Save DNA")
Text = Loc.GetString("medical-scanner-window-save-button-text")
}),
(_diagnostics = new Label
{
Text = ""
Text = string.Empty
})
}
});
@@ -41,17 +41,17 @@ namespace Content.Client.MedicalScanner.UI
!state.HasDamage() ||
!IoCManager.Resolve<IEntityManager>().TryGetEntity(state.Entity.Value, out var entity))
{
_diagnostics.Text = Loc.GetString("No patient data.");
_diagnostics.Text = Loc.GetString("medical-scanner-window-no-patient-data-text");
ScanButton.Disabled = true;
SetSize = (250, 100);
}
else
{
text.Append($"{entity.Name}{Loc.GetString("'s health:")}\n");
text.Append($"{Loc.GetString("medical-scanner-window-entity-health-text", ("entityName", entity.Name))}\n");
foreach (var (@class, classAmount) in state.DamageClasses)
{
text.Append($"\n{Loc.GetString("{0}: {1}", @class, classAmount)}");
text.Append($"\n{Loc.GetString("medical-scanner-window-damage-class-text", ("damageClass", @class), ("amount", classAmount))}");
foreach (var type in @class.ToTypes())
{
@@ -60,10 +60,10 @@ namespace Content.Client.MedicalScanner.UI
continue;
}
text.Append($"\n- {Loc.GetString("{0}: {1}", type, typeAmount)}");
text.Append($"\n- {Loc.GetString("medical-scanner-window-damage-type-text", ("damageType",type) ,("amount", typeAmount))}");
}
text.Append("\n");
text.Append('\n');
}
_diagnostics.Text = text.ToString();

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Content.Client.Examine;
using Content.Client.Message;
using Content.Shared.PDA;
@@ -65,7 +65,7 @@ namespace Content.Client.PDA
{
if (_menu.CurrentLoggedInAccount?.DataBalance < listing.Price)
{
_failPopup = new PDAMenuPopup(Loc.GetString("Insufficient funds!"));
_failPopup = new PDAMenuPopup(Loc.GetString("pda-bound-user-interface-insufficient-funds-popup"));
_userInterfaceManager.ModalRoot.AddChild(_failPopup);
_failPopup.Open(UIBox2.FromDimensions(_menu.Position.X + 150, _menu.Position.Y + 60, 156, 24));
_menu.OnClose += () =>
@@ -106,10 +106,10 @@ namespace Content.Client.PDA
("ActualOwnerName", msg.PDAOwnerInfo.ActualOwnerName)));
}
if (msg.PDAOwnerInfo.IdOwner != null || msg.PDAOwnerInfo.JobTitle != null)
{
_menu.IDInfoLabel.SetMarkup(Loc.GetString("comp-pda-ui",
_menu.IDInfoLabel.SetMarkup(Loc.GetString("comp-pda-ui",
("Owner",msg.PDAOwnerInfo.IdOwner ?? "Unknown"),
("JobTitle",msg.PDAOwnerInfo.JobTitle ?? "Unassigned")));
}
@@ -126,8 +126,9 @@ namespace Content.Client.PDA
_menu.CurrentLoggedInAccount = msg.Account;
var balance = msg.Account.DataBalance;
var weightedColor = GetWeightedColorString(balance);
_menu.BalanceInfo.SetMarkup(Loc.GetString("TC Balance: [color={0}]{1}[/color]", weightedColor, balance));
_menu.BalanceInfo.SetMarkup(Loc.GetString("pda-bound-user-interface-tc-balance-popup",
("weightedColor",weightedColor),
("balance",balance)));
}
if (msg.Listings != null)
@@ -284,7 +285,7 @@ namespace Content.Client.PDA
_owner = owner;
_prototypeManager = prototypeManager;
Title = Loc.GetString("PDA");
Title = Loc.GetString("comp-pda-ui-menu-title");
#region MAIN_MENU_TAB
//Main menu
@@ -299,13 +300,13 @@ namespace Content.Client.PDA
EjectIDButton = new Button
{
Text = Loc.GetString("Eject ID"),
Text = Loc.GetString("comp-pda-ui-eject-id-button"),
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center
};
EjectPenButton = new Button
{
Text = Loc.GetString("Eject Pen"),
Text = Loc.GetString("comp-pda-ui-eject-pen-button"),
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center
};
@@ -330,7 +331,7 @@ namespace Content.Client.PDA
FlashLightToggleButton = new Button
{
Text = Loc.GetString("Toggle Flashlight"),
Text = Loc.GetString("comp-pda-ui-toggle-flashlight-button"),
ToggleMode = true,
};
@@ -439,9 +440,9 @@ namespace Content.Client.PDA
};
//Add all the tabs to the Master container.
MasterTabContainer.SetTabTitle(0, Loc.GetString("Main Menu"));
MasterTabContainer.SetTabTitle(0, Loc.GetString("pda-bound-user-interface-main-menu-tab-title"));
MasterTabContainer.AddChild(UplinkTabContainer);
MasterTabContainer.SetTabTitle(1, Loc.GetString("Uplink"));
MasterTabContainer.SetTabTitle(1, Loc.GetString("pda-bound-user-interface-uplink-tab-title"));
Contents.AddChild(MasterTabContainer);
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Content.Client.HUD.UI;
using Content.Client.Resources;
using Content.Client.Stylesheets;
@@ -109,7 +109,7 @@ namespace Content.Client.ParticleAccelerator.UI
_offButton = new Button
{
ToggleMode = false,
Text = "Off",
Text = Loc.GetString("particle-accelerator-control-menu-off-button"),
StyleClasses = {StyleBase.ButtonOpenRight},
};
_offButton.OnPressed += args => owner.SendEnableMessage(false);
@@ -117,7 +117,7 @@ namespace Content.Client.ParticleAccelerator.UI
_onButton = new Button
{
ToggleMode = false,
Text = "On",
Text = Loc.GetString("particle-accelerator-control-menu-on-button"),
StyleClasses = {StyleBase.ButtonOpenLeft},
};
_onButton.OnPressed += args => owner.SendEnableMessage(true);
@@ -134,7 +134,7 @@ namespace Content.Client.ParticleAccelerator.UI
{
HorizontalAlignment = HAlignment.Center,
StyleClasses = {StyleBase.StyleClassLabelSubText},
Text = Loc.GetString("Refer to p.132 of service manual")
Text = Loc.GetString("particle-accelerator-control-menu-service-manual-reference")
};
_drawLabel = new Label();
var imgSize = new Vector2(32, 32);
@@ -149,7 +149,7 @@ namespace Content.Client.ParticleAccelerator.UI
{
new Label
{
Text = Loc.GetString("Mark 2 Particle Accelerator"),
Text = Loc.GetString("particle-accelerator-control-menu-device-version-label"),
FontOverride = font,
FontColorOverride = StyleNano.NanoGold,
},
@@ -183,7 +183,7 @@ namespace Content.Client.ParticleAccelerator.UI
{
new Label
{
Text = Loc.GetString("Power: "),
Text = Loc.GetString("particle-accelerator-control-menu-power-label") + " ",
HorizontalExpand = true,
HorizontalAlignment = HAlignment.Left,
},
@@ -197,7 +197,7 @@ namespace Content.Client.ParticleAccelerator.UI
{
new Label
{
Text = Loc.GetString("Strength: "),
Text = Loc.GetString("particle-accelerator-control-menu-strength-label") + " ",
HorizontalExpand = true,
HorizontalAlignment = HAlignment.Left,
},
@@ -219,7 +219,7 @@ namespace Content.Client.ParticleAccelerator.UI
{
new Label
{
Text = Loc.GetString("PARTICLE STRENGTH\nLIMITER FAILURE"),
Text = Loc.GetString("particle-accelerator-control-menu-alarm-control"),
FontColorOverride = Color.Red,
Align = Label.AlignMode.Center
},
@@ -272,7 +272,7 @@ namespace Content.Client.ParticleAccelerator.UI
},
(_scanButton = new Button
{
Text = Loc.GetString("Scan Parts"),
Text = Loc.GetString("particle-accelerator-control-menu-scan-parts-button"),
HorizontalAlignment = HAlignment.Center
})
}
@@ -286,7 +286,7 @@ namespace Content.Client.ParticleAccelerator.UI
new Label
{
Margin = new Thickness(4, 4, 0, 4),
Text = Loc.GetString("Ensure containment field is active before operation"),
Text = Loc.GetString("particle-accelerator-control-menu-check-containment-field-warning"),
HorizontalAlignment = HAlignment.Center,
StyleClasses = {StyleBase.StyleClassLabelSubText},
}
@@ -299,7 +299,7 @@ namespace Content.Client.ParticleAccelerator.UI
{
new Label
{
Text = "FOO-BAR-BAZ",
Text = Loc.GetString("particle-accelerator-control-menu-foo-bar-baz"),
StyleClasses = {StyleBase.StyleClassLabelSubText}
}
}
@@ -369,7 +369,9 @@ namespace Content.Client.ParticleAccelerator.UI
_assembled = uiState.Assembled;
UpdateUI(uiState.Assembled, uiState.InterfaceBlock, uiState.Enabled,
uiState.WirePowerBlock);
_statusLabel.Text = Loc.GetString($"Status: {(uiState.Assembled ? "Operational" : "Incomplete")}");
_statusLabel.Text = Loc.GetString("particle-accelerator-control-menu-status-label",
("status", Loc.GetString(uiState.Assembled ? "particle-accelerator-control-menu-status-operational" :
"particle-accelerator-control-menu-status-incomplete")));
UpdatePowerState(uiState.State, uiState.Enabled, uiState.Assembled,
uiState.MaxLevel);
UpdatePreview(uiState);
@@ -433,7 +435,7 @@ namespace Content.Client.ParticleAccelerator.UI
if (!_assembled)
{
_drawLabel.Text = Loc.GetString("Draw: N/A");
_drawLabel.Text = Loc.GetString("particle-accelerator-control-menu-draw-not-available");
return;
}
@@ -446,7 +448,9 @@ namespace Content.Client.ParticleAccelerator.UI
watts = (int) (_lastDraw + val * 5);
}
_drawLabel.Text = Loc.GetString("Draw: {0:##,##0}/{1:##,##0} W", watts, _lastReceive);
_drawLabel.Text = Loc.GetString("particle-accelerator-control-menu-draw",
("watts", $"{watts:##,##0}"),
("lastReceive", $"{_lastReceive:##,##0}"));
}
private sealed class PASegmentControl : Control

View File

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Client.CharacterAppearance;
using Content.Client.Lobby.UI;
using Content.Client.Parallax;
@@ -74,7 +74,7 @@ namespace Content.Client.Preferences.UI
new Label
{
Margin = new Thickness(8, 0, 0, 0),
Text = Loc.GetString("Character Setup"),
Text = Loc.GetString("character-setup-gui-character-setup-label"),
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
VAlign = Label.VAlignMode.Center,
},
@@ -82,12 +82,12 @@ namespace Content.Client.Preferences.UI
{
HorizontalExpand = true,
HorizontalAlignment = HAlignment.Right,
Text = Loc.GetString("Save"),
Text = Loc.GetString("character-setup-gui-character-setup-save-button"),
StyleClasses = {StyleNano.StyleClassButtonBig},
}),
(CloseButton = new Button
{
Text = Loc.GetString("Close"),
Text = Loc.GetString("character-setup-gui-character-setup-close-button"),
StyleClasses = {StyleNano.StyleClassButtonBig},
})
}
@@ -125,7 +125,7 @@ namespace Content.Client.Preferences.UI
_createNewCharacterButton = new Button
{
Text = "Create new slot...",
Text = Loc.GetString("character-setup-gui-create-new-character-button"),
};
_createNewCharacterButton.OnPressed += args =>
{
@@ -177,7 +177,8 @@ namespace Content.Client.Preferences.UI
}
_createNewCharacterButton.ToolTip =
$"A maximum of {_preferencesManager.Settings!.MaxCharacterSlots} characters are allowed.";
Loc.GetString("character-setup-gui-create-new-character-button-tooltip",
("maxCharacters", _preferencesManager.Settings!.MaxCharacterSlots));
foreach (var (slot, character) in _preferencesManager.Preferences!.Characters)
{
@@ -261,7 +262,7 @@ namespace Content.Client.Preferences.UI
};
var deleteButton = new Button
{
Text = "Delete",
Text = Loc.GetString("character-setup-gui-character-picker-button-delete-button"),
Visible = !isSelectedCharacter,
};
deleteButton.OnPressed += _ =>

View File

@@ -97,7 +97,7 @@ namespace Content.Client.Preferences.UI
var randomizePanel = HighlightedContainer();
var randomizeEverythingButton = new Button
{
Text = Loc.GetString("Randomize everything")
Text = Loc.GetString("humanoid-profile-editor-randomize-everything-button")
};
randomizeEverythingButton.OnPressed += args => { RandomizeEverything(); };
randomizePanel.AddChild(randomizeEverythingButton);
@@ -112,7 +112,7 @@ namespace Content.Client.Preferences.UI
{
VerticalExpand = true
};
var nameLabel = new Label { Text = Loc.GetString("Name:") };
var nameLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-name-label") };
_nameEdit = new LineEdit
{
MinSize = (270, 0),
@@ -121,7 +121,7 @@ namespace Content.Client.Preferences.UI
_nameEdit.OnTextChanged += args => { SetName(args.Text); };
var nameRandomButton = new Button
{
Text = Loc.GetString("Randomize"),
Text = Loc.GetString("humanoid-profile-editor-name-random-button"),
};
nameRandomButton.OnPressed += args => RandomizeName();
nameHBox.AddChild(nameLabel);
@@ -153,7 +153,7 @@ namespace Content.Client.Preferences.UI
}
};
tabContainer.AddChild(appearanceVBox);
tabContainer.SetTabTitle(0, Loc.GetString("Appearance"));
tabContainer.SetTabTitle(0, Loc.GetString("humanoid-profile-editor-appearance-tab"));
var sexAndAgeRow = new HBoxContainer
{
@@ -166,13 +166,13 @@ namespace Content.Client.Preferences.UI
var sexPanel = HighlightedContainer();
var sexHBox = new HBoxContainer();
var sexLabel = new Label { Text = Loc.GetString("Sex:") };
var sexLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-sex-label") };
var sexButtonGroup = new ButtonGroup();
_sexMaleButton = new Button
{
Text = Loc.GetString("Male"),
Text = Loc.GetString("humanoid-profile-editor-sex-male-button"),
Group = sexButtonGroup
};
_sexMaleButton.OnPressed += args =>
@@ -187,7 +187,7 @@ namespace Content.Client.Preferences.UI
_sexFemaleButton = new Button
{
Text = Loc.GetString("Female"),
Text = Loc.GetString("humanoid-profile-editor-sex-female-button"),
Group = sexButtonGroup
};
_sexFemaleButton.OnPressed += _ =>
@@ -213,7 +213,7 @@ namespace Content.Client.Preferences.UI
var agePanel = HighlightedContainer();
var ageHBox = new HBoxContainer();
var ageLabel = new Label { Text = Loc.GetString("Age:") };
var ageLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-age-label") };
_ageEdit = new LineEdit { MinSize = (40, 0) };
_ageEdit.OnTextChanged += args =>
{
@@ -232,14 +232,14 @@ namespace Content.Client.Preferences.UI
var genderPanel = HighlightedContainer();
var genderHBox = new HBoxContainer();
var genderLabel = new Label { Text = Loc.GetString("Pronouns:") };
var genderLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-pronouns-label") };
_genderButton = new OptionButton();
_genderButton.AddItem(Loc.GetString("He / Him"), (int) Gender.Male);
_genderButton.AddItem(Loc.GetString("She / Her"), (int) Gender.Female);
_genderButton.AddItem(Loc.GetString("They / Them"), (int) Gender.Epicene);
_genderButton.AddItem(Loc.GetString("It / It"), (int) Gender.Neuter);
_genderButton.AddItem(Loc.GetString("humanoid-profile-editor-pronouns-male-text"), (int) Gender.Male);
_genderButton.AddItem(Loc.GetString("humanoid-profile-editor-pronouns-female-text"), (int) Gender.Female);
_genderButton.AddItem(Loc.GetString("humanoid-profile-editor-pronouns-epicene-text"), (int) Gender.Epicene);
_genderButton.AddItem(Loc.GetString("humanoid-profile-editor-pronouns-neuter-text"), (int) Gender.Neuter);
_genderButton.OnItemSelected += args =>
{
@@ -316,12 +316,12 @@ namespace Content.Client.Preferences.UI
var clothingPanel = HighlightedContainer();
var clothingHBox = new HBoxContainer();
var clothingLabel = new Label { Text = Loc.GetString("Clothing:") };
var clothingLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-clothing-label") };
_clothingButton = new OptionButton();
_clothingButton.AddItem(Loc.GetString("Jumpsuit"), (int) ClothingPreference.Jumpsuit);
_clothingButton.AddItem(Loc.GetString("Jumpskirt"), (int) ClothingPreference.Jumpskirt);
_clothingButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-jumpsuit"), (int) ClothingPreference.Jumpsuit);
_clothingButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-jumpskirt"), (int) ClothingPreference.Jumpskirt);
_clothingButton.OnItemSelected += args =>
{
@@ -340,13 +340,13 @@ namespace Content.Client.Preferences.UI
var backpackPanel = HighlightedContainer();
var backpackHBox = new HBoxContainer();
var backpackLabel = new Label { Text = Loc.GetString("Backpack:") };
var backpackLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-backpack-label") };
_backpackButton = new OptionButton();
_backpackButton.AddItem(Loc.GetString("Backpack"), (int) BackpackPreference.Backpack);
_backpackButton.AddItem(Loc.GetString("Satchel"), (int) BackpackPreference.Satchel);
_backpackButton.AddItem(Loc.GetString("Duffelbag"), (int) BackpackPreference.Duffelbag);
_backpackButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-backpack"), (int) BackpackPreference.Backpack);
_backpackButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-satchel"), (int) BackpackPreference.Satchel);
_backpackButton.AddItem(Loc.GetString("humanoid-profile-editor-preference-duffelbag"), (int) BackpackPreference.Duffelbag);
_backpackButton.OnItemSelected += args =>
{
@@ -365,7 +365,7 @@ namespace Content.Client.Preferences.UI
var eyesPanel = HighlightedContainer();
var eyesVBox = new VBoxContainer();
var eyesLabel = new Label { Text = Loc.GetString("Eye color:") };
var eyesLabel = new Label { Text = Loc.GetString("humanoid-profile-editor-eyes-label") };
_eyesPicker = new EyeColorPicker();
@@ -409,14 +409,14 @@ namespace Content.Client.Preferences.UI
tabContainer.AddChild(jobVBox);
tabContainer.SetTabTitle(1, Loc.GetString("Jobs"));
tabContainer.SetTabTitle(1, Loc.GetString("humanoid-profile-editor-jobs-tab"));
_preferenceUnavailableButton.AddItem(
Loc.GetString("Stay in lobby if preference unavailable."),
Loc.GetString("humanoid-profile-editor-preference-unavailable-stay-in-lobby-button"),
(int) PreferenceUnavailableMode.StayInLobby);
_preferenceUnavailableButton.AddItem(
Loc.GetString("Be an {0} if preference unavailable.",
Loc.GetString(SharedGameTicker.OverflowJobName)),
Loc.GetString("humanoid-profile-editor-preference-unavailable-spawn-as-overflow-button",
("overflowJob", Loc.GetString(SharedGameTicker.OverflowJobName))),
(int) PreferenceUnavailableMode.SpawnAsOverflow);
_preferenceUnavailableButton.OnItemSelected += args =>
@@ -441,7 +441,8 @@ namespace Content.Client.Preferences.UI
category = new VBoxContainer
{
Name = department,
ToolTip = Loc.GetString("Jobs in the {0} department", department)
ToolTip = Loc.GetString("humanoid-profile-editor-jobs-amount-in-department-tooltip",
("departmentName", department))
};
if (firstCategory)
@@ -463,7 +464,8 @@ namespace Content.Client.Preferences.UI
{
new Label
{
Text = Loc.GetString("{0} jobs", department)
Text = Loc.GetString("humanoid-profile-editor-department-jobs-label",
("departmentName" ,department))
}
}
});
@@ -526,7 +528,7 @@ namespace Content.Client.Preferences.UI
tabContainer.AddChild(antagVBox);
tabContainer.SetTabTitle(2, Loc.GetString("Antags"));
tabContainer.SetTabTitle(2, Loc.GetString("humanoid-profile-editor-antags-tab"));
_antagPreferences = new List<AntagPreferenceSelector>();
@@ -559,15 +561,15 @@ namespace Content.Client.Preferences.UI
var importExportHBox = new HBoxContainer();
var importButton = new Button
{
Text = Loc.GetString("Import"),
Text = Loc.GetString("humanoid-profile-editor-import-button"),
Disabled = true,
ToolTip = "Not yet implemented!"
ToolTip = Loc.GetString("generic-not-yet-implemented")
};
var exportButton = new Button
{
Text = Loc.GetString("Export"),
Text = Loc.GetString("humanoid-profile-editor-export-button"),
Disabled = true,
ToolTip = "Not yet implemented!"
ToolTip = Loc.GetString("generic-not-yet-implemented")
};
importExportHBox.AddChild(importButton);
importExportHBox.AddChild(exportButton);
@@ -582,7 +584,7 @@ namespace Content.Client.Preferences.UI
var panel = HighlightedContainer();
_saveButton = new Button
{
Text = Loc.GetString("Save"),
Text = Loc.GetString("humanoid-profile-editor-save-button"),
HorizontalAlignment = HAlignment.Center
};
_saveButton.OnPressed += args => { Save(); };
@@ -899,10 +901,10 @@ namespace Content.Client.Preferences.UI
};
// Text, Value
_optionButton.AddItem(Loc.GetString("High"), (int) JobPriority.High);
_optionButton.AddItem(Loc.GetString("Medium"), (int) JobPriority.Medium);
_optionButton.AddItem(Loc.GetString("Low"), (int) JobPriority.Low);
_optionButton.AddItem(Loc.GetString("Never"), (int) JobPriority.Never);
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-high-button"), (int) JobPriority.High);
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-medium-button"), (int) JobPriority.Medium);
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-low-button"), (int) JobPriority.Low);
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-never-button"), (int) JobPriority.Never);
_optionButton.OnItemSelected += args =>
{

View File

@@ -1,4 +1,4 @@
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
@@ -9,8 +9,8 @@ namespace Content.Client.Research.UI
{
private readonly ItemList _servers;
private int _serverCount;
private string[] _serverNames = new string[]{};
private int[] _serverIds = new int[]{};
private string[] _serverNames = System.Array.Empty<string>();
private int[] _serverIds = System.Array.Empty<int>();
private int _selectedServerId = -1;
public ResearchClientBoundUserInterface Owner { get; }
@@ -21,7 +21,7 @@ namespace Content.Client.Research.UI
IoCManager.InjectDependencies(this);
Owner = owner;
Title = Loc.GetString("Research Server Selection");
Title = Loc.GetString("research-client-server-selection-menu-title");
_servers = new ItemList() {SelectMode = ItemList.ItemListSelectMode.Single};
@@ -56,9 +56,11 @@ namespace Content.Client.Research.UI
for (var i = 0; i < _serverCount; i++)
{
var id = _serverIds[i];
_servers.AddItem($"ID: {id} || {_serverNames[i]}");
_servers.AddItem(Loc.GetString("research-client-server-selection-menu-server-entry-text", ("id", id), ("serverName", _serverNames[i])));
if (id == _selectedServerId)
{
_servers[id].Selected = true;
}
}
_servers.OnItemSelected += OnItemSelected;

View File

@@ -40,7 +40,7 @@ namespace Content.Client.Research.UI
IoCManager.InjectDependencies(this);
Title = Loc.GetString("R&D Console");
Title = Loc.GetString("research-console-menu-title");
Owner = owner;
@@ -92,7 +92,7 @@ namespace Content.Client.Research.UI
SizeFlagsStretchRatio = 1
};
var vboxPoints = new VBoxContainer()
var vboxPoints = new VBoxContainer()
{
HorizontalExpand = true,
VerticalExpand = true,
@@ -106,8 +106,8 @@ namespace Content.Client.Research.UI
SizeFlagsStretchRatio = 3,
};
_pointLabel = new Label() { Text = Loc.GetString("Research Points") + ": 0" };
_pointsPerSecondLabel = new Label() { Text = Loc.GetString("Points per Second") + ": 0" };
_pointLabel = new Label() { Text = Loc.GetString("research-console-menu-research-points-text", ("points", 0)) };
_pointsPerSecondLabel = new Label() { Text = Loc.GetString("research-console-menu-points-per-second-text", ("pointsPerSecond", 0)) };
var vboxPointsButtons = new VBoxContainer()
{
@@ -116,9 +116,9 @@ namespace Content.Client.Research.UI
VerticalExpand = true,
};
ServerSelectionButton = new Button() { Text = Loc.GetString("Server list") };
ServerSyncButton = new Button() { Text = Loc.GetString("Sync")};
UnlockButton = new Button() { Text = Loc.GetString("Unlock"), Disabled = true };
ServerSelectionButton = new Button() { Text = Loc.GetString("research-console-menu-server-selection-button") };
ServerSyncButton = new Button() { Text = Loc.GetString("research-console-menu-server-sync-button") };
UnlockButton = new Button() { Text = Loc.GetString("research-console-menu-server-unlock-button"), Disabled = true };
vboxPointsButtons.AddChild(ServerSelectionButton);
@@ -172,9 +172,9 @@ namespace Content.Client.Research.UI
{
UnlockButton.Disabled = true;
_technologyIcon.Texture = Texture.Transparent;
_technologyName.Text = "";
_technologyDescription.Text = "";
_technologyRequirements.Text = "";
_technologyName.Text = string.Empty;
_technologyDescription.Text = string.Empty;
_technologyRequirements.Text = string.Empty;
}
/// <summary>
@@ -256,16 +256,16 @@ namespace Content.Client.Research.UI
{
if (TechnologySelected == null)
{
_technologyName.Text = "";
_technologyDescription.Text = "";
_technologyRequirements.Text = "";
_technologyName.Text = string.Empty;
_technologyDescription.Text = string.Empty;
_technologyRequirements.Text = string.Empty;
return;
}
_technologyIcon.Texture = TechnologySelected.Icon.Frame0();
_technologyName.Text = TechnologySelected.Name;
_technologyDescription.Text = TechnologySelected.Description+$"\n{TechnologySelected.RequiredPoints} " + Loc.GetString("research points");
_technologyRequirements.Text = Loc.GetString("No technology requirements.");
_technologyDescription.Text = TechnologySelected.Description + $"\n{TechnologySelected.RequiredPoints} " + Loc.GetString("research-console-menu-research-points-text").ToLowerInvariant();
_technologyRequirements.Text = Loc.GetString("research-console-tech-requirements-none");
var prototypeMan = IoCManager.Resolve<IPrototypeManager>();
@@ -274,7 +274,7 @@ namespace Content.Client.Research.UI
var requiredId = TechnologySelected.RequiredTechnologies[i];
if (!prototypeMan.TryIndex(requiredId, out TechnologyPrototype? prototype)) continue;
if (i == 0)
_technologyRequirements.Text = Loc.GetString("Requires") + $": {prototype.Name}";
_technologyRequirements.Text = Loc.GetString("research-console-tech-requirements-prototype-name", ("prototypeName", prototype.Name));
else
_technologyRequirements.Text += $", {prototype.Name}";
}
@@ -285,8 +285,8 @@ namespace Content.Client.Research.UI
/// </summary>
public void PopulatePoints()
{
_pointLabel.Text = Loc.GetString("Research Points") + $": {Owner.Points}";
_pointsPerSecondLabel.Text = Loc.GetString("Points per second") + $": {Owner.PointsPerSecond}";
_pointLabel.Text = Loc.GetString("research-console-menu-research-points-text", ("points", Owner.Points));
_pointsPerSecondLabel.Text = Loc.GetString("research-console-menu-points-per-second-text", ("pointsPerSeconds", Owner.PointsPerSecond));
}
/// <summary>

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Client.Message;
@@ -20,7 +20,7 @@ namespace Content.Client.RoundEnd
{
MinSize = SetSize = (520, 580);
Title = Loc.GetString("Round End Summary");
Title = Loc.GetString("round-end-summary-window-title");
//Round End Window is split into two tabs, one about the round stats
//and the other is a list of RoundEndPlayerInfo for each player.
@@ -29,13 +29,13 @@ namespace Content.Client.RoundEnd
//Also good for serious info.
RoundEndSummaryTab = new VBoxContainer()
{
Name = Loc.GetString("Round Information")
Name = Loc.GetString("round-end-summary-window-round-end-summary-tab-title")
};
//Tab for listing unique info per player.
PlayerManifestoTab = new VBoxContainer()
{
Name = Loc.GetString("Player Manifesto")
Name = Loc.GetString("round-end-summary-window-player-manifesto-tab-title")
};
RoundEndWindowTabs = new TabContainer();
@@ -46,7 +46,7 @@ namespace Content.Client.RoundEnd
//Gamemode Name
var gamemodeLabel = new RichTextLabel();
gamemodeLabel.SetMarkup(Loc.GetString("Round of [color=white]{0}[/color] has ended.", gm));
gamemodeLabel.SetMarkup(Loc.GetString("round-end-summary-window-gamemode-name-label", ("gamemode",gm)));
RoundEndSummaryTab.AddChild(gamemodeLabel);
//Round end text
@@ -59,13 +59,17 @@ namespace Content.Client.RoundEnd
//Duration
var roundTimeLabel = new RichTextLabel();
roundTimeLabel.SetMarkup(Loc.GetString("It lasted for [color=yellow]{0} hours, {1} minutes, and {2} seconds.",
roundTimeSpan.Hours,roundTimeSpan.Minutes,roundTimeSpan.Seconds));
roundTimeLabel.SetMarkup(Loc.GetString("round-end-summary-window-duration-label",
("hours",roundTimeSpan.Hours),
("minutes",roundTimeSpan.Minutes),
("seconds",roundTimeSpan.Seconds)));
RoundEndSummaryTab.AddChild(roundTimeLabel);
//Initialize what will be the list of players display.
var scrollContainer = new ScrollContainer();
scrollContainer.VerticalExpand = true;
var scrollContainer = new ScrollContainer
{
VerticalExpand = true
};
var innerScrollContainer = new VBoxContainer();
//Put observers at the bottom of the list. Put antags on top.
@@ -80,8 +84,9 @@ namespace Content.Client.RoundEnd
if (playerInfo.Observer)
{
playerInfoText.SetMarkup(
Loc.GetString("[color=gray]{0}[/color] was [color=lightblue]{1}[/color], an observer.",
playerInfo.PlayerOOCName, playerInfo.PlayerICName));
Loc.GetString("round-end-summary-window-player-info-if-observer-text",
("playerOOCName",playerInfo.PlayerOOCName),
("playerICName", playerInfo.PlayerICName)));
}
else
{
@@ -89,8 +94,11 @@ namespace Content.Client.RoundEnd
//For example: their antag goals and if they completed them sucessfully.
var icNameColor = playerInfo.Antag ? "red" : "white";
playerInfoText.SetMarkup(
Loc.GetString("[color=gray]{0}[/color] was [color={1}]{2}[/color] playing role of [color=orange]{3}[/color].",
playerInfo.PlayerOOCName, icNameColor, playerInfo.PlayerICName, Loc.GetString(playerInfo.Role)));
Loc.GetString("round-end-summary-window-player-info-if-not-observer-text",
("playerOOCName", playerInfo.PlayerOOCName),
("icNameColor", icNameColor),
("playerICName",playerInfo.PlayerICName),
("playerRole", Loc.GetString(playerInfo.Role))));
}
}
innerScrollContainer.AddChild(playerInfoText);

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Content.Client.HUD;
using Content.Client.Markers;
using Content.Shared.Input;
@@ -45,48 +45,48 @@ namespace Content.Client.Sandbox
Resizable = false;
_gameHud = IoCManager.Resolve<IGameHud>();
Title = "Sandbox Panel";
Title = Loc.GetString("sandbox-window-title");
var vBox = new VBoxContainer { SeparationOverride = 4 };
Contents.AddChild(vBox);
RespawnButton = new Button { Text = Loc.GetString("Respawn") };
RespawnButton = new Button { Text = Loc.GetString("sandbox-window-respawn-button") };
vBox.AddChild(RespawnButton);
SpawnEntitiesButton = new Button { Text = Loc.GetString("Spawn Entities") };
SpawnEntitiesButton = new Button { Text = Loc.GetString("sandbox-window-spawn-entities-button") };
vBox.AddChild(SpawnEntitiesButton);
SpawnTilesButton = new Button { Text = Loc.GetString("Spawn Tiles") };
SpawnTilesButton = new Button { Text = Loc.GetString("sandbox-window-spawn-tiles-button") };
vBox.AddChild(SpawnTilesButton);
GiveFullAccessButton = new Button { Text = Loc.GetString("Grant Full Access") };
GiveFullAccessButton = new Button { Text = Loc.GetString("sandbox-window-grant-full-access-button") };
vBox.AddChild(GiveFullAccessButton);
GiveAghostButton = new Button { Text = Loc.GetString("Ghost") };
GiveAghostButton = new Button { Text = Loc.GetString("sandbox-window-ghost-button") };
vBox.AddChild(GiveAghostButton);
ToggleLightButton = new Button { Text = Loc.GetString("Toggle Lights"), ToggleMode = true, Pressed = !IoCManager.Resolve<ILightManager>().Enabled };
ToggleLightButton = new Button { Text = Loc.GetString("sandbox-window-toggle-lights-button"), ToggleMode = true, Pressed = !IoCManager.Resolve<ILightManager>().Enabled };
vBox.AddChild(ToggleLightButton);
ToggleFovButton = new Button { Text = Loc.GetString("Toggle FOV"), ToggleMode = true, Pressed = !IoCManager.Resolve<IEyeManager>().CurrentEye.DrawFov };
ToggleFovButton = new Button { Text = Loc.GetString("sandbox-window-toggle-fov-button"), ToggleMode = true, Pressed = !IoCManager.Resolve<IEyeManager>().CurrentEye.DrawFov };
vBox.AddChild(ToggleFovButton);
ToggleShadowsButton = new Button { Text = Loc.GetString("Toggle Shadows"), ToggleMode = true, Pressed = !IoCManager.Resolve<ILightManager>().DrawShadows };
ToggleShadowsButton = new Button { Text = Loc.GetString("sandbox-window-toggle-shadows-button"), ToggleMode = true, Pressed = !IoCManager.Resolve<ILightManager>().DrawShadows };
vBox.AddChild(ToggleShadowsButton);
ToggleSubfloorButton = new Button { Text = Loc.GetString("Toggle Subfloor"), ToggleMode = true, Pressed = EntitySystem.Get<SubFloorHideSystem>().ShowAll };
ToggleSubfloorButton = new Button { Text = Loc.GetString("sandbox-window-toggle-subfloor-button"), ToggleMode = true, Pressed = EntitySystem.Get<SubFloorHideSystem>().ShowAll };
vBox.AddChild(ToggleSubfloorButton);
SuicideButton = new Button { Text = Loc.GetString("Suicide") };
SuicideButton = new Button { Text = Loc.GetString("sandbox-window-toggle-suicide-button") };
vBox.AddChild(SuicideButton);
ShowMarkersButton = new Button { Text = Loc.GetString("Show Spawns"), ToggleMode = true, Pressed = EntitySystem.Get<MarkerSystem>().MarkersVisible };
ShowMarkersButton = new Button { Text = Loc.GetString("sandbox-window-show-spawns-button"), ToggleMode = true, Pressed = EntitySystem.Get<MarkerSystem>().MarkersVisible };
vBox.AddChild(ShowMarkersButton);
ShowBbButton = new Button { Text = Loc.GetString("Show BB"), ToggleMode = true, Pressed = IoCManager.Resolve<IDebugDrawing>().DebugColliders };
ShowBbButton = new Button { Text = Loc.GetString("sandbox-window-show-bb-button"), ToggleMode = true, Pressed = IoCManager.Resolve<IDebugDrawing>().DebugColliders };
vBox.AddChild(ShowBbButton);
MachineLinkingButton = new Button { Text = Loc.GetString("Link machines"), ToggleMode = true };
MachineLinkingButton = new Button { Text = Loc.GetString("sandbox-window-link-machines-button"), ToggleMode = true };
vBox.AddChild(MachineLinkingButton);
}

View File

@@ -20,7 +20,7 @@ namespace Content.Client.Suspicion
public override OverlaySpace Space => OverlaySpace.ScreenSpace;
private readonly Font _font;
private readonly string _traitorText = Loc.GetString("Traitor");
private readonly string _traitorText = Loc.GetString("traitor-overlay-traitor-text");
public TraitorOverlay(
IEntityManager entityManager,

View File

@@ -71,8 +71,10 @@ namespace Content.Client.Tools.Components
var fuelCap = _parent.FuelCapacity;
var fuel = _parent.Fuel;
_label.SetMarkup(Loc.GetString("Fuel: [color={0}]{1}/{2}[/color]",
fuel < fuelCap / 4f ? "darkorange" : "orange", Math.Round(fuel), fuelCap));
_label.SetMarkup(Loc.GetString("welder-component-on-examine-detailed-message",
("colorName", fuel < fuelCap / 4f ? "darkorange" : "orange"),
("fuelLeft", Math.Round(fuel)),
("fuelCapacity", fuelCap)));
}
}
}

View File

@@ -1,4 +1,4 @@
using Content.Client.Message;
using Content.Client.Message;
using Content.Client.Resources;
using Content.Client.Stylesheets;
using Content.Shared.Atmos.Components;
@@ -90,7 +90,7 @@ namespace Content.Client.UserInterface.Atmos.GasTank
{
(_lblName = new Label
{
Text = Loc.GetString("Gas Tank"),
Text = Loc.GetString("gas-tank-window-label"),
FontOverride = font,
FontColorOverride = StyleNano.NanoGold,
VerticalAlignment = VAlignment.Center,
@@ -138,7 +138,7 @@ namespace Content.Client.UserInterface.Atmos.GasTank
//internals
_lblInternals = new RichTextLabel
{MinSize = (200, 0), VerticalAlignment = VAlignment.Center};
_btnInternals = new Button {Text = Loc.GetString("Toggle")};
_btnInternals = new Button {Text = Loc.GetString("gas-tank-window-internals-toggle-button") };
_contentContainer.AddChild(
new HBoxContainer
@@ -155,7 +155,7 @@ namespace Content.Client.UserInterface.Atmos.GasTank
_contentContainer.AddChild(new Label
{
Text = Loc.GetString("Output Pressure"),
Text = Loc.GetString("gas-tank-window-output-pressure-label"),
Align = Label.AlignMode.Center
});
_spbPressure = new FloatSpinBox
@@ -181,11 +181,11 @@ namespace Content.Client.UserInterface.Atmos.GasTank
public void UpdateState(GasTankBoundUserInterfaceState state)
{
_lblPressure.SetMarkup(Loc.GetString("Pressure: {0:0.##} kPa", state.TankPressure));
_lblPressure.SetMarkup(Loc.GetString("gas-tank-window-tank-pressure-text", ("tankPressure", $"{state.TankPressure:0.##}")));
_btnInternals.Disabled = !state.CanConnectInternals;
_lblInternals.SetMarkup(Loc.GetString("Internals: [color={0}]{1}[/color]",
state.InternalsConnected ? "green" : "red",
state.InternalsConnected ? "Connected" : "Disconnected"));
_lblInternals.SetMarkup(Loc.GetString("gas-tank-window-internal-text",
("colorName" ,state.InternalsConnected ? "green" : "red"),
("status", state.InternalsConnected ? "Connected" : "Disconnected")));
if (state.OutputPressure.HasValue)
{
_spbPressure.Value = state.OutputPressure.Value;

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
@@ -106,7 +106,7 @@ namespace Content.Client.Verbs
if (!entity.Uid.IsClientSide())
{
_currentVerbListRoot.List.AddChild(new Label { Text = Loc.GetString("Waiting on Server...") });
_currentVerbListRoot.List.AddChild(new Label { Text = Loc.GetString("verb-system-waiting-on-server-text") });
RaiseNetworkEvent(new VerbSystemMessages.RequestVerbsMessage(_currentEntity));
}
@@ -251,7 +251,7 @@ namespace Content.Client.Verbs
else
{
var panel = new PanelContainer();
panel.AddChild(new Label { Text = Loc.GetString("No verbs!") });
panel.AddChild(new Label { Text = Loc.GetString("verb-system-no-verbs-text") });
vBox.AddChild(panel);
}
}

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using Content.Client.Stylesheets;
using JetBrains.Annotations;
using Robust.Client.AutoGenerated;
@@ -100,8 +100,8 @@ namespace Content.Client.Voting.UI
public sealed class VoteMenuCommand : IConsoleCommand
{
public string Command => "votemenu";
public string Description => "Opens the voting menu";
public string Help => "Usage: votemenu";
public string Description => Loc.GetString("ui-vote-menu-command-description");
public string Help => Loc.GetString("ui-vote-menu-command-help-text");
public void Execute(IConsoleShell shell, string argStr, string[] args)
{

View File

@@ -154,7 +154,7 @@ namespace Content.Client.Wires.UI
}),
(_serialLabel = new Label
{
Text = "DEAD-BEEF",
Text = Loc.GetString("wires-menu-dead-beef-text"),
FontOverride = fontSmall,
FontColorOverride = Color.Gray,
VerticalAlignment = VAlignment.Center,