bug-gettext
[Top][All Lists]
Advanced

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

Re: Issue extracting strings with null delimiters


From: Bruno Haible
Subject: Re: Issue extracting strings with null delimiters
Date: Sun, 21 Mar 2021 15:34:48 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-203-generic; KDE/5.18.0; x86_64; ; )

Hi,

Daniel Drojanov wrote:
> There's an issue in extracting strings (with xgettext) from gst-plugins-base
> <https://github.com/GStreamer/gst-plugins-base/blob/1.8.3/gst-libs/gst/tag/gstid3tag.c>
> where
> a string has null delimiters -
> 
> static const gchar genres[] =
> "Blues\000Classic Rock\000Country\000Dance\000Disco\000Funk\000Grunge\000"

This is not supported. More generally, control characters (other than the
usual newlines) are not supported in internationalized strings [1], because
it would cause trouble to the translators: in most translation tools,
the translator would see
   BluesClassic RockCountryDanceDiscoFunkGrunge...
and wonder how to translate this huge string.

Also, don't let the translator translate a long string composed of
independent parts. What would the translator do if the string "Reggae"
gets added in the middle? She would need to check the words one by one,
which is tedious and error-prone. Instead let her translate separate
strings:
  _("Blues"),
  _("Classic Rock"),
  _("Country"),
  ...

Bruno

[1] https://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html




reply via email to

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