From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH 7/8] utils: Rename 'dmd-gettext.scm' to 'shepherd-gettext.scm'. Date: Mon, 25 Jan 2016 13:50:20 +0300 Message-ID: <1453719021-13836-8-git-send-email-alezost@gmail.com> References: <1453719021-13836-1-git-send-email-alezost@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNejv-0006ey-0W for guix-devel@gnu.org; Mon, 25 Jan 2016 05:51:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNejt-0006yW-It for guix-devel@gnu.org; Mon, 25 Jan 2016 05:51:18 -0500 Received: from mail-lb0-x242.google.com ([2a00:1450:4010:c04::242]:34697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNejt-0006y6-6y for guix-devel@gnu.org; Mon, 25 Jan 2016 05:51:17 -0500 Received: by mail-lb0-x242.google.com with SMTP id oe3so6652857lbb.1 for ; Mon, 25 Jan 2016 02:51:17 -0800 (PST) Received: from localhost.localdomain ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id p138sm2595299lfb.22.2016.01.25.02.51.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Jan 2016 02:51:15 -0800 (PST) In-Reply-To: <1453719021-13836-1-git-send-email-alezost@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * 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 -;; -;; 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 . - -(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 +;; +;; 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 . + +(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