[Gnucash-changes] r14193 - htdocs/trunk - Move translation-related file making into Makefile.

Joshua Sled jsled at cvs.gnucash.org
Wed May 24 22:49:07 EDT 2006


Author: jsled
Date: 2006-05-24 22:49:06 -0400 (Wed, 24 May 2006)
New Revision: 14193
Trac: http://svn.gnucash.org/trac/changeset/14193

Added:
   htdocs/trunk/Makefile
Removed:
   htdocs/trunk/create-potfiles.pl
   htdocs/trunk/make-pot.sh
Modified:
   htdocs/trunk/README
Log:
Move translation-related file making into Makefile.

Added: htdocs/trunk/Makefile
===================================================================
--- htdocs/trunk/Makefile	2006-05-25 01:54:21 UTC (rev 14192)
+++ htdocs/trunk/Makefile	2006-05-25 02:49:06 UTC (rev 14193)
@@ -0,0 +1,26 @@
+
+.PHONY: pot mos de fr nl pt_PT
+
+pot: po/POTFILES po/gnucash-htdocs.pot
+
+po/POTFILES: .potfiles
+	( find . -name '*.php' -o -name '*.phtml' -maxdepth 1; find externals -name '*.phtml' ) > po/POTFILES
+
+.potfiles:
+
+po/gnucash-htdocs.pot: po/POTFILES
+	xgettext -f po/POTFILES -L PHP -o po/gnucash-htdocs.pot
+
+mos: de fr nl pt_PT
+
+de: po/de.po
+	msgfmt po/de.po -o de/LC_MESSAGES/gnucash-htdocs.mo
+
+fr: po/fr.po
+	msgfmt po/fr.po -o fr/LC_MESSAGES/gnucash-htdocs.mo
+
+nl: po/nl.po
+	msgfmt po/nl.po -o nl/LC_MESSAGES/gnucash-htdocs.mo
+
+pt_PT: po/pt_PT.po
+	msgfmt po/pt_PT.po -o pt_PT/LC_MESSAGES/gnucash-htdocs.mo

Modified: htdocs/trunk/README
===================================================================
--- htdocs/trunk/README	2006-05-25 01:54:21 UTC (rev 14192)
+++ htdocs/trunk/README	2006-05-25 02:49:06 UTC (rev 14193)
@@ -63,8 +63,8 @@
 Preparing translations
 ----------------------
 
-    $ ./create-potfiles.pl > po/POTFILES
-    $ ./make-pot.sh
+    $ make po/POTFILES
+    $ make po/gnucash-htdocs.pot
 
 Now merge the new content into your translation, substituting the name of 
 your po file in the command:
@@ -83,3 +83,13 @@
 When you have no fuzzy and no untranslated messages, update the binary translation file:
 
     $ msgfmt po/en_GB.po -o en_GB/LC_MESSAGES/gnucash-htdocs.mo
+
+Or:
+
+    $ make de [fr nl ...]
+
+Which will build an individual translation, or:
+
+    $ make mos
+
+Which will make all the known translations.

Deleted: htdocs/trunk/create-potfiles.pl
===================================================================
--- htdocs/trunk/create-potfiles.pl	2006-05-25 01:54:21 UTC (rev 14192)
+++ htdocs/trunk/create-potfiles.pl	2006-05-25 02:49:06 UTC (rev 14193)
@@ -1,54 +0,0 @@
-#!/usr/bin/perl -w
-#
-# This perl script is used to make po/POTFILES, the list
-# of PHP and phtml files to be searched for translatable strings.
-#
-# Author: Dave Peticolas <dave at krondo.com>
-# Adapted for PHP by Neil Williams <linux at codehelp.co.uk>
-
-use strict;
-
-use File::Basename;
-
-my @cvsignores = `find . -name '.cvsignore'`;
-my @phtml_files = `find . -name '*.php' -o -name '*.phtml' -maxdepth 1`;
-my @ext_files = `find externals -name '*.phtml'`;
-my @news_files = `find news -name '*.phtml'`;
-#my @news_files = ();
-my @possible_files = (@phtml_files, @ext_files, @news_files);
-
-chomp(my $cwd = `pwd`);
-
-my %ignores;
-
-foreach my $one_ignore (@cvsignores) {
-  chomp($one_ignore);
-  my ($name, $path) = fileparse($one_ignore);
-  $path =~ s/^\.\///;
-  open (IG, $one_ignore);
-  chdir ("$path");
-  foreach my $fl (<IG>) {
-    chomp $fl;
-    next unless $fl;
-    my @matches = glob ($fl);
-    foreach my $match (@matches) {
-      chomp($match);
-      next unless $match;
-      $ignores{$path . $match} = 1;
-    }
-  }
-  close (IG);
-  chdir $cwd;
-}
-
-
-foreach my $file (@possible_files) {
-  chomp($file);
-  my ($name, $path) = fileparse($file);
-  $path =~ s/^\.\///;
-
-  next if $ignores{$path . $name};
-
-  print $path . $name . "\n";
-}
-

Deleted: htdocs/trunk/make-pot.sh
===================================================================
--- htdocs/trunk/make-pot.sh	2006-05-25 01:54:21 UTC (rev 14192)
+++ htdocs/trunk/make-pot.sh	2006-05-25 02:49:06 UTC (rev 14193)
@@ -1,3 +0,0 @@
-#!/bin/bash
-xgettext -f po/POTFILES -L PHP -o po/gnucash-htdocs.pot
-



More information about the gnucash-changes mailing list