unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: rms@gnu.org
Cc: rpluim@gmail.com, drew.adams@oracle.com, larsi@gnus.org,
	emacs-devel@gnu.org
Subject: Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
Date: Tue, 06 Sep 2022 15:37:55 +0300	[thread overview]
Message-ID: <83a67ck7a4.fsf@gnu.org> (raw)
In-Reply-To: <E1oVQ0n-0003MO-0k@fencepost.gnu.org> (message from Richard Stallman on Tue, 06 Sep 2022 00:16:33 -0400)

> From: Richard Stallman <rms@gnu.org>
> Cc: rpluim@gmail.com, drew.adams@oracle.com, larsi@gnus.org,
> 	emacs-devel@gnu.org
> Date: Tue, 06 Sep 2022 00:16:33 -0400
> 
>   > That part is fine, but the fact that using format-prompt splits the
>   > prompt text into two seemingly unrelated parts is a disadvantage, IMO.
>   > I wonder if we can do something about that, given that this function
>   > was released with Emacs 28.
> 
> I suspect that the crucial issue here will be how it affects translation.

Not only that.  The readability is also diminished.  Compare

  (read-char-by-name
    "Unicode name, single char, or hex, default all: " t))

with

  (read-char-by-name
    (format-prompt "Unicode name, single char, or hex" "all")
    t)

To me, the first one tells very accurately what will the user see as
the prompt, while the second doesn't.

> Someone said that it will be hard to define the translations for strings
> used in format-prompt.  I don't know enough about the details to know
> whether that is true, but we should find out.
> 
> Would someone like to present that argument fully and clearly?

The argument regarding translations is that "though shalt never break
a complete sentence into several parts, then concatenate them at run
time".  That's because each part will be a separate translatable
string, and when those translations are concatenated, the result will
make sense in English, but not necessarily in other languages.

In this case, there are 3 separate strings:

  "Unicode name, single char, or hex"
  ", default "
  "all"

Translators should always see complete phrases and sentences to be
able to translate them correctly into any arbitrary language.



  reply	other threads:[~2022-09-06 12:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03  9:15 master 513c5d827d: Use `format-prompt' in Eli Zaretskii
2022-09-03  9:22 ` Lars Ingebrigtsen
2022-09-03  9:38   ` Eli Zaretskii
2022-09-03  9:45     ` Lars Ingebrigtsen
2022-09-03  9:56       ` Eli Zaretskii
2022-09-03 15:50       ` [External] : " Drew Adams
2022-09-05  4:04         ` Richard Stallman
2022-09-05  8:26           ` Robert Pluim
2022-09-05 11:42             ` Eli Zaretskii
2022-09-05 11:54               ` Robert Pluim
2022-09-05 12:19                 ` Eli Zaretskii
2022-09-05 12:29                   ` Robert Pluim
2022-09-05 12:33                     ` Eli Zaretskii
2022-09-05 16:02                       ` Gregory Heytings
2022-09-05 16:10                         ` Robert Pluim
2022-09-06  4:16               ` Richard Stallman
2022-09-06 12:37                 ` Eli Zaretskii [this message]
2022-09-07  2:23                   ` Richard Stallman
2022-09-07 10:03                     ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a67ck7a4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=rms@gnu.org \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).