From 72ad90fbe025b83276b86ed7c24c12ba85ad7a6e Mon Sep 17 00:00:00 2001 From: Alexander Shopov Date: Sun, 16 Feb 2020 14:33:28 +0100 Subject: [PATCH] Use translations for common constants Yes/No may lose shortcuts but these are currently non-translatable anyway. Signed-off-by: Alexander Shopov --- gui-lib/info.rkt | 2 +- gui-lib/mred/private/messagebox.rkt | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gui-lib/info.rkt b/gui-lib/info.rkt index 7a04c1889..a1d8d097c 100644 --- a/gui-lib/info.rkt +++ b/gui-lib/info.rkt @@ -13,7 +13,7 @@ "pict-lib" "scheme-lib" "scribble-lib" - ["string-constants-lib" #:version "1.24"] + ["string-constants-lib" #:version "1.33"] "option-contract-lib" "2d-lib" "compatibility-lib" diff --git a/gui-lib/mred/private/messagebox.rkt b/gui-lib/mred/private/messagebox.rkt index 1611879de..0ddae9e34 100644 --- a/gui-lib/mred/private/messagebox.rkt +++ b/gui-lib/mred/private/messagebox.rkt @@ -4,6 +4,7 @@ racket/string racket/snip/private/style racket/draw + string-constants (prefix-in wx: "kernel.rkt") "const.rkt" "check.rkt" @@ -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) @@ -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-mnemonic) (string-constant no-mnemonic) 'yes 'no #f 'no-default)])]) (let-values ([(result checked?) (do-message-box/custom who title message