bug-gettext
[Top][All Lists]
Advanced

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

Is there a way to pass through custom flags?


From: Eugene Sandulenko
Subject: Is there a way to pass through custom flags?
Date: Tue, 20 Apr 2021 17:59:14 +0200

Hi gettext devs,

I have a question. We are using Weblate for our translations, which takes .pot/.po files generated by xgettext from our C++ sources.

Weblate supports a number of additional flags which it understands from the .pot file comments.

Is there a way to somehow provide these flags via the C++ source, in a fashion of the `--add-comments` option, but for the flags.

That is, I write something like

  // POTFLAGS: max-length:20, ignore-end-exclamation
  const char *s = _("Hello world! %s");

and xgettext produces

  #: example.cpp:15
  #, max-length:20, ignore-end-exclamation, c-format
  msgid "Hello world! %s"
  msgstr ""


Eugene


reply via email to

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