CargoConsoleMenu localization (#25931)

- every category of type "cargoProduct" was edited to "cargoproduct-category-name-{categoryName}"
- file "cargoproduct-categories.ftl" was added to english localization to localize categories of cargoProduct
- CargoConsoleMenu.xaml.cs got tweaks which prevent issues with strings comparisons
This commit is contained in:
MODERN
2024-03-09 09:56:39 +03:00
committed by GitHub
parent 1a1bdec6c1
commit 6e38b992cf
20 changed files with 211 additions and 195 deletions

View File

@@ -93,7 +93,7 @@ namespace Content.Client.Cargo.UI
if (search.Length == 0 && _category == null ||
search.Length != 0 && prototype.Name.ToLowerInvariant().Contains(search) ||
search.Length != 0 && prototype.Description.ToLowerInvariant().Contains(search) ||
search.Length == 0 && _category != null && prototype.Category.Equals(_category))
search.Length == 0 && _category != null && Loc.GetString(prototype.Category).Equals(_category))
{
var button = new CargoProductRow
{
@@ -122,7 +122,7 @@ namespace Content.Client.Cargo.UI
foreach (var prototype in ProductPrototypes)
{
if (!_categoryStrings.Contains(prototype.Category))
if (!_categoryStrings.Contains(Loc.GetString(prototype.Category)))
{
_categoryStrings.Add(Loc.GetString(prototype.Category));
}