summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2013-11-25 19:12:19 +0100
committerPhilip Häusler <msquare@notrademark.de>2013-11-25 19:12:19 +0100
commit96a263f7129fbcf01ef644c531cdcc0a0be59085 (patch)
tree1dcb780aad3926e308a7daae9db5d88ca4d459f6 /public
parent33b97e3ad3f4baa82bb754c46134554c90b30346 (diff)
initial gettext integration
Diffstat (limited to 'public')
-rw-r--r--public/css/style2.css1
-rw-r--r--public/index.php15
-rw-r--r--public/pic/flag/de_DE.UTF-8.png (renamed from public/pic/flag/de.png)bin545 -> 545 bytes
-rw-r--r--public/pic/flag/en_US.UTF-8.png (renamed from public/pic/flag/en.png)bin599 -> 599 bytes
4 files changed, 10 insertions, 6 deletions
diff --git a/public/css/style2.css b/public/css/style2.css
index 30d6d748..d7cec284 100644
--- a/public/css/style2.css
+++ b/public/css/style2.css
@@ -33,6 +33,7 @@ a {
}
.error,.success,.info {
+ color: #fff;
background-color: #333;
}
diff --git a/public/index.php b/public/index.php
index fb4c3c7f..ddb727f8 100644
--- a/public/index.php
+++ b/public/index.php
@@ -18,6 +18,7 @@ require_once ('includes/view/Shifts_view.php');
require_once ('includes/view/Sprache_view.php');
require_once ('includes/view/User_view.php');
+require_once ('includes/helper/internationalization_helper.php');
require_once ('includes/helper/message_helper.php');
require_once ('includes/helper/error_helper.php');
@@ -30,6 +31,8 @@ require_once ('includes/pages/user_messages.php');
session_start();
+gettext_init();
+
sql_connect($config['host'], $config['user'], $config['pw'], $config['db']);
load_auth();
@@ -37,7 +40,7 @@ load_auth();
// JSON Authorisierung gewünscht?
if (isset($_REQUEST['auth']))
json_auth_service();
-
+
// Gewünschte Seite/Funktion
$p = isset($user) ? "news" : "login";
if (isset($_REQUEST['p']) && preg_match("/^[a-z0-9_]*$/i", $_REQUEST['p']) && ($_REQUEST['p'] == 'stats' || (sql_num_query("SELECT * FROM `Privileges` WHERE `name`='" . sql_escape($_REQUEST['p']) . "' LIMIT 1") > 0)))
@@ -163,26 +166,26 @@ elseif (in_array($p, $privileges)) {
// Hinweis für ungelesene Nachrichten
if (isset($user) && $p != "user_messages")
$content = user_unread_messages() . $content;
-
+
// Hinweis für Engel, die noch nicht angekommen sind
if (isset($user) && $user['Gekommen'] == 0)
$content = error("You are not marked as arrived. Please go to heaven's desk, get your angel badge and/or tell them that you arrived already.", true) . $content;
-
+
// Erzengel Hinweis für unbeantwortete Fragen
if (isset($user) && $p != "admin_questions")
$content = admin_new_questions() . $content;
-
+
// Erzengel Hinweis für freizuschaltende Engeltypen
if (isset($user) && $p != "admin_user_angeltypes")
$content = admin_new_user_angeltypes() . $content;
-echo template_render('../templates/layout.html', array (
+echo template_render('../templates/layout.html', array(
'theme' => isset($user) ? $user['color'] : $default_theme,
'title' => $title,
'atom_link' => ($p == 'news' || $p == 'user_meetings') ? '<link href="' . page_link_to('atom') . (($p == 'user_meetings') ? '&amp;meetings=1' : '') . '&amp;key=' . $user['api_key'] . '" type="application/atom+xml" rel="alternate" title="Atom Feed">' : '',
'menu' => make_menu(),
'content' => $content,
- 'header_toolbar' => header_toolbar()
+ 'header_toolbar' => header_toolbar()
));
counter();
diff --git a/public/pic/flag/de.png b/public/pic/flag/de_DE.UTF-8.png
index ac4a9773..ac4a9773 100644
--- a/public/pic/flag/de.png
+++ b/public/pic/flag/de_DE.UTF-8.png
Binary files differ
diff --git a/public/pic/flag/en.png b/public/pic/flag/en_US.UTF-8.png
index ff701e19..ff701e19 100644
--- a/public/pic/flag/en.png
+++ b/public/pic/flag/en_US.UTF-8.png
Binary files differ