all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH 7/8] utils: Rename 'dmd-gettext.scm' to 'shepherd-gettext.scm'.
Date: Mon, 25 Jan 2016 13:50:20 +0300	[thread overview]
Message-ID: <1453719021-13836-8-git-send-email-alezost@gmail.com> (raw)
In-Reply-To: <1453719021-13836-1-git-send-email-alezost@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 5068 bytes --]

* utils/dmd-gettext.scm: Rename to...
* utils/shepherd-gettext.scm: ... this.
* utils/Makefile.am (EXTRA_DIST): Use it.
---
 utils/Makefile.am          |  2 +-
 utils/dmd-gettext.scm      | 61 ----------------------------------------------
 utils/shepherd-gettext.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 62 insertions(+), 62 deletions(-)
 delete mode 100644 utils/dmd-gettext.scm
 create mode 100644 utils/shepherd-gettext.scm

diff --git a/utils/Makefile.am b/utils/Makefile.am
index 4e8179d..5d13ff0 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -1,3 +1,3 @@
 # utils/Makefile.am -- Utility programs.
 
-EXTRA_DIST = dmd-gettext.scm sysvconfig.scm
+EXTRA_DIST = shepherd-gettext.scm sysvconfig.scm
diff --git a/utils/dmd-gettext.scm b/utils/dmd-gettext.scm
deleted file mode 100644
index 72d6441..0000000
--- a/utils/dmd-gettext.scm
+++ /dev/null
@@ -1,61 +0,0 @@
-;; dmd-gettext.scm -- Extract translatable strings from source code.
-;; Copyright (C) 2002 Wolfgang Jährling <wolfgang@pro-linux.de>
-;;
-;; This file is part of the GNU Shepherd.
-;;
-;; The GNU Shepherd is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3 of the License, or (at
-;; your option) any later version.
-;;
-;; The GNU Shepherd is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with the GNU Shepherd.  If not, see <http://www.gnu.org/licenses/>.
-
-(define l10n-keywords '(l10n local-output))
-
-(define (puts . text)
-  (for-each display text)
-  (newline))
-
-(define (found-string str orig)
-  (puts "#: " (source-property orig 'filename)
-	":" (source-property orig 'line))
-  (puts "msgid \"" str "\"")
-  (puts "msgstr \"\"")
-  (puts))
-
-(define (extract-strings port)
-  (letrec ((next-expr
-	    (lambda (data)
-	      (or (eof-object? data)
-		  (begin
-		    (letrec ((look-at
-			      (lambda (expr)
-				(if (and (list? expr)
-					 (not (null? expr)))
-				    (begin
-				      (and (memq (car expr)
-						 l10n-keywords)
-					   (found-string (cadr expr) expr))
-				      (for-each look-at expr))
-				    (and (pair? expr)
-					 (begin
-					   (look-at (car expr))
-					   (look-at (cdr expr))))))))
-		      (look-at data))
-		    (next-expr (read port)))))))
-    (next-expr (read port))))
-
-;; Safe file positions of the expressions we read.  It is enabled by
-;; default, but we want to be sure.
-(read-enable 'positions)
-
-;; Iterate over all given files.
-(for-each extract-strings
-	  (map open-input-file
-	       (cdr (command-line))))
diff --git a/utils/shepherd-gettext.scm b/utils/shepherd-gettext.scm
new file mode 100644
index 0000000..35edacf
--- /dev/null
+++ b/utils/shepherd-gettext.scm
@@ -0,0 +1,61 @@
+;; shepherd-gettext.scm -- Extract translatable strings from source code.
+;; Copyright (C) 2002 Wolfgang Jährling <wolfgang@pro-linux.de>
+;;
+;; This file is part of the GNU Shepherd.
+;;
+;; The GNU Shepherd is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3 of the License, or (at
+;; your option) any later version.
+;;
+;; The GNU Shepherd is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with the GNU Shepherd.  If not, see <http://www.gnu.org/licenses/>.
+
+(define l10n-keywords '(l10n local-output))
+
+(define (puts . text)
+  (for-each display text)
+  (newline))
+
+(define (found-string str orig)
+  (puts "#: " (source-property orig 'filename)
+	":" (source-property orig 'line))
+  (puts "msgid \"" str "\"")
+  (puts "msgstr \"\"")
+  (puts))
+
+(define (extract-strings port)
+  (letrec ((next-expr
+	    (lambda (data)
+	      (or (eof-object? data)
+		  (begin
+		    (letrec ((look-at
+			      (lambda (expr)
+				(if (and (list? expr)
+					 (not (null? expr)))
+				    (begin
+				      (and (memq (car expr)
+						 l10n-keywords)
+					   (found-string (cadr expr) expr))
+				      (for-each look-at expr))
+				    (and (pair? expr)
+					 (begin
+					   (look-at (car expr))
+					   (look-at (cdr expr))))))))
+		      (look-at data))
+		    (next-expr (read port)))))))
+    (next-expr (read port))))
+
+;; Safe file positions of the expressions we read.  It is enabled by
+;; default, but we want to be sure.
+(read-enable 'positions)
+
+;; Iterate over all given files.
+(for-each extract-strings
+	  (map open-input-file
+	       (cdr (command-line))))
-- 
2.6.3

  parent reply	other threads:[~2016-01-25 10:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 10:50 [SHEPHERD] [PATCH 0/8]: More dmd -> shepherd patches Alex Kost
2016-01-25 10:50 ` [PATCH 1/8] tests: misbehaved-client: Rename 'dmd' to 'root' Alex Kost
2016-01-25 15:07   ` Ludovic Courtès
2016-01-25 10:50 ` [PATCH 2/8] tests: Rename 'dmd_pid' to 'shepherd_pid' Alex Kost
2016-01-25 15:07   ` Ludovic Courtès
2016-01-25 10:50 ` [PATCH 3/8] ChangeLog: Rename git repository Alex Kost
2016-01-25 15:07   ` Ludovic Courtès
2016-01-25 10:50 ` [PATCH 4/8] support: Rename 'make-dmd-user-module' to 'make-user-module' Alex Kost
2016-01-25 15:08   ` Ludovic Courtès
2016-01-25 10:50 ` [PATCH 5/8] Rename default system configuration file Alex Kost
2016-01-25 15:08   ` Ludovic Courtès
2016-01-25 10:50 ` [PATCH 6/8] support: Rename state file Alex Kost
2016-01-25 15:11   ` Ludovic Courtès
2016-01-25 19:26   ` Efraim Flashner
2016-01-25 19:36     ` Efraim Flashner
2016-01-25 10:50 ` Alex Kost [this message]
2016-01-25 15:12   ` [PATCH 7/8] utils: Rename 'dmd-gettext.scm' to 'shepherd-gettext.scm' Ludovic Courtès
2016-01-25 15:59     ` Alex Kost
2016-01-25 21:51       ` Ludovic Courtès
2016-01-26  9:42         ` Alex Kost
2016-01-25 10:50 ` [PATCH 8/8] Replace "dmd" with "shepherd" in comments and strings Alex Kost
2016-01-25 15:13   ` Ludovic Courtès
2016-01-25 16:14     ` Alex Kost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453719021-13836-8-git-send-email-alezost@gmail.com \
    --to=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.