File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Flow.Launcher.Localization.Shared
Flow.Launcher.Localization.SourceGenerators/Localize Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public static class Constants
20
20
public const string OldLocalizationMethodName = "GetTranslation" ;
21
21
public const string StringFormatMethodName = "Format" ;
22
22
public const string StringFormatTypeName = "string" ;
23
+ public const string EnumLocalizeClassSuffix = "Localized" ;
23
24
public const string EnumLocalizeAttributeName = "EnumLocalizeAttribute" ;
24
25
public const string EnumLocalizeKeyAttributeName = "EnumLocalizeKeyAttribute" ;
25
26
public const string EnumLocalizeValueAttributeName = "EnumLocalizeValueAttribute" ;
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ private void GenerateSource(
174
174
var enumFullName = enumSymbol . ToDisplayString ( new SymbolDisplayFormat (
175
175
globalNamespaceStyle : SymbolDisplayGlobalNamespaceStyle . Omitted , // Remove global:: symbol
176
176
typeQualificationStyle : SymbolDisplayTypeQualificationStyle . NameAndContainingTypesAndNamespaces ) ) ;
177
- var enumDataClassName = $ "{ enumSymbol . Name } { Constants . ClassName } ";
177
+ var enumDataClassName = $ "{ enumSymbol . Name } { Constants . EnumLocalizeClassSuffix } ";
178
178
var enumName = enumSymbol . Name ;
179
179
var enumNamespace = enumSymbol . ContainingNamespace . ToDisplayString ( ) ;
180
180
var tabString = Helper . Spacing ( 1 ) ;
Original file line number Diff line number Diff line change @@ -91,11 +91,11 @@ public enum DemoEnum
91
91
}
92
92
```
93
93
94
- Then, use the generated ` DemoEnumLocalize ` class within your view model to bind to a combo box control:
94
+ Then, use the generated ` DemoEnumLocalized ` class within your view model to bind to a combo box control:
95
95
96
96
``` csharp
97
97
// ComboBox ItemSource
98
- public List < DemoEnumLocalize > AllDemoEnums { get ; } = DemoEnumLocalize .GetValues ();
98
+ public List < DemoEnumLocalized > AllDemoEnums { get ; } = DemoEnumLocalized .GetValues ();
99
99
100
100
// ComboBox SelectedValue
101
101
public DemoEnum SelectedDemoEnum { get ; set ; }
You can’t perform that action at this time.
0 commit comments