Skip to content

Commit 2b8e466

Browse files
committed
Add translation keys for sys commands
Signed-off-by: Florian Grabmeier <[email protected]>
1 parent 5351e57 commit 2b8e466

File tree

2 files changed

+40
-19
lines changed

2 files changed

+40
-19
lines changed

Plugins/Flow.Launcher.Plugin.Sys/Languages/en.xaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@
77
<system:String x:Key="flowlauncher_plugin_sys_command">Command</system:String>
88
<system:String x:Key="flowlauncher_plugin_sys_desc">Description</system:String>
99

10+
<system:String x:Key="flowlauncher_plugin_sys_shutdown_computer_cmd">Shutdown</system:String>
11+
<system:String x:Key="flowlauncher_plugin_sys_restart_computer_cmd">Restart</system:String>
12+
<system:String x:Key="flowlauncher_plugin_sys_restart_advanced_cmd">Restart With Advanced Boot Options</system:String>
13+
<system:String x:Key="flowlauncher_plugin_sys_log_off_cmd">Log Off</system:String>
14+
<system:String x:Key="flowlauncher_plugin_sys_lock_cmd">Lock</system:String>
15+
<system:String x:Key="flowlauncher_plugin_sys_sleep_cmd">Sleep</system:String>
16+
<system:String x:Key="flowlauncher_plugin_sys_hibernate_cmd">Hibernate</system:String>
17+
<system:String x:Key="flowlauncher_plugin_sys_indexoption_cmd">Index Option</system:String>
18+
<system:String x:Key="flowlauncher_plugin_sys_emptyrecyclebin_cmd">Empty Recycle Bin</system:String>
19+
<system:String x:Key="flowlauncher_plugin_sys_openrecyclebin_cmd">Open Recycle Bin</system:String>
20+
<system:String x:Key="flowlauncher_plugin_sys_exit_cmd">Exit</system:String>
21+
<system:String x:Key="flowlauncher_plugin_sys_save_all_settings_cmd">Save Settings</system:String>
22+
<system:String x:Key="flowlauncher_plugin_sys_restart_cmd">Restart Flow Launcher"</system:String>
23+
<system:String x:Key="flowlauncher_plugin_sys_setting_cmd">Settings</system:String>
24+
<system:String x:Key="flowlauncher_plugin_sys_reload_plugin_data_cmd">Reload Plugin Data</system:String>
25+
<system:String x:Key="flowlauncher_plugin_sys_check_for_update_cmd">Check For Update</system:String>
26+
<system:String x:Key="flowlauncher_plugin_sys_open_log_location_cmd">Open Log Location</system:String>
27+
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips_cmd">Flow Launcher Tips</system:String>
28+
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location_cmd">Flow Launcher UserData Folder</system:String>
29+
30+
<!-- Command Descriptions -->
1031
<system:String x:Key="flowlauncher_plugin_sys_shutdown_computer">Shutdown Computer</system:String>
1132
<system:String x:Key="flowlauncher_plugin_sys_restart_computer">Restart Computer</system:String>
1233
<system:String x:Key="flowlauncher_plugin_sys_restart_advanced">Restart the computer with Advanced Boot Options for Safe and Debugging modes, as well as other options</system:String>

