library-web r393 - in trunk: . data src



Author: fpeters
Date: Sat Mar  1 21:47:51 2008
New Revision: 393
URL: http://svn.gnome.org/viewvc/library-web?rev=393&view=rev

Log:
* data/overlay.xml.in, src/lgo.py: don't get title/abstract from
documents for release notes as it is way too broken; also updated
release notes abstract text from a suggestion of friedel.



Modified:
   trunk/ChangeLog
   trunk/data/overlay.xml.in
   trunk/src/lgo.py

Modified: trunk/data/overlay.xml.in
==============================================================================
--- trunk/data/overlay.xml.in	(original)
+++ trunk/data/overlay.xml.in	Sat Mar  1 21:47:51 2008
@@ -633,8 +633,9 @@
     <document doc_module="release-notes" channel="misc" old-channel="users">
       <_title>Release Notes</_title>
       <_abstract>
-        With its time-based release schedule, every six months, to the minute, 
-	there is a new GNOME release, and accompanying notes.
+	GNOME has a time-based release schedule. This means that there is a
+	new GNOME release with accompanying notes every six months, to the
+	minute.
       </_abstract>
     </document>
 
@@ -647,5 +648,6 @@
     <quirk fixed-in="2.22">correct-article-index</quirk>
     <quirk>flat-rendering</quirk>
     <quirk>languages-in-sidebar</quirk>
+    <quirk>no-title-and-abstract-from-document</quirk>
   </quirks>
 </overlay>

Modified: trunk/src/lgo.py
==============================================================================
--- trunk/src/lgo.py	(original)
+++ trunk/src/lgo.py	Sat Mar  1 21:47:51 2008
@@ -980,6 +980,8 @@
                             'stable') + '/'
             raise errors.DepreciatedDocumentation()
 
+        quirks = app.overlay.get_quirks(self)
+
         if tree.find('title') is not None and tree.find('title').text:
             doc.title[lang] = tree.find('title').text
         elif tree.find('{http://www.w3.org/1999/xhtml}title') is not None and \
@@ -991,6 +993,12 @@
                 tree.find('{http://www.w3.org/1999/xhtml}abstract').text:
             doc.abstract[lang] = tree.find('{http://www.w3.org/1999/xhtml}abstract').text
 
+        if 'no-title-and-abstract-from-document' in quirks:
+            if doc.title.get(lang):
+                del doc.title[lang]
+            if doc.abstract.get(lang):
+                del doc.abstract[lang]
+
         return tree
 
     def create_tarball(self, doc, temporary_dir, tarball_filepath):
@@ -1187,11 +1195,17 @@
                 lang = title.attrib.get(
                         '{http://www.w3.org/XML/1998/namespace}lang', 'en')
                 document.title[lang] = title.text
+            for lang in document.languages:
+                if not document.title.get(lang):
+                    document.title[lang] = document.title.get('en')
         if overlay.find('abstract') is not None:
             for abstract in overlay.findall('abstract'):
                 lang = abstract.attrib.get(
                         '{http://www.w3.org/XML/1998/namespace}lang', 'en')
                 document.abstract[lang] = abstract.text
+            for lang in document.languages:
+                if not document.abstract.get(lang):
+                    document.abstract[lang] = document.abstract.get('en')
         if overlay.find('subsection') is not None:
             document.subsection = overlay.find('subsection').text
         if overlay.find('category') is not None:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]