manpagez: man pages & more
info gettext
Home | html | info | man

File: gettext.info,  Node: No embedded URLs,  Next: No custom format directives,  Prev: No string concatenation,  Up: Preparing Strings

4.3.5 No embedded URLs
----------------------

   It is good to not embed URLs in translatable strings, for several
reasons:
   • It avoids possible mistakes during copy and paste.
   • Translators cannot translate the URLs or, by mistake, use the URLs
     from other packages that are present in their compendium.
   • When the URLs change, translators don't need to revisit the
     translation of the string.

   The same holds for email addresses.

   So, you would change

     fputs (_("GNU GPL version 3 \n"),
            stream);

to

     fprintf (stream, _("GNU GPL version 3 <%s>\n"),
              "https://gnu.org/licenses/gpl.html");

© manpagez.com 2000-2026
Individual documents may contain additional copyright information.