@@ -147,44 +147,69 @@ addCommands({
147
147
show_search : {
148
148
group : "find" ,
149
149
pos : 0 ,
150
- title : "Show panel for searching in this document" ,
151
- label : "Search" ,
150
+ title : defineMessage ( {
151
+ id : "command.generic.show_search.tooltip" ,
152
+ defaultMessage : "Show panel for searching in this document" ,
153
+ } ) ,
154
+ label : labels . search ,
152
155
icon : "search" ,
153
156
} ,
154
157
show_overview : {
155
158
group : "show-frames" ,
156
- title : "Show overview of all pages" ,
159
+ title : defineMessage ( {
160
+ id : "command.generic.show_overview.tooltip" ,
161
+ defaultMessage : "Show overview of all pages" ,
162
+ description : "All pages in a document" ,
163
+ } ) ,
157
164
label : labels . overview ,
158
165
icon : "overview" ,
159
166
} ,
160
167
show_pages : {
161
168
group : "show-frames" ,
162
- title : "Show all pages of this document" ,
163
- label : "Pages" ,
169
+ title : defineMessage ( {
170
+ id : "command.generic.show_pages.tooltip" ,
171
+ defaultMessage : "Show all pages of this document" ,
172
+ description : "All pages in a document" ,
173
+ } ) ,
174
+ label : labels . pages ,
164
175
icon : "pic-centered" ,
165
176
} ,
166
177
show_slideshow : {
167
178
group : "show-frames" ,
168
- title : "Display Slideshow Presentation" ,
179
+ title : defineMessage ( {
180
+ id : "command.generic.show_slideshow.tooltip" ,
181
+ defaultMessage : "Display Slideshow Presentation" ,
182
+ } ) ,
169
183
label : labels . slideshow ,
170
184
icon : "play-square" ,
171
185
} ,
172
186
show_speaker_notes : {
173
187
group : "show-frames" ,
174
- title : "Show Speaker Notes" ,
188
+ title : defineMessage ( {
189
+ id : "command.generic.show_speaker_notes.tooltip" ,
190
+ defaultMessage : "Show Speaker Notes" ,
191
+ description : "Speaker Notes for a Slideshow Presentation" ,
192
+ } ) ,
175
193
label : "Speaker Notes" ,
176
194
icon : "pencil" ,
177
195
} ,
178
196
shell : {
179
197
group : "show-frames" ,
180
- title : "Open a terminal for running code" ,
198
+ title : defineMessage ( {
199
+ id : "command.generic.shell.tooltip" ,
200
+ defaultMessage : "Open a terminal for running code" ,
201
+ } ) ,
181
202
icon : "terminal" ,
182
203
disable : "disableTerminals" ,
183
204
label : "Shell" ,
184
205
} ,
185
206
terminal : {
186
207
group : "show-frames" ,
187
- title : "Open a command line terminal for interacting with the Linux prompt" ,
208
+ title : defineMessage ( {
209
+ id : "command.generic.terminal.tooltip" ,
210
+ defaultMessage :
211
+ "Open a command-line terminal for interacting with the Linux prompt" ,
212
+ } ) ,
188
213
icon : "terminal" ,
189
214
disable : "disableTerminals" ,
190
215
label : labels . terminal ,
@@ -256,7 +281,10 @@ addCommands({
256
281
set_zoom : {
257
282
pos : 5 ,
258
283
group : "zoom" ,
259
- title : "Zoom to a preset size" ,
284
+ title : defineMessage ( {
285
+ id : "command.generic.set_zoom.tooltip" ,
286
+ defaultMessage : "Zoom to a preset size" ,
287
+ } ) ,
260
288
label : ( { props } ) => (
261
289
< span >
262
290
{ props . font_size == null
@@ -316,7 +344,11 @@ addCommands({
316
344
group : "copy" ,
317
345
pos : 0 ,
318
346
label : labels . cut ,
319
- title : "Cut selection" ,
347
+ title : defineMessage ( {
348
+ id : "command.generic.cut.tooltip" ,
349
+ defaultMessage : "Cut selection" ,
350
+ description : "Cut text in a text editor" ,
351
+ } ) ,
320
352
icon : "scissors" ,
321
353
keyboard : `${ IS_MACOS ? "⌘" : "control" } + X` ,
322
354
disabled : ( { readOnly } ) => readOnly ,
@@ -325,15 +357,23 @@ addCommands({
325
357
group : "copy" ,
326
358
pos : 1 ,
327
359
label : labels . copy ,
328
- title : "Copy selection" ,
360
+ title : defineMessage ( {
361
+ id : "command.generic.copy.tooltip" ,
362
+ defaultMessage : "Copy selection" ,
363
+ description : "Copy text in a text editor" ,
364
+ } ) ,
329
365
icon : "copy" ,
330
366
keyboard : `${ IS_MACOS ? "⌘" : "control" } + C` ,
331
367
} ,
332
368
paste : {
333
369
group : "copy" ,
334
370
pos : 2 ,
335
371
label : labels . paste ,
336
- title : "Paste buffer" ,
372
+ title : defineMessage ( {
373
+ id : "command.generic.paste.tooltip" ,
374
+ defaultMessage : "Insert cut or copied text at the cursor position" ,
375
+ description : "Paste text in a text editor" ,
376
+ } ) ,
337
377
icon : "paste" ,
338
378
keyboard : `${ IS_MACOS ? "⌘" : "control" } + V` ,
339
379
disabled : ( { readOnly } ) => readOnly ,
@@ -432,8 +472,14 @@ addCommands({
432
472
restart : {
433
473
group : "action" ,
434
474
icon : "sync" ,
435
- label : "Restart Server" ,
436
- title : "Restart the backend service" ,
475
+ label : defineMessage ( {
476
+ id : "command.generic.restart.label" ,
477
+ defaultMessage : "Restart Server" ,
478
+ } ) ,
479
+ title : defineMessage ( {
480
+ id : "command.generic.restart.tooltip" ,
481
+ defaultMessage : "Restart the backend service" ,
482
+ } ) ,
437
483
} ,
438
484
439
485
kick_other_users_out : {
@@ -691,8 +737,11 @@ addCommands({
691
737
export_to_markdown : {
692
738
group : "export" ,
693
739
label : "Export to Markdown" ,
694
- title :
695
- "Create and open a markdown version of current view of this document." ,
740
+ title : defineMessage ( {
741
+ id : "command.generic.export_to_markdown.tooltip" ,
742
+ defaultMessage :
743
+ "Create and open a markdown version of current view of this document." ,
744
+ } ) ,
696
745
icon : "markdown" ,
697
746
} ,
698
747
@@ -713,8 +762,16 @@ addCommands({
713
762
714
763
tour : {
715
764
group : "tour" ,
716
- label : "Take the Tour" ,
717
- title : "Take a guided tour of the user interface for this editor." ,
765
+ label : defineMessage ( {
766
+ id : "command.generic.tour.label" ,
767
+ defaultMessage : "Take the Tour" ,
768
+ description : "Interactive tour for explaining a user-interface" ,
769
+ } ) ,
770
+ title : defineMessage ( {
771
+ id : "command.generic.tour.tooltip" ,
772
+ defaultMessage :
773
+ "Take a guided tour of the user interface for this editor." ,
774
+ } ) ,
718
775
icon : "map" ,
719
776
neverVisibleOnMobile : true ,
720
777
onClick : ( { props } ) => {
@@ -889,7 +946,11 @@ addCommands({
889
946
pos : 10 ,
890
947
group : "misc-file-actions" ,
891
948
icon : "upload" ,
892
- title : "Upload a file or directory from your compute to the server" ,
949
+ title : defineMessage ( {
950
+ id : "command.generic.upload.tooltip" ,
951
+ defaultMessage :
952
+ "Upload a file or directory from your compute to the server" ,
953
+ } ) ,
893
954
label : labels . upload ,
894
955
...fileAction ( "upload" ) ,
895
956
} ,
@@ -921,14 +982,17 @@ addCommands({
921
982
defaultMessage :
922
983
"Show a printable version of this document in a popup window." ,
923
984
} ) ,
924
-
925
985
label : labels . print ,
926
986
} ,
927
987
new : {
928
988
pos : 0 ,
929
989
group : "new-open" ,
930
990
icon : "plus-circle" ,
931
- title : "Create a new file" ,
991
+ title : defineMessage ( {
992
+ id : "menu.generic.new.tooltip" ,
993
+ defaultMessage : "Create a new file" ,
994
+ description : "A file in a file-system" ,
995
+ } ) ,
932
996
label : menu . new_file ,
933
997
...fileAction ( "new" ) ,
934
998
} ,
@@ -1018,8 +1082,13 @@ addCommands({
1018
1082
"Opens a chatroom next to the document to chat with other users (collaborators) or an AI chatbot" ,
1019
1083
} ) ,
1020
1084
button : labels . chat ,
1021
- title :
1022
- "Open chat on the side of this file for chatting with project collaborators or AI about this file." ,
1085
+ title : defineMessage ( {
1086
+ id : "command.generic.chat.tooltip" ,
1087
+ defaultMessage :
1088
+ "Open chat on the side of this file for chatting with project collaborators or AI about this file." ,
1089
+ description :
1090
+ "Opens a chatroom next to the document to chat with other users (collaborators) or an AI chatbot" ,
1091
+ } ) ,
1023
1092
onClick : ( { props } ) => {
1024
1093
redux . getProjectActions ( props . project_id ) . open_chat ( { path : props . path } ) ;
1025
1094
} ,
@@ -1127,9 +1196,9 @@ addCommands({
1127
1196
pos : 10 ,
1128
1197
group : "settings" ,
1129
1198
icon : "gear" ,
1130
- title : "Settings" ,
1131
- label : "Settings" ,
1132
- button : "Settings" ,
1199
+ title : labels . settings ,
1200
+ label : labels . settings ,
1201
+ button : labels . settings ,
1133
1202
onClick : ( { props } ) => {
1134
1203
props . actions . settings ?.( ) ;
1135
1204
} ,
0 commit comments