bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] Allow custom flags in msgmerge


From: Wichert Akkerman
Subject: [bug-gettext] Allow custom flags in msgmerge
Date: Thu, 12 Nov 2015 09:26:41 +0100

Hi,

for a few projects I find myself needing an ability to add custom flags to 
messages to help manage our translation toolchain. For example:

* Some of our messages are in markdown format. I want to be able to add a flag
  to them so our tooling can verify a translation is still valid markdown.

* We run a number of automated checks on messages to check for things like 
  consistent use of punctuation. For some messages this is not necessary and
  often leads to false positives, so I would like to be able to use a flag
  to indicate which checks can be skipped for a message

We use lingua (see https://github.com/wichert/lingua/ ) to create the pot file, 
which allows adding such flags in translation comments, somewhat similar to how 
xgettext allows format hints in comments. I would like to keep using msgmerge 
to sync our pot and po files; I’ve seen other re-implementations of msgmerge do 
bad things, and I would rather have not to reinvent that wheel.  Unfortunately 
currently msgmerge will skip all flags it does not know about. I do understand 
the rationale for wanting to keep an official list of flags and filtering out 
unofficial ones, but for situations like ours it would be very useful if there 
was a way to tell msgmerge to copy our flags over to our po files. That can be 
either a command-line option (—keep-unofficial-flags), or require unofficial 
flags to be prefixed with x- . I’m happy to help implementing such a feature, 
but before doing so I would like to know if there is interest in such a feature.

Regards,
Wichert.




reply via email to

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