CMUCL commit: intl-branch src/tools (piglatin.lisp)

Raymond Toy rtoy at common-lisp.net
Sat Feb 27 00:38:24 CET 2010


    Date: Friday, February 26, 2010 @ 18:38:24
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/tools
     Tag: intl-branch

Modified: piglatin.lisp

Add simple function to translate all pot files in a directory.


---------------+
 piglatin.lisp |   10 ++++++++++
 1 file changed, 10 insertions(+)


Index: src/tools/piglatin.lisp
diff -u src/tools/piglatin.lisp:1.1.2.2 src/tools/piglatin.lisp:1.1.2.3
--- src/tools/piglatin.lisp:1.1.2.2	Wed Feb 24 20:25:34 2010
+++ src/tools/piglatin.lisp	Fri Feb 26 18:38:23 2010
@@ -127,3 +127,13 @@
 		 (terpri po)
 		 (setq string (nconc string (list (latinize item)))))))))
     (format t "~&Translated ~D messages~%" count)))
+
+;; Translate all of the pot files in DIR
+(defun do-translations (&optional (dir "target:i18n/locale"))
+  (dolist (pot (directory (merge-pathnames (make-pathname :name :wild :type "pot" :version :newest)
+					   dir)))
+    (let ((po (merge-pathnames (make-pathname :directory '(:relative "en at piglatin" "LC_MESSAGES")
+					      :name (pathname-name pot) :type "po")
+			       dir)))
+      (format t "~A -> ~A~%" pot po)
+      (latinize-pot pot po))))
\ No newline at end of file



More information about the cmucl-commit mailing list