GNU bug report logs - #54139
27.2; Translating the Emacs Menu

Previous Next

Package: emacs;

Reported by: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>

Date: Thu, 24 Feb 2022 08:35:01 UTC

Severity: normal

Tags: moreinfo

Found in version 27.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54139 in the body.
You can then email your comments to 54139 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#54139; Package emacs. (Thu, 24 Feb 2022 08:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 24 Feb 2022 08:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; Translating the Emacs Menu
Date: Thu, 24 Feb 2022 09:30:34 +0100
[Message part 1 (text/plain, inline)]
For newcomers the Menu is very useful to start into Emacs. But it is
only available in English.

It would be great to be able to translate it, for example by setting
some translation strings.

One way to get the initial steps could be to have (bindings--define-key
...) check a table of known translations and use a translated string if
available.

A more advanced method would be shelling out to gettext to benefit from
existing translation platforms.

Here’s an unclean proof of concept that might break your Emacs and is
not fit for Emacs itself due to using advice:

(defun translate-bindings (orig-fun &rest args)
  (let* ((menu (nth 0 args))
         (key (nth 1 args))
         (entry (nth 2 args))
         (new-entry (cond
                     ((and (< 1 (length entry)) (stringp (nth 0 entry)))
                      (let ((name (nth 0 entry)))
                        (cons (concat "translated: " name) (cdr entry))))
                     ((and (< 2 (length entry)) (stringp (nth 1 entry)))
                      (let ((name (nth 1 entry)))
                        (cons (car entry) (cons (concat "translated: " name) (cdr (cdr entry))))))
                     (t entry))))
    (print (and (< 2 (length entry)) (stringp (nth 1 entry))))
    (print new-entry)
    (apply orig-fun menu key (list new-entry))))
(advice-add 'bindings--define-key :around #'translate-bindings)
(require 'menu-bar)
(bindings--define-key global-map [menu-bar edit]
   (cons "Edit" menu-bar-edit-menu))

Best wishes,
Arne


-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54139; Package emacs. (Thu, 24 Feb 2022 09:35:01 GMT) Full text and rfc822 format available.

Message #8 received at 54139 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
Cc: 54139 <at> debbugs.gnu.org
Subject: Re: bug#54139: 27.2; Translating the Emacs Menu
Date: Thu, 24 Feb 2022 10:34:41 +0100
"Dr. Arne Babenhauserheide" <arne_bab <at> web.de> writes:

> For newcomers the Menu is very useful to start into Emacs. But it is
> only available in English.
>
> It would be great to be able to translate it, for example by setting
> some translation strings.

I don't think translating just the menus would help much -- for this to
make sense, we'd need to internationalise the source code so that
messages are also localised.

And there's an etc/TODO item for that.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 24 Feb 2022 21:40:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54139; Package emacs. (Sat, 26 Mar 2022 16:38:01 GMT) Full text and rfc822 format available.

Message #13 received at 54139 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
Cc: 54139 <at> debbugs.gnu.org
Subject: Re: bug#54139: 27.2; Translating the Emacs Menu
Date: Sat, 26 Mar 2022 17:37:40 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I don't think translating just the menus would help much -- for this to
> make sense, we'd need to internationalise the source code so that
> messages are also localised.
>
> And there's an etc/TODO item for that.

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 54139 <at> debbugs.gnu.org and "Dr. Arne Babenhauserheide" <arne_bab <at> web.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 26 Mar 2022 16:38:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54139; Package emacs. (Sat, 26 Mar 2022 22:52:02 GMT) Full text and rfc822 format available.

Message #18 received at 54139 <at> debbugs.gnu.org (full text, mbox):

From: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54139 <at> debbugs.gnu.org
Subject: Re: bug#54139: 27.2; Translating the Emacs Menu
Date: Sat, 26 Mar 2022 23:43:46 +0100
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> I don't think translating just the menus would help much -- for this to
>> make sense, we'd need to internationalise the source code so that
>> messages are also localised.

I think there is a point to that: Users who do not need the full
commands of Emacs translated, but simply want the efficient large-file
handling and fontification. 

A translated menu and a toolbar make this much easier.

Another group are those who speak some English, but have an easier time
reading their native language. When reading English at a word per
second, a translated menu helps a lot already, but messages can still be
deciphered when needed.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 24 Apr 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 53 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.