mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-20 00:08:38 +00:00
Prepare ConfigGenerator for localization
This commit is contained in:
28
ConfigGenerator/LocalizedCategoryAttribute.cs
Normal file
28
ConfigGenerator/LocalizedCategoryAttribute.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.ComponentModel;
|
||||
using ConfigGenerator.Localization;
|
||||
|
||||
namespace ConfigGenerator {
|
||||
internal sealed class LocalizedCategoryAttribute : CategoryAttribute {
|
||||
internal LocalizedCategoryAttribute(string key) : base(key) { }
|
||||
|
||||
protected override string GetLocalizedString(string value) {
|
||||
switch (value) {
|
||||
case "Access":
|
||||
return CGStrings.CategoryAccess;
|
||||
case "Advanced":
|
||||
return CGStrings.CategoryAdvanced;
|
||||
case "Core":
|
||||
return '\t' + CGStrings.CategoryCore;
|
||||
case "Debugging":
|
||||
return CGStrings.CategoryDebugging;
|
||||
case "Performance":
|
||||
return CGStrings.CategoryPerformance;
|
||||
case "Updates":
|
||||
return CGStrings.CategoryUpdates;
|
||||
default:
|
||||
Logging.LogGenericWarning("Unknown value: " + value);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user