[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/media/includes
From: Matthias Messmer <messmer () kde ! org>
Date: 2011-06-11 16:30:16
Message-ID: 20110611163016.9A107AC7BC () svn ! kde ! org
[Download RAW message or body]
SVN commit 1236154 by messmer:
added language selector for derry skin
added i18n support of PlasmaMenu class
fixed cookie reading for locale
M +3 -3 classes/class_menu.inc
M +11 -1 derry/css.php
M +20 -10 derry/toolbox.inc
M +1 -0 functions.inc
M +4 -4 header.inc
--- trunk/www/media/includes/classes/class_menu.inc #1236153:1236154
@@ -800,7 +800,7 @@
{
$nav .= $sep . $this->buildLink($name, $link);
$nav .= $sep . $this->buildLink($entryName, $entryLink);
- $nav .= $sep . $subEntryName;
+ $nav .= $sep . i18n_var( $subEntryName );
$set = true;
}
}
@@ -809,7 +809,7 @@
if ($url && $entryLink && strpos($url, $entryLink) !== false && !$set)
{
$nav .= $sep . $this->buildLink($name, $link);
- $nav .= $sep . $entryName;
+ $nav .= $sep . i18n_var( $entryName );
$set = true;
}
}
@@ -829,7 +829,7 @@
function buildLink($name, $url)
{
// Return the link
- return ($url ? "<a href=\"{$url}\">{$name}</a>" : $name);
+ return ($url ? "<a href=\"{$url}\">".i18n_var($name)."</a>" : i18n_var( $name ) );
}
}
--- trunk/www/media/includes/derry/css.php #1236153:1236154
@@ -250,7 +250,7 @@
#main .toolbox ul{
list-style: none;
- text-align: right;
+ text-align: left;
font-size: 1em;
padding: 11px 5px 11px;
background: url('../../images/border-breadcrumb.png') no-repeat center center;
@@ -268,6 +268,16 @@
list-style-image: none;
}
+/* skinny language selector in the toolbox line */
+#main .toolbox #location form {
+ float:right;
+ border:none;
+ border-radius:none;
+ box-shadow:none;
+ padding:8px 5px;
+ margin:0;
+}
+
/*H1 is defined at HEADER styles */
/*#main h1 { color: #446888;font-size:22pt; padding:30px 0px 20px 0px;}*/
#main h1, #main h2, #main h3, #main h4, #main h5, #main h6 {font-weight:normal}
--- trunk/www/media/includes/derry/toolbox.inc #1236153:1236154
@@ -1,15 +1,25 @@
-<?php if (! isset ($hidelocation) || $hidelocation == false) {
-
- $url = $_SERVER["REQUEST_URI"];
- // TEMPORARY
- $url = preg_replace("/mainsite\//", "", $url);
-
- // If the user is NOT on the root
- if ($url != "/") {
+ <div id="location" class="toolboxtext">
+<?php
+ if (isset($site_languages) && count($site_languages) > 1)
+ {
?>
- <div id="location" class="toolboxtext">
+ <form method="get" name="languagecombo" action="">
+ <select name="site_locale">
+ <?php
+ foreach ($site_languages as &$value) {
+ if ($value == $site_locale) $selected=" \
selected='selected'"; + else $selected="";
+ print "<option \
value='".$value."'".$selected.">".languageName($value)."</option>"; + \
} + ?>
+ </select>
+ <input type="submit" value=" <?php i18n("Change language")?> " \
id="languageButton" /> + </form>
+<?php
+}
+if (! isset ($hidelocation) || $hidelocation == false) { ?>
<ul>
<li><?php $plasmaMenu->breadCrumb() ?></li>
</ul>
+<?php } ?>
</div>
-<?php } }?>
--- trunk/www/media/includes/functions.inc #1236153:1236154
@@ -262,6 +262,7 @@
{
switch ($code)
{
+ case "de": return "Deutsch";
case "el": return "Ελληνικά";
case "en": return "English";
case "es": return "Español";
--- trunk/www/media/includes/header.inc #1236153:1236154
@@ -26,9 +26,9 @@
}
else
{
- if (isset($_REQUEST['locale']))
+ if (isset($_COOKIE['locale']))
{
- $site_locale = $_REQUEST['locale'];
+ $site_locale = $_COOKIE['locale'];
}
else
{
@@ -94,7 +94,7 @@
$site_title = i18n_var("K Desktop Environment");
if (isset($page_title))
- $title = "$site_title - $page_title";
+ $title = "$site_title - ".i18n_var( $page_title );
else
$title = $site_title;
@@ -154,7 +154,7 @@
if (isset($page_title_extra_html)) {
print $page_title_extra_html;
}
- print "<h2>$page_title</h2>\n";
+ print "<h2>".i18n_var( $page_title )."</h2>\n";
}
if (isset ($templatepath))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic