Changeset 176 in t29-www


Ignore:
Timestamp:
Aug 9, 2010, 9:42:58 PM (9 years ago)
Author:
sven
Message:

Kleinigkeiten:

  • head.inc.shtm: Whitespaces korrigiert ;-)
  • tools.js: mini-gettext-Implementierung geschrieben
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • de/inc/head.inc.shtm

    r173 r176  
    44     keinen Effekt haben. Bitte die Original-Dateien (SSI, Endung .shtm oder
    55    .shtml) bearbeiten.
    6                
    7     Fuer weitere Informationen siehe Entwicklungsportal:
    8     http://dev.technikum29.de
    9     $Id$
     6
     7     Fuer weitere Informationen siehe Entwicklungsportal: http://dev.technikum29.de
     8     $Id$
    109    -->
    1110
     
    2524    <link rel="alternate" href="/en/<!--#echo var="url_en" -->" hreflang="en" title="English Version of this page" />
    2625
    27         <script type="text/javascript" src="/shared/js/jquery-1.4.2.min.js"></script>
    28         <script type="text/javascript" src="/shared/js/tools.js"></script>
    29         <script type="text/javascript" src="/shared/js/common.js"></script>
     26    <script type="text/javascript" src="/shared/js/jquery-1.4.2.min.js"></script>
     27    <script type="text/javascript" src="/shared/js/tools.js"></script>
     28    <script type="text/javascript" src="/shared/js/common.js"></script>
    3029
    3130    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
     
    3635    <meta name="robots" content="index,follow" />
    3736
    38     <!-- h1 class="de-v3": experimentell geschalteter "neuer" Banner, nur auf deutsch, siehe fresh.css -->
    39 
    40     <!--#config timefmt="%d.%m.%Y %T" --><!-- header last modified: <!--#echo var="LAST_MODIFIED" --> (new header v5.7) -->
    4137<!--#set var="heading" value='<div class="${location} ${part} de"><div id="wrapper">
    4238<h1 class="de de-v3"><a href="/de/" title="Zur technikum29-Startseite (deutsch)" name="top"><span>technikum29</span></a><span class="old">&nbsp;</span></h1>
    4339<p id="h1-subtitle">Museum f&uuml;r Computer- , EDV- und Kommunikationstechnik<span class="hidden">; Computermuseum</span></p>' -->
    44 
    45    <!--
    46    <style type="text/css">
    47         #content img { -moz-box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5); }
    48    </style>
    49    -->
  • en/inc/head.inc.shtm

    r173 r176  
    11<link rel="alternate stylesheet" type="text/css" href="/shared/css/screen.css" media="screen,projection" title="technikum29 old" />
    2 <link rel="stylesheet" type="text/css" href="/shared/css/fresh.css" media="screen,projection" title="technikum29 fresh" />
     2    <link rel="stylesheet" type="text/css" href="/shared/css/fresh.css" media="screen,projection" title="technikum29 fresh" />
    33    <link rel="stylesheet" type="text/css" href="/shared/css/common.css" />
    44    <!-- Während Entwicklung -->
     
    1818    <link rel="alternate" href="/de/<!--#echo var="url_de" -->" hreflang="de" title="Deutsche Version der Seite" />
    1919
    20         <script type="text/javascript" src="/shared/js/jquery-1.4.2.min.js"></script>
    21         <script type="text/javascript" src="/shared/js/tools.js"></script>
    22         <script type="text/javascript" src="/shared/js/common.js"></script>
     20    <script type="text/javascript" src="/shared/js/jquery-1.4.2.min.js"></script>
     21    <script type="text/javascript" src="/shared/js/tools.js"></script>
     22    <script type="text/javascript" src="/shared/js/common.js"></script>
    2323
    2424    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
  • shared/js/tools.js

    r173 r176  
    1616var t29 = {}; // the t29 namespace
    1717
    18 // allgemeine funktionen:
     18/**
     19 * Common helper functions
     20 **/
     21 
     22// get the language of the current document
    1923t29.language = function(){ return $("h1").hasClass("de") ? "de" : "en"; }
     24
     25// T29 Gettext. Usage:
     26//   t29.gettext("deutscher text", "englsischer text");
     27//   t29.gettext({ de: "deutscher Text", en: "englischer Text" });
     28//   t29.gettext(anything, null) wont work, use t29.gettext({ de: anything, en: null});
     29t29.gettext  = function(de, en) {
     30        if(!en){ en=de.en; de = de.de; }
     31        return t29.language()=="de" ? de : en;
     32}
    2033
    2134/**
     
    166179                        href: "#"+anchor,
    167180                        name: anchor,
    168                         title: t29.language()=="de" ? "Direktlink zu diesem Abschnitt" : "Link to this section"
     181                        title: t29.gettext("Direktlink zu diesem Abschnitt", "Link to this section")
    169182                }).appendTo(this);
    170183        });
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License