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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user