unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: Maxime Devos <maximedevos@telenet.be>, 65424@debbugs.gnu.org
Subject: bug#65424: Guix doesn't use positional arguments in translated formatted messages
Date: Mon, 21 Aug 2023 16:20:32 +0200	[thread overview]
Message-ID: <FAA1CFC0-BE00-4FD3-91C6-E31DFE35275D@lepiller.eu> (raw)
In-Reply-To: <70fba97b-6b2d-8bfc-1938-977f5d5ed2d5@telenet.be>

Le 21 août 2023 14:09:14 GMT+02:00, Maxime Devos <maximedevos@telenet.be> a écrit :
>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.

That sounds reasonnabe. The very least we could do is document this syntax in the manual. Weblate would complain indeed, sirce it won't find the same formats in the source and target strings. It might complain about the order too, but that's something we could contribute upstseam if it happens.




  reply	other threads:[~2023-08-21 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-08-21 14:45   ` Maxime Devos
2023-08-21 16:12     ` Maxime Devos

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://guix.gnu.org/

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

  git send-email \
    --in-reply-to=FAA1CFC0-BE00-4FD3-91C6-E31DFE35275D@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=65424@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /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/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).