Re: [PATCH 00/10] Factorization of messages with similar meaning
- From
Jeff King <peff@peff.net>
- Date
- Dec 3, 2021, 21:55 UTC
- Message-ID
- <YaqSXvp6ZxOFqeuk@coredump.intra.peff.net>
- In-Reply-To
- <pull.1088.git.1638514909.gitgitgadget@gmail.com>
On Fri, Dec 03, 2021 at 07:01:39AM +0000, Jean-Noël Avila via GitGitGadget wrote:
Show 18 quoted lines
> This series is a meager attempt at rationalizing a small fraction of the > internationalized messages. Sorry in advance for the dull task of reviewing > these insipide patches. > > Doing so has some positive effects: > > * non-translatable constant strings are kept out of the way for translators > * messages with identical meaning are built identically > * the total number of messages to translate is decreased. > > I'm inclined to even go a step further and turn these messages into #define > or const strings. This would have the added benefits: > > * make sure that the messages to translate are identical > * create a library of message skeletons to be picked up when new messages > are needed > > What do you think?
One slight negative of this approach is that it makes messages a bit harder to grep for. It sometimes really nice to "git jump grep" for specific messages you got to see where they're coming from.
I don't think that's a strong objection, though. If this is making the translations overall more maintainable it might be worth the tradeoff.
We could also allow GIT_VERBOSE=1 or something to print the file/line of error(), warning(), and die() messages, which solves the same problem. I think Ævar might have had some patches in that direction.
-Peff