19
19
from typing_extensions import Literal
20
20
21
21
from zulipterminal .api_types import Composition , Message
22
+ from zulipterminal .config .keys import primary_display_key_for_command
22
23
from zulipterminal .config .symbols import POPUP_CONTENT_BORDER , POPUP_TOP_LINE
23
24
from zulipterminal .config .themes import ThemeSpec
24
25
from zulipterminal .config .ui_sizes import (
51
52
52
53
ExceptionInfo = Tuple [Type [BaseException ], BaseException , TracebackType ]
53
54
55
+ SCROLL_PROMPT = (
56
+ "("
57
+ + primary_display_key_for_command ("GO_UP" )
58
+ + " / "
59
+ + primary_display_key_for_command ("GO_DOWN" )
60
+ + " scrolls)"
61
+ )
62
+
54
63
55
64
class Controller :
56
65
"""
@@ -246,11 +255,11 @@ def exit_popup(self) -> None:
246
255
self .loop .widget = self .view
247
256
248
257
def show_help (self ) -> None :
249
- help_view = HelpView (self , "Help Menu (up/down scrolls) " )
258
+ help_view = HelpView (self , f "Help Menu { SCROLL_PROMPT } " )
250
259
self .show_pop_up (help_view , "area:help" )
251
260
252
261
def show_markdown_help (self ) -> None :
253
- markdown_view = MarkdownHelpView (self , "Markdown Help Menu (up/down scrolls)" )
262
+ markdown_view = MarkdownHelpView (self , "Markdown Help Menu " + SCROLL_PROMPT )
254
263
self .show_pop_up (markdown_view , "area:help" )
255
264
256
265
def show_topic_edit_mode (self , button : Any ) -> None :
@@ -266,7 +275,7 @@ def show_msg_info(
266
275
msg_info_view = MsgInfoView (
267
276
self ,
268
277
msg ,
269
- "Message Information (up/down scrolls) " ,
278
+ f "Message Information { SCROLL_PROMPT } " ,
270
279
topic_links ,
271
280
message_links ,
272
281
time_mentions ,
@@ -315,7 +324,10 @@ def show_about(self) -> None:
315
324
def show_user_info (self , user_id : int ) -> None :
316
325
self .show_pop_up (
317
326
UserInfoView (
318
- self , user_id , "User Information (up/down scrolls)" , "USER_INFO"
327
+ self ,
328
+ user_id ,
329
+ f"User Information { SCROLL_PROMPT } " ,
330
+ "USER_INFO" ,
319
331
),
320
332
"area:user" ,
321
333
)
@@ -325,7 +337,7 @@ def show_msg_sender_info(self, user_id: int) -> None:
325
337
UserInfoView (
326
338
self ,
327
339
user_id ,
328
- "Message Sender Information (up/down scrolls) " ,
340
+ f "Message Sender Information { SCROLL_PROMPT } " ,
329
341
"MSG_SENDER_INFO" ,
330
342
),
331
343
"area:user" ,
@@ -345,7 +357,7 @@ def show_full_rendered_message(
345
357
topic_links ,
346
358
message_links ,
347
359
time_mentions ,
348
- "Full rendered message (up/down scrolls) " ,
360
+ f "Full rendered message { SCROLL_PROMPT } " ,
349
361
),
350
362
"area:msg" ,
351
363
)
@@ -364,7 +376,7 @@ def show_full_raw_message(
364
376
topic_links ,
365
377
message_links ,
366
378
time_mentions ,
367
- "Full raw message (up/down scrolls) " ,
379
+ f "Full raw message { SCROLL_PROMPT } " ,
368
380
),
369
381
"area:msg" ,
370
382
)
@@ -383,7 +395,7 @@ def show_edit_history(
383
395
topic_links ,
384
396
message_links ,
385
397
time_mentions ,
386
- "Edit History (up/down scrolls) " ,
398
+ f "Edit History { SCROLL_PROMPT } " ,
387
399
),
388
400
"area:msg" ,
389
401
)
0 commit comments