CMUCL commit: intl-branch src (2 files)
Raymond Toy
rtoy at common-lisp.net
Tue Mar 2 01:41:03 CET 2010
Date: Monday, March 1, 2010 @ 19:41:02
Author: rtoy
Path: /project/cmucl/cvsroot/src
Tag: intl-branch
Modified: i18n/locale/en at piglatin/LC_MESSAGES/cmucl.po tools/piglatin.lisp
tools/piglatin.lisp:
o Support plurals
i18n/locale/en at piglatin/LC_MESSAGES/cmucl.po:
o Updated from cmucl.pot and re-translated all strings.
----------------------------------------------+
i18n/locale/en at piglatin/LC_MESSAGES/cmucl.po | 20 ++++++++++++------
tools/piglatin.lisp | 27 ++++++++++++++++++++++++-
2 files changed, 39 insertions(+), 8 deletions(-)
Index: src/i18n/locale/en at piglatin/LC_MESSAGES/cmucl.po
diff -u src/i18n/locale/en at piglatin/LC_MESSAGES/cmucl.po:1.1.2.8 src/i18n/locale/en at piglatin/LC_MESSAGES/cmucl.po:1.1.2.9
--- src/i18n/locale/en at piglatin/LC_MESSAGES/cmucl.po:1.1.2.8 Fri Feb 26 18:44:45 2010
+++ src/i18n/locale/en at piglatin/LC_MESSAGES/cmucl.po Mon Mar 1 19:41:01 2010
@@ -8274,17 +8274,23 @@
msgstr "~2&Eakdownbray orfay ~(~Away~) acespay:~%"
#: target:code/room.lisp
-msgid " ~13:D bytes for ~9:D other object~2:*~P.~%"
-msgstr " ~13:D ytesbay orfay ~9:D otherway objectway~2:*~P.~%"
+msgid " ~13:D bytes for ~9:D other object.~%"
+msgid_plural " ~13:D bytes for ~9:D other objects.~%"
+msgstr[0] " ~13:D ytesbay orfay ~9:D otherway objectway.~%"
+msgstr[1] " ~13:D ytesbay orfay ~9:D otherway objectsway.~%"
#: target:code/room.lisp
-msgid " ~13:D bytes for ~9:D ~(~A~) object~2:*~P.~%"
-msgstr " ~13:D ytesbay orfay ~9:D ~(~Away~) objectway~2:*~P.~%"
+msgid " ~13:D bytes for ~9:D ~(~A~) object.~%"
+msgid_plural " ~13:D bytes for ~9:D ~(~A~) objects.~%"
+msgstr[0] " ~13:D ytesbay orfay ~9:D ~(~Away~) objectway.~%"
+msgstr[1] " ~13:D ytesbay orfay ~9:D ~(~Away~) objectsway.~%"
#: target:code/room.lisp
-msgid " ~13:D bytes for ~9:D ~(~A~) object~2:*~P (space total.)~%"
-msgstr ""
-" ~13:D ytesbay orfay ~9:D ~(~Away~) objectway~2:*~P (acespay otaltay.)~%"
+msgid " ~13:D bytes for ~9:D ~(~A~) object (space total.)~%"
+msgid_plural " ~13:D bytes for ~9:D ~(~A~) objects (space total.)~%"
+msgstr[0] " ~13:D ytesbay orfay ~9:D ~(~Away~) objectway (acespay otaltay.)~%"
+msgstr[1] ""
+" ~13:D ytesbay orfay ~9:D ~(~Away~) objectsway (acespay otaltay.)~%"
#: target:code/room.lisp
msgid ""
Index: src/tools/piglatin.lisp
diff -u src/tools/piglatin.lisp:1.1.2.3 src/tools/piglatin.lisp:1.1.2.4
--- src/tools/piglatin.lisp:1.1.2.3 Fri Feb 26 18:38:23 2010
+++ src/tools/piglatin.lisp Mon Mar 1 19:41:02 2010
@@ -91,6 +91,7 @@
(let ((*readtable* (copy-readtable nil))
(state 0)
(string nil)
+ (plural nil)
(count 0))
(set-macro-character #\# (lambda (stream char)
(declare (ignore char))
@@ -107,6 +108,9 @@
(write-string "msgid " po)
(incf count)
(setq state 1))
+ ((eq item 'msgid_plural)
+ (write-string "msgid_plural " po)
+ (setq state 2))
((eq item 'msgstr)
(write-string "msgstr " po)
(when (equal string '(""))
@@ -119,13 +123,34 @@
(terpri po))
(terpri po)
(setq state 0 string nil))
+ ((eq item 'msgstr[0])
+ (write-string "msgstr[0] " po)
+ (dolist (x string)
+ (write-char #\" po)
+ (write-string x po)
+ (write-char #\" po)
+ (terpri po))
+ (write-string "msgstr[1] " po)
+ (dolist (x plural)
+ (write-char #\" po)
+ (write-string x po)
+ (write-char #\" po)
+ (terpri po))
+ (terpri po)
+ (setq state 0 string nil plural nil))
((not (stringp item)) (error "Something's wrong"))
((= state 1)
(write-char #\" po)
(write-string item po)
(write-char #\" po)
(terpri po)
- (setq string (nconc string (list (latinize item)))))))))
+ (setq string (nconc string (list (latinize item)))))
+ ((= state 2)
+ (write-char #\" po)
+ (write-string item po)
+ (write-char #\" po)
+ (terpri po)
+ (setq plural (nconc plural (list (latinize item)))))))))
(format t "~&Translated ~D messages~%" count)))
;; Translate all of the pot files in DIR
More information about the cmucl-commit
mailing list