Re: [PATCH] Make a colon translatable

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

 



Hi, thanks for you feedback!

> Sorry, but I do not quite buy this. The above is a representative
> example of what we call "sentence lego", which is what we absolutely
> want to avoid, isn't it?

I never heard of "sentence lego" but I can easily imagine it's building sentences by mixing multiple levels of gettext and printf-like formatting, typically freezing the order of sentence components, rendering them untranslatable in some languages, like printf(_("if %s then %s"), _(if_part), _(then_part))? I I'm wrong tell me because I may have misundertood your whole point.

> We'd rather want to see
>
> printf_like_function(("Use 'git %s' ...", "string"));
>
> when "string" is something that should not be translated

Make sense.

> I.e. this one is better handled by
>
> status_printf_ln(s, c, _("%s:"), what);

I understand your comment while seeing my badly choosen example with `_("some string:")`, but in the patch isn't your proposition more sentence-lego-ish than mine? If I understand correctly you're proposing to replace:

    printf("%s", _("Untracked files:"))

with:

    printf(_("%s:"), _("Untracked files"))

This hides information to the translator (the presence of a following colon while translating 'Untracked files'). It would be OK if we were 100% sure no translations can be impacted by this. I only speak french and english, so I don't know. Maybe I should rename `what` to `heading`? I may clarify a bit, `what` make me feel it can be reused, but it's only used once alone on its line.

Bests,
-- 
Julien Palard
https://mdk.fr





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux