Skip to content

Commit abc476d

Browse files
authored
Merge pull request #40 from Flow-Launcher/improve_documents
Improve documents about xaml comments
2 parents 6a683d8 + c8eae40 commit abc476d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

localization-toolkit.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,24 @@ To this:
5959
Localize.flowlauncher_plugin_localization_demo_value_with_keys(firstName, lastName);
6060
```
6161

62+
If you would like to add summary for functions of localization strings, you need to comment strings in xaml files like this:
63+
```xml
64+
<!--
65+
<summary>Demo plugin name</summary>
66+
-->
67+
<system:String x:Key="flowlauncher_plugin_localization_demo_plugin_name">Demo</system:String>
68+
```
69+
70+
Or if you would like to change the default types or names of variables in localization strings, you need to comment strings in xaml file like this:
71+
```xml
72+
<!--
73+
<param index="0" name="value0" type="object" />
74+
<param index="1" name="value1" type="string" />
75+
<param index="2" name="value2" type="int" />
76+
-->
77+
<system:String x:Key="flowlauncher_plugin_localization_demo_value_with_keys">Demo {2:00}, {1,-35:D} and {0}</system:String>
78+
```
79+
6280
### Localized Enums
6381

6482
For enum types (e.g., `DemoEnum`) that need localization in UI controls such as combo boxes, use the `EnumLocalize` attribute to enable localization. For each enum field:

0 commit comments

Comments
 (0)