From 26378f3869e01acd022043e8741e4c001a62d6ec Mon Sep 17 00:00:00 2001 From: AJCM-git <60196617+AJCM-git@users.noreply.github.com> Date: Sun, 28 Feb 2021 20:02:03 -0400 Subject: [PATCH] Fix stack localization (#3455) --- Content.Client/GameObjects/Components/StackComponent.cs | 8 ++++---- .../GameObjects/Components/Stack/StackComponent.cs | 6 +++--- Resources/Locale/en-US/components/stack-component.ftl | 9 ++++++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Content.Client/GameObjects/Components/StackComponent.cs b/Content.Client/GameObjects/Components/StackComponent.cs index 8b54c61130..ab82d64059 100644 --- a/Content.Client/GameObjects/Components/StackComponent.cs +++ b/Content.Client/GameObjects/Components/StackComponent.cs @@ -29,11 +29,11 @@ namespace Content.Client.GameObjects.Components { var valueChanged = value != Count; base.Count = value; - + if (valueChanged) { _appearanceComponent?.SetData(StackVisuals.Actual, Count); - + } _uiUpdateNeeded = true; @@ -76,8 +76,8 @@ namespace Content.Client.GameObjects.Components _parent._uiUpdateNeeded = false; - _label.SetMarkup(Loc.GetString("Count: [color=white]{0}[/color]", _parent.Count)); + _label.SetMarkup(Loc.GetString("comp-stack-status", ("count", _parent.Count))); } } } -} \ No newline at end of file +} diff --git a/Content.Server/GameObjects/Components/Stack/StackComponent.cs b/Content.Server/GameObjects/Components/Stack/StackComponent.cs index 6b144fbbac..191994e456 100644 --- a/Content.Server/GameObjects/Components/Stack/StackComponent.cs +++ b/Content.Server/GameObjects/Components/Stack/StackComponent.cs @@ -110,7 +110,7 @@ namespace Content.Server.GameObjects.Components.Stack 300, () => popupPos.PopupMessage( eventArgs.User, - Loc.GetString("stack-component-becomes-full") + Loc.GetString("comp-stack-becomes-full") ) ); } @@ -119,7 +119,7 @@ namespace Content.Server.GameObjects.Components.Stack { popupPos.PopupMessage( eventArgs.User, - Loc.GetString("stack-component-already-full") + Loc.GetString("comp-stack-already-full") ); } @@ -132,7 +132,7 @@ namespace Content.Server.GameObjects.Components.Stack { message.AddMarkup( Loc.GetString( - "stack-component-examine-detail-count", + "comp-stack-examine-detail-count", ("count", Count), ("markupCountColor", "lightgray") ) diff --git a/Resources/Locale/en-US/components/stack-component.ftl b/Resources/Locale/en-US/components/stack-component.ftl index f28d9f329a..17ec78a34e 100644 --- a/Resources/Locale/en-US/components/stack-component.ftl +++ b/Resources/Locale/en-US/components/stack-component.ftl @@ -2,15 +2,18 @@ ### UI # Shown when a stack is examined in details range -stack-component-examine-detail-count = {$count -> +comp-stack-examine-detail-count = {$count -> [one] There is [color={$markupCountColor}]{$count}[/color] thing *[other] There are [color={$markupCountColor}]{$count}[/color] things } in the stack. +# Stack status control +comp-stack-status = Count: [color=white]{$count}[/color] + ### Interaction Messages # Shown when attempting to add to a stack that is full -stack-component-already-full = Stack is already full. +comp-stack-already-full = Stack is already full. # Shown when a stack becomes full -stack-component-becomes-full = Stack is now full. \ No newline at end of file +comp-stack-becomes-full = Stack is now full.