Skip to content

Commit

Permalink
Use translations for common constants
Browse files Browse the repository at this point in the history
Yes/No may lose shortcuts but these are currently non-translatable anyway.

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
  • Loading branch information
alshopov committed Feb 16, 2020
1 parent cfadcb3 commit e8b7086
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gui-lib/mred/private/messagebox.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
racket/string
racket/snip/private/style
racket/draw
string-constants
(prefix-in wx: "kernel.rkt")
"const.rkt"
"check.rkt"
Expand Down Expand Up @@ -101,7 +102,7 @@
(send w popup-menu
(let ([m (make-object popup-menu%)])
(make-object menu-item%
"Copy Message"
(string-constant install-pkg-copy)
m
(lambda (i e)
(send (wx:get-the-clipboard)
Expand Down Expand Up @@ -270,11 +271,11 @@
(let-values ([(one two one-v two-v close-val default)
(cond
[(memq 'ok style)
(values "OK" #f 'ok #f 1 'default=1)]
(values (string-constant ok) #f 'ok #f 1 'default=1)]
[(memq 'ok-cancel style)
(values "OK" "Cancel" 'ok 'cancel 2 'default=1)]
(values (string-constant ok) (string-constant cancel) 'ok 'cancel 2 'default=1)]
[(memq 'yes-no style)
(values "&Yes" "&No" 'yes 'no #f 'no-default)])])
(values (string-constant yes) (string-constant no) 'yes 'no #f 'no-default)])])
(let-values ([(result checked?)
(do-message-box/custom who
title message
Expand Down

0 comments on commit e8b7086

Please sign in to comment.