[svnbook commit] r1566 - trunk/src/ru

dmitriy svnbook-dev at red-bean.com
Sun Jul 24 01:18:19 CDT 2005


Author: dmitriy
Date: Sun Jul 24 01:18:18 2005
New Revision: 1566

Modified:
   trunk/src/ru/Makefile
   trunk/src/ru/sync.py
Log:
* ru/sync.py
* ru/Makefile
  Are changed, that on a title page of the book would
  be shown both revision of translation and revision on
  which translation is based


Modified: trunk/src/ru/Makefile
==============================================================================
--- trunk/src/ru/Makefile	(original)
+++ trunk/src/ru/Makefile	Sun Jul 24 01:18:18 2005
@@ -9,8 +9,7 @@
 $(BOOK_VERSION_SOURCE): book-last-updated
 
 book-last-updated:
-	@echo '<!ENTITY svn.version "$(L10N_REVISION) '`python sync.py -v`'">' \
-	    > $(BOOK_VERSION_SOURCE)
+	@python sync.py -v
 
 dist-html-chunk: book-last-updated
 	../tools/book-dist.py --html-chunk --name svnbook-html-chunk-ru

Modified: trunk/src/ru/sync.py
==============================================================================
--- trunk/src/ru/sync.py	(original)
+++ trunk/src/ru/sync.py	Sun Jul 24 01:18:18 2005
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 
 import sys, os, string, getopt, re, glob
 
@@ -45,6 +46,8 @@
     print file, '\t', get_last(file)
 
 def get_version():
+  v = string.Template('<!ENTITY svn.version "в редакции $r1, на основе $r2">')
+  f = open('version.xml', 'w')
   fnames = glob.glob('*.xml')
   rev = []
   for file in fnames:
@@ -54,9 +57,9 @@
   r_max = max(rev)
   r_min = min(rev)
   if r_max == r_min:
-    sys.stdout.write(str(r_max))
+    f.write(v.substitute(r1=get_base(), r2=r_max))
   else:
-    sys.stdout.write(str(r_min)+':'+str(r_max))
+    f.write(v.substitute(r1=get_base(), r2=str(r_min)+':'+str(r_max)))
 
 def main():
   if len(sys.argv) < 2:



More information about the svnbook-dev mailing list