Plugins/Flow.Launcher.Plugin.Sys/Main.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private List<Result> Commands()
8989
{
9090
new Result
9191
{
92-
Title = "Shutdown",
92+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_shutdown_computer_cmd"),
9393
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_shutdown_computer"),
9494
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe7e8"),
9595
IcoPath = "Images\\shutdown.png",
@@ -109,7 +109,7 @@ private List<Result> Commands()
109109
},
110110
new Result
111111
{
112-
Title = "Restart",
112+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_restart_computer_cmd"),
113113
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_restart_computer"),
114114
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe777"),
115115
IcoPath = "Images\\restart.png",
@@ -129,7 +129,7 @@ private List<Result> Commands()
129129
},
130130
new Result
131131
{
132-
Title = "Restart With Advanced Boot Options",
132+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_restart_advanced_cmd"),
133133
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_restart_advanced"),
134134
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xecc5"),
135135
IcoPath = "Images\\restart_advanced.png",
@@ -148,7 +148,7 @@ private List<Result> Commands()
148148
},
149149
new Result
150150
{
151-
Title = "Log Off",
151+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_log_off_cmd"),
152152
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_log_off"),
153153
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe77b"),
154154
IcoPath = "Images\\logoff.png",
@@ -167,7 +167,7 @@ private List<Result> Commands()
167167
},
168168
new Result
169169
{
170-
Title = "Lock",
170+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_lock_cmd"),
171171
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_lock"),
172172
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe72e"),
173173
IcoPath = "Images\\lock.png",
@@ -179,15 +179,15 @@ private List<Result> Commands()
179179
},
180180
new Result
181181
{
182-
Title = "Sleep",
182+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_sleep_cmd"),
183183
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_sleep"),
184184
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xec46"),
185185
IcoPath = "Images\\sleep.png",
186186
Action = c => FormsApplication.SetSuspendState(PowerState.Suspend, false, false)
187187
},
188188
new Result
189189
{
190-
Title = "Hibernate",
190+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_hibernate_cmd"),
191191
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_hibernate"),
192192
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe945"),
193193
IcoPath = "Images\\hibernate.png",
@@ -204,7 +204,7 @@ private List<Result> Commands()
204204
},
205205
new Result
206206
{
207-
Title = "Index Option",
207+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_restart_explorer_cmd"),
208208
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_indexoption"),
209209
IcoPath = "Images\\indexoption.png",
210210
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe773"),
@@ -219,7 +219,7 @@ private List<Result> Commands()
219219
},
220220
new Result
221221
{
222-
Title = "Empty Recycle Bin",
222+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_emptyrecyclebin_cmd"),
223223
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_emptyrecyclebin"),
224224
IcoPath = "Images\\recyclebin.png",
225225
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"),
@@ -242,7 +242,7 @@ private List<Result> Commands()
242242
},
243243
new Result
244244
{
245-
Title = "Open Recycle Bin",
245+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_openrecyclebin_cmd"),
246246
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_openrecyclebin"),
247247
IcoPath = "Images\\openrecyclebin.png",
248248
Glyph = new GlyphInfo (FontFamily:"/Resources/#Segoe Fluent Icons", Glyph:"\xe74d"),
@@ -257,7 +257,7 @@ private List<Result> Commands()
257257
},
258258
new Result
259259
{
260-
Title = "Exit",
260+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_exit_cmd"),
261261
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_exit"),
262262
IcoPath = "Images\\app.png",
263263
Action = c =>
@@ -268,7 +268,7 @@ private List<Result> Commands()
268268
},
269269
new Result
270270
{
271-
Title = "Save Settings",
271+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_save_all_settings_cmd"),
272272
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_save_all_settings"),
273273
IcoPath = "Images\\app.png",
274274
Action = c =>
@@ -281,7 +281,7 @@ private List<Result> Commands()
281281
},
282282
new Result
283283
{
284-
Title = "Restart Flow Launcher",
284+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_restart_cmd"),
285285
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_restart"),
286286
IcoPath = "Images\\app.png",
287287
Action = c =>
@@ -292,7 +292,7 @@ private List<Result> Commands()
292292
},
293293
new Result
294294
{
295-
Title = "Settings",
295+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_setting_cmd"),
296296
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_setting"),
297297
IcoPath = "Images\\app.png",
298298
Action = c =>
@@ -303,7 +303,7 @@ private List<Result> Commands()
303303
},
304304
new Result
305305
{
306-
Title = "Reload Plugin Data",
306+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_reload_plugin_data_cmd"),
307307
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_reload_plugin_data"),
308308
IcoPath = "Images\\app.png",
309309
Action = c =>
@@ -323,7 +323,7 @@ private List<Result> Commands()
323323
},
324324
new Result
325325
{
326-
Title = "Check For Update",
326+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_check_for_update_cmd"),
327327
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_check_for_update"),
328328
IcoPath = "Images\\checkupdate.png",
329329
Action = c =>
@@ -335,7 +335,7 @@ private List<Result> Commands()
335335
},
336336
new Result
337337
{
338-
Title = "Open Log Location",
338+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_open_log_location_cmd"),
339339
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_log_location"),
340340
IcoPath = "Images\\app.png",
341341
Action = c =>
@@ -347,7 +347,7 @@ private List<Result> Commands()
347347
},
348348
new Result
349349
{
350-
Title = "Flow Launcher Tips",
350+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_open_docs_tips_cmd"),
351351
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_docs_tips"),
352352
IcoPath = "Images\\app.png",
353353
Action = c =>
@@ -358,7 +358,7 @@ private List<Result> Commands()
358358
},
359359
new Result
360360
{
361-
Title = "Flow Launcher UserData Folder",
361+
Title = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location_cmd"),
362362
SubTitle = context.API.GetTranslation("flowlauncher_plugin_sys_open_userdata_location"),
363363
IcoPath = "Images\\app.png",
364364
Action = c =>

0 commit comments

Comments
 (0)