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
2020 public const string OldLocalizationMethodName = "GetTranslation" ;
2121 public const string StringFormatMethodName = "Format" ;
2222 public const string StringFormatTypeName = "string" ;
23+ public const string EnumLocalizeClassSuffix = "Localized" ;
2324 public const string EnumLocalizeAttributeName = "EnumLocalizeAttribute" ;
2425 public const string EnumLocalizeKeyAttributeName = "EnumLocalizeKeyAttribute" ;
2526 public const string EnumLocalizeValueAttributeName = "EnumLocalizeValueAttribute" ;
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ private void GenerateSource(
174174 var enumFullName = enumSymbol . ToDisplayString ( new SymbolDisplayFormat (
175175 globalNamespaceStyle : SymbolDisplayGlobalNamespaceStyle . Omitted , // Remove global:: symbol
176176 typeQualificationStyle : SymbolDisplayTypeQualificationStyle . NameAndContainingTypesAndNamespaces ) ) ;
177- var enumDataClassName = $ "{ enumSymbol . Name } { Constants . ClassName } ";
177+ var enumDataClassName = $ "{ enumSymbol . Name } { Constants . EnumLocalizeClassSuffix } ";
178178 var enumName = enumSymbol . Name ;
179179 var enumNamespace = enumSymbol . ContainingNamespace . ToDisplayString ( ) ;
180180 var tabString = Helper . Spacing ( 1 ) ;
Original file line number Diff line number Diff line change @@ -91,11 +91,11 @@ public enum DemoEnum
9191}
9292```
9393
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:
9595
9696``` csharp
9797// ComboBox ItemSource
98- public List < DemoEnumLocalize > AllDemoEnums { get ; } = DemoEnumLocalize .GetValues ();
98+ public List < DemoEnumLocalized > AllDemoEnums { get ; } = DemoEnumLocalized .GetValues ();
9999
100100// ComboBox SelectedValue
101101public DemoEnum SelectedDemoEnum { get ; set ; }
You can’t perform that action at this time.
0 commit comments