Skip to content

Commit 72ad90f

Browse files
committed
Use translations for common constants
Yes/No may lose shortcuts but these are currently non-translatable anyway. Signed-off-by: Alexander Shopov <[email protected]>
1 parent cfadcb3 commit 72ad90f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

gui-lib/info.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"pict-lib"
1414
"scheme-lib"
1515
"scribble-lib"
16-
["string-constants-lib" #:version "1.24"]
16+
["string-constants-lib" #:version "1.33"]
1717
"option-contract-lib"
1818
"2d-lib"
1919
"compatibility-lib"

gui-lib/mred/private/messagebox.rkt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
racket/string
55
racket/snip/private/style
66
racket/draw
7+
string-constants
78
(prefix-in wx: "kernel.rkt")
89
"const.rkt"
910
"check.rkt"
@@ -101,7 +102,7 @@
101102
(send w popup-menu
102103
(let ([m (make-object popup-menu%)])
103104
(make-object menu-item%
104-
"Copy Message"
105+
(string-constant install-pkg-copy)
105106
m
106107
(lambda (i e)
107108
(send (wx:get-the-clipboard)
@@ -270,11 +271,11 @@
270271
(let-values ([(one two one-v two-v close-val default)
271272
(cond
272273
[(memq 'ok style)
273-
(values "OK" #f 'ok #f 1 'default=1)]
274+
(values (string-constant ok) #f 'ok #f 1 'default=1)]
274275
[(memq 'ok-cancel style)
275-
(values "OK" "Cancel" 'ok 'cancel 2 'default=1)]
276+
(values (string-constant ok) (string-constant cancel) 'ok 'cancel 2 'default=1)]
276277
[(memq 'yes-no style)
277-
(values "&Yes" "&No" 'yes 'no #f 'no-default)])])
278+
(values (string-constant yes-mnemonic) (string-constant no-mnemonic) 'yes 'no #f 'no-default)])])
278279
(let-values ([(result checked?)
279280
(do-message-box/custom who
280281
title message

0 commit comments

Comments
 (0)