diff xsls/body.xsls @ 600:89a4e934d207

Emit a warning with a link to English original if translation is outdated.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 20 Jul 2012 09:27:55 +0000
parents 1902d38f0b05
children b2db67ca29cc
line wrap: on
line diff
--- a/xsls/body.xsls
+++ b/xsls/body.xsls
@@ -39,6 +39,27 @@ X:template body (lang) {
 
     <tr><td valign="top">
 
+        X:if "$ORIGIN and document($ORIGIN)/*/@rev and
+              (not(@rev) or @rev != document($ORIGIN)/*/@rev)" {
+            <span>
+
+            X:if "@lang = 'he'" { X:attribute "class" { X:text{ltr} } }
+
+            <blockquote class="note">
+
+            X:if "document(concat($XML, '/i18n.xml'))
+                           /i18n/text[@lang = $lang]/item[@id='outdated']" {
+                !! "document(concat($XML, '/i18n.xml'))
+                             /i18n/text[@lang = $lang]/item[@id='outdated']";
+            } else {
+                !! "document(concat($XML, '/i18n.xml'))
+                             /i18n/text[@lang = 'en']/item[@id='outdated']";
+            }
+
+            </blockquote>
+            </span>
+        }
+
         X:if "@toc = 'yes' and section[@id and @name]" {
             <table width="100%"><tr><td align="{$INDEX_ALIGN}">
             X:for-each "section[@id and @name]" {