[Gnucash-changes] r14099 - htdocs/trunk - clarify relative/local/external link semantics.

Joshua Sled jsled at cvs.gnucash.org
Wed May 17 19:09:08 EDT 2006


Author: jsled
Date: 2006-05-17 19:09:07 -0400 (Wed, 17 May 2006)
New Revision: 14099
Trac: http://svn.gnucash.org/trac/changeset/14099

Modified:
   htdocs/trunk/README
   htdocs/trunk/de/local.php
   htdocs/trunk/externals/header.phtml
   htdocs/trunk/fr/local.php
   htdocs/trunk/local.php
Log:
clarify relative/local/external link semantics.

Modified: htdocs/trunk/README
===================================================================
--- htdocs/trunk/README	2006-05-17 21:54:45 UTC (rev 14098)
+++ htdocs/trunk/README	2006-05-17 23:09:07 UTC (rev 14099)
@@ -1,23 +1,63 @@
-Notes about multi-lingual gnucash website content.
+# -*- rst -*-
 
+-------------------------------------------------
+Notes about multi-lingual gnucash website content
+-------------------------------------------------
+
 - all pages must call lang.php to bring in gettext support.
-
 - It would be nice to use the same containing structure for all translations.
 - Phrase content can probably be po-style translated well.
 - Body/paragraph content probably wants to be block-replaced.
 - We're fine not doing auto-language negotiation.
 
+----------------------------------------
 www.gnucash.org coding conventions/notes
 ----------------------------------------
 
-$top_dir := the relative reference to the top of the relative website; this
-  should be used for language-independent resources (stylesheets, images, php
-  includes), but not for links...
+There are three main classes of links:
 
-$home := a prefix for URLs; for everything but lists.gnucash.org, this'll
-  be ".", but for lists.gnucash.org it'll be "http://www.gnucash.org/".
+- external resources [$top_dir[/externals]]
+  - www: relative
+  - !www: relative
 
+- translations [$top_dir/[«lang»]]
+  - www: relative
+  - !www: relative
 
+- navigation [$home]
+  - www: relative
+  - !www: url-prefixed ("http://www.gnucash.org/file.phtml")
+
+                        | www.gnucash.org  |  lists.gnucash.org        |
+                        +------------------+---------------------------+
+           external (C) |   ./[externals/] |  ./[externals/]           | \
+        external (lang) |  ../[externals/] | ../[externals/]           |  \,- $top_dir
+        translation (C) |   ./[lang]       |  ./[lang]                 |  / 
+     translation (lang) |  ../[lang]       | ../[lang]                 | /
+         navigation (C) |   ./             | http://www.[...]/         |  \,- $home
+      navigation (lang) |   ./             | http://www.[...]/[lang]/  |  /
+
+As such:
+
+  $top_dir := the relative reference to the top of the relative website; this
+    should be used for language-independent resources (stylesheets, images, php
+    includes), but not for links...
+
+  $home := a prefix for navigational URLs; for everything but
+    lists.gnucash.org, this'll be ".", but for lists.gnucash.org it'll
+    be "http://www.gnucash.org/".
+
+As well, the following variables should be set:
+...per directory:
+
+  $locale := the LANG to use for gettext.
+
+...per file:
+
+  $title := the text of the page.
+
+  $homepage := if the file is the homepage; controls RSS feed linkage.
+
 ----------------------
 Preparing translations
 ----------------------

Modified: htdocs/trunk/de/local.php
===================================================================
--- htdocs/trunk/de/local.php	2006-05-17 21:54:45 UTC (rev 14098)
+++ htdocs/trunk/de/local.php	2006-05-17 23:09:07 UTC (rev 14099)
@@ -1,4 +1,5 @@
 <?php
 $top_dir = "..";
+$home = ".";
 $locale = "de_DE";
 ?>

Modified: htdocs/trunk/externals/header.phtml
===================================================================
--- htdocs/trunk/externals/header.phtml	2006-05-17 21:54:45 UTC (rev 14098)
+++ htdocs/trunk/externals/header.phtml	2006-05-17 23:09:07 UTC (rev 14099)
@@ -7,20 +7,19 @@
 <link rel="shortcut icon" href="<?=$top_dir?>/favicon.ico" type="image/x-icon" />
 <?php echo $mimeline; ?>
 <?php
-$home = ".";
 
 if (isset($homepage)) { ?>
-<!-- the RSS only appears on the home page, not on all pages. -->
-<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=$top_dir?>rss-feed.phtml">
+  <!-- the RSS only appears on the home page, not on all pages. -->
+  <link rel="alternate" type="application/rss+xml" title="RSS" href="<?=$top_dir?>rss-feed.phtml">
 <?php } ?>
 
-<title>GnuCash - <?= _($title); ?></title>
+<title><?= _($title); ?> | GnuCash</title>
 </head>
 
 <body>
 
 <div id="head">
-<img src="<?=$top_dir?>/images/gnucash_logo1.png" alt="[GnuCash Logo]" id="gnclogo" width="179" height="45" />
+<a href="$home"><img src="<?=$top_dir?>/images/gnucash_logo1.png" alt="[GnuCash Logo]" id="gnclogo" width="179" height="45" border="0"/></a>
 <br/>
 <span id="language">
 Language:

Modified: htdocs/trunk/fr/local.php
===================================================================
--- htdocs/trunk/fr/local.php	2006-05-17 21:54:45 UTC (rev 14098)
+++ htdocs/trunk/fr/local.php	2006-05-17 23:09:07 UTC (rev 14099)
@@ -1,4 +1,5 @@
 <?php
 $locale = "fr_FR";
 $top_dir = "..";
+$home = ".";
 ?>

Modified: htdocs/trunk/local.php
===================================================================
--- htdocs/trunk/local.php	2006-05-17 21:54:45 UTC (rev 14098)
+++ htdocs/trunk/local.php	2006-05-17 23:09:07 UTC (rev 14099)
@@ -1,5 +1,5 @@
 <?php
 $top_dir = ".";
-$toppath = $top_dir;
+$home = $top_dir;
 $locale = "en_US";
 ?>



More information about the gnucash-changes mailing list