gnucash-htdocs master: Switching the language while in a document failed for newer releases

Frank H.Ellenberger fell at code.gnucash.org
Thu Apr 12 12:06:56 EDT 2018


Updated	 via  https://github.com/Gnucash/gnucash-htdocs/commit/9e1ead41 (commit)
	from  https://github.com/Gnucash/gnucash-htdocs/commit/290a20ef (commit)



commit 9e1ead41c31f115037bce03fbe7e580ae1ea4175
Author: fell <frank.h.ellenberger at gmail.com>
Date:   Thu Apr 12 17:51:56 2018 +0200

    Switching the language while in a document failed for newer releases
    
    Found by Stefan Mueller
    https://lists.gnucash.org/pipermail/gnucash-devel/2018-April/041880.html

diff --git a/docs.phtml b/docs.phtml
index 0343e3e..fb6ea00 100644
--- a/docs.phtml
+++ b/docs.phtml
@@ -1,3 +1,10 @@
+/* Some notes:
+LANG tag: 1.6-2.2: ll_RR, but "es", later: ll
+Encoding: 1.6-1.8: ISO-8859-1, >=2.0: UTF-8
+DocTypes: always HTML,
+		PDF:1.8 en only, 2.0-.2 no, 
+		since 2.4: PDF, ePub, Mobi
+ */
 <?php 
 include("lang.php");
 $title = T_("Documentation");
@@ -552,8 +559,8 @@ $older5		="2.4"; // region code no longer required
     </ul>
     <ul>
       <li>
-        <b><?= T_("Concepts Guide") ?></b>:     
-        <?php echo T_("German");?> (<a href="<?=$top_dir;?>/viewdoc.phtml?rev=<?=$older2;?>&lang=C&doc=guide"
+        <b><?= T_("Concepts Guide") ?></b>:
+        <?php echo T_("English");?> (<a href="<?=$top_dir;?>/viewdoc.phtml?rev=<?=$older2;?>&lang=C&doc=guide"
           ><img class="docicon" alt="online" title="<?php echo T_($online);?>" src="<?=$top_dir;?>/images/icons/online_logo.png" /></a>,
         <a href="<?=$top_dir;?>/docs/v<?=$older2;?>/C/gnucash-guide.pdf"
           ><img class="docicon" alt="pdf" title="<?php echo T_($pdf);?>" src="<?=$top_dir;?>/images/icons/pdf_logo.png" /></a>)
diff --git a/po/de.po b/po/de.po
index 6b58282..bf99b16 100644
--- a/po/de.po
+++ b/po/de.po
@@ -886,7 +886,7 @@ msgstr ""
 
 #: docs.phtml:566
 msgid "Spanish"
-msgstr "spanisch"
+msgstr "Spanisch"
 
 #: docs.phtml:567
 msgid "Portugese"
diff --git a/viewdoc.phtml b/viewdoc.phtml
index baceb7c..26d150b 100644
--- a/viewdoc.phtml
+++ b/viewdoc.phtml
@@ -107,9 +107,13 @@ if ($showrev == "maint") {
   # on the same server
   $checkpath="docs/v".$showrev."/".$showlang."/".$showdoc;
   if (!file_exists ($checkpath)) {
-    $showlang    = "C";
-    $req_lang_ok = false;
-  }
+  	$showlang = substr($showlang,1,2);
+    $checkpath="docs/v".$showrev."/".$showlang."/".$showdoc;
+    if (!file_exists ($checkpath)) {
+      $showlang    = "C";
+      $req_lang_ok = false;
+      }
+    }
   
   $showurl=$basepath."/v".$showrev."/".$showlang."/".$showdoc;
 }



Summary of changes:
 docs.phtml    | 11 +++++++++--
 po/de.po      |  2 +-
 viewdoc.phtml | 10 +++++++---
 3 files changed, 17 insertions(+), 6 deletions(-)



More information about the gnucash-changes mailing list