bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* [PATCH] version-etc.c:  Do not include URLS in translatable strings.
@ 2019-05-06 18:21 John Darrington
  2019-05-06 18:43 ` Ben Pfaff
  2019-05-11 22:46 ` Bruno Haible
  0 siblings, 2 replies; 4+ messages in thread
From: John Darrington @ 2019-05-06 18:21 UTC (permalink / raw)
  To: bug-gnulib

This method is better for several reasons:  1. It avoids the danger of
cut and paste errors.  2. Naive translators can't translate the urls
(it's amazing how many do things like that!) 3. Should the urls ever
change, only this file has to be updated rather than every single
translation.

* lib/version-etc.c: Take URLS out of translatable strings.
---
 lib/version-etc.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/lib/version-etc.c b/lib/version-etc.c
index 9ca9a5628..4a060e0b5 100644
--- a/lib/version-etc.c
+++ b/lib/version-etc.c
@@ -82,14 +82,13 @@ version_etc_arn (FILE *stream,
      locale.  Otherwise, do not translate "(C)"; leave it as-is.  */
   fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR);
 
-  fputs (_("\
+  fprintf (stream, _("\
 \n\
-License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n\
+License GPLv3+: GNU GPL version 3 or later <%s>.\n\
 This is free software: you are free to change and redistribute it.\n\
 There is NO WARRANTY, to the extent permitted by law.\n\
 \n\
-"),
-         stream);
+"), "https://gnu.org/licenses/gpl.html");
 
   switch (n_authors)
     {
@@ -250,9 +249,9 @@ emit_bug_reporting_address (void)
 #ifdef PACKAGE_URL
   printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
 #else
-  printf (_("%s home page: <https://www.gnu.org/software/%s/>\n"),
-          PACKAGE_NAME, PACKAGE);
+  printf (_("%s home page: <%s/%s/>\n"), PACKAGE_NAME,
+	  "https://www.gnu.org/software", PACKAGE);
 #endif
-  fputs (_("General help using GNU software: <https://www.gnu.org/gethelp/>\n"),
-         stdout);
+  printf (_("General help using GNU software: <%s>\n"),
+	  "https://www.gnu.org/gethelp");
 }
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-11 22:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 18:21 [PATCH] version-etc.c: Do not include URLS in translatable strings John Darrington
2019-05-06 18:43 ` Ben Pfaff
2019-05-06 22:50   ` Bruno Haible
2019-05-11 22:46 ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).