unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65424: Guix doesn't use positional arguments in translated formatted messages
@ 2023-08-21 12:09 Maxime Devos
  2023-08-21 14:20 ` Julien Lepiller
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Devos @ 2023-08-21 12:09 UTC (permalink / raw)
  To: 65424


[-- Attachment #1.1.1: Type: text/plain, Size: 1160 bytes --]

Consider, e.g.,

(format #t (G_ "~0@*~a should be set to ~1@*~a instead of ~2@*~a~%") 
"CC" "(cc-for-target)" "gcc")
->
CC should be set to (cc-for-target) instead of gcc

By using positional arguments like this, translators can reorder the 
sentence to:

(format #t (G_ "It's not ~2@*~a that ~0@*~a should be set to, but 
~1@*~a~%") "CC" (cc-for-target) "gcc"))

~0@*~a should be set to ~1@*~a instead of ~2@*~a~%") "CC" 
"(cc-for-target)" "gcc")
->
It's not gcc that CC should be set to, but (cc-for-target).

CC should be set to (cc-for-target) instead of gcc

Such reorderings are occasionally useful, yet AFAIK nowhere (except 
po/guix/ta.po, the mcron service and de.po) is this used.

Sure, you could as translator add these ~N@* afterwards, but you need to 
know that's possible in the first place (and if you know it's possible, 
you still need to remember or rediscover what exactly to write), and it 
would be much simpler and more discoverable if they were included from 
the start.  Also, IIRC, Weblate complains if you add these.

p.s.: I'm writing a new linter, this particular example doesn't occur 
yet in Guix.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-21 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21 12:09 bug#65424: Guix doesn't use positional arguments in translated formatted messages Maxime Devos
2023-08-21 14:20 ` Julien Lepiller
2023-08-21 14:45   ` Maxime Devos
2023-08-21 16:12     ` Maxime Devos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.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).