emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: master 513c5d827d: Use `format-prompt' in


From: Eli Zaretskii
Subject: Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
Date: Tue, 06 Sep 2022 15:37:55 +0300

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]