German translation

This commit is contained in:
Akamaru 2015-08-13 17:23:12 +02:00
parent 65e5b02f47
commit 67c06db236
11 changed files with 57 additions and 58 deletions

View File

@ -2,7 +2,6 @@
## Installation ## Installation
Edit `config.php` to your needs. Afterwards, run `install.php`. Make sure to Füge in die `config.php` deine Daten ein.
delete this file after installation. Rufe dann die `install.php` in einem Browser auf.
Lösche nach der Installation die `install.php`.
Don't forget to make the `tmp` directory writable for the webserver user.

View File

@ -9,7 +9,7 @@ $MYSQL_USERNAME = "";
$MYSQL_PASSWORD = ""; $MYSQL_PASSWORD = "";
// Please comment or delete the next line. // Please comment or delete the next line.
die('Please edit config.php!'); die('Bitte config.php bearbeiten!');
// Don't touch anything below here. // Don't touch anything below here.

View File

@ -41,7 +41,7 @@ if (isset($_POST['words'])) {
$word2 = check_word("word2"); $word2 = check_word("word2");
$word3 = check_word("word3"); $word3 = check_word("word3");
if ($word1 === false || $word2 === false || $word3 === false) { if ($word1 === false || $word2 === false || $word3 === false) {
$_SESSION['flash'] = "Not all words entered are valid."; $_SESSION['flash'] = "Nicht alle eingegebenen Wörter sind gültig.";
header("Location: index.php"); header("Location: index.php");
exit(); exit();
} }

View File

@ -54,23 +54,23 @@ SQL
; ;
if (!$sql->multi_query($sql_str)) { ?> if (!$sql->multi_query($sql_str)) { ?>
<h2>An error occurred</h2> <h2>Ein Fehler ist aufgetreten</h2>
<pre><?php echo $sql->error; ?></pre> <pre><?php echo $sql->error; ?></pre>
<form method="POST"> <form method="POST">
<input type="hidden" name="step1" value="1"> <input type="hidden" name="step1" value="1">
<button type="submit">Retry</button> <button type="submit">Nochmal</button>
</form> </form>
<?php } else { <?php } else {
hell: ?> hell: ?>
<h2>Step 1: Login details</h2> <h2>Schritt 1: Login Daten</h2>
<form method="POST"> <form method="POST">
<label>Site name: <input type="text" name="sitename" value="3words"></label><br /> <label>Seiten Name: <input type="text" name="sitename" value="3words"></label><br />
<label>User name: <input type="text" name="username"></label><br /> <label>User Name: <input type="text" name="username"></label><br />
<label>Password: <input type="password" id="p1" name="password"></label><br /> <label>Passwort: <input type="password" id="p1" name="password"></label><br />
<label>Password (again): <input type="password" id="p2" name="passwordconfirm"></label><br /> <label>Passwort wiederholen: <input type="password" id="p2" name="passwordconfirm"></label><br />
<input type="hidden" name="step2" value="2"> <input type="hidden" name="step2" value="2">
<button type="submit">Submit</button> <button type="submit">Weiter</button>
</form> </form>
<?php }} else if (isset($_POST['step2'])) { // step2: create user <?php }} else if (isset($_POST['step2'])) { // step2: create user
@ -84,24 +84,24 @@ hell: ?>
"INSERT INTO `config` (`key`, `value`) VALUES ('recent_public', 'false'); " . "INSERT INTO `config` (`key`, `value`) VALUES ('recent_public', 'false'); " .
"INSERT INTO `config` (`key`, `value`) VALUES ('recent_count', '5');"; "INSERT INTO `config` (`key`, `value`) VALUES ('recent_count', '5');";
if (!$sql->multi_query($sql_str)) { ?> if (!$sql->multi_query($sql_str)) { ?>
<h2>An error occurred</h2> <h2>Ein Fehler ist aufgetreten</h2>
<pre><?php echo $sql->error; ?></pre> <pre><?php echo $sql->error; ?></pre>
<form method="POST"> <form method="POST">
<label>Site name: <input type="text" name="sitename" value="<?php echo htmlspecialchars($_POST['sitename']); ?>"></label><br /> <label>Seiten Name: <input type="text" name="sitename" value="<?php echo htmlspecialchars($_POST['sitename']); ?>"></label><br />
<label>User name: <input type="text" name="username" value="<?php echo htmlspecialchars($_POST['username']); ?>"></label><br /> <label>User Name: <input type="text" name="username" value="<?php echo htmlspecialchars($_POST['username']); ?>"></label><br />
<label>Password: <input type="password" id="p1" name="password"></label><br /> <label>Passwort: <input type="password" id="p1" name="password"></label><br />
<label>Password (again): <input type="password" id="p2" name="passwordconfirm"></label><br /> <label>Passwort wiederholen: <input type="password" id="p2" name="passwordconfirm"></label><br />
<input type="hidden" name="step2" value="2"> <input type="hidden" name="step2" value="2">
<button type="submit">Retry</button> <button type="submit">Nochmal</button>
</form> </form>
<?php } else { ?> <?php } else { ?>
<h2>Step 3: Enjoy!</h2> <h2>Schritt 3: Viel Spaß!</h2>
You now should delete this file. Have fun. Bitte lösche nun die install.php
<?php }} else { // step 0: click next to continue ?> <?php }} else { // step 0: click next to continue ?>
<h2>Step 0: Click the damn button to start</h2> <h2>Schritt 0: Klick auf den Button um zu starten!</h2>
<form method="POST"> <form method="POST">
<input type="hidden" name="step1" value="1"> <input type="hidden" name="step1" value="1">
<button type="submit">Click me hard!</button> <button type="submit">Klick mich!</button>
</form> </form>
<?php } ?> <?php } ?>

16
ucp.php
View File

@ -25,7 +25,7 @@ function check_privileges($ajax = false) {
if ($ajax) { if ($ajax) {
echo json_encode(array("success" => false)); echo json_encode(array("success" => false));
} else { } else {
$_SESSION['flash'] = "Log in to continue."; $_SESSION['flash'] = "Einloggen um fortzufahren.";
header('Location: ucp.php?page=login'); header('Location: ucp.php?page=login');
} }
exit(); exit();
@ -55,7 +55,7 @@ switch ($_GET['page']) {
} }
case "login": { case "login": {
if ($_SESSION['logged_in']) { if ($_SESSION['logged_in']) {
$_SESSION['flash'] = "You're already logged in."; $_SESSION['flash'] = "Du bist bereits eingeloggt.";
header('Location: ucp.php'); header('Location: ucp.php');
exit(); exit();
} }
@ -70,12 +70,12 @@ switch ($_GET['page']) {
if (($_POST['username'] === $username) && ($post_pass === $password)) { if (($_POST['username'] === $username) && ($post_pass === $password)) {
// successful login // successful login
$_SESSION['logged_in'] = true; $_SESSION['logged_in'] = true;
$_SESSION['flash'] = "You are now logged in."; $_SESSION['flash'] = "Erfolgreich eingeloggt.";
header('Location: ucp.php'); header('Location: ucp.php');
exit(); exit();
} else { } else {
// failed login // failed login
$_SESSION['flash'] = "Wrong user name or password"; $_SESSION['flash'] = "Falscher Name oder Passwort";
header('Location: ucp.php?page=login'); header('Location: ucp.php?page=login');
exit(); exit();
} }
@ -87,7 +87,7 @@ switch ($_GET['page']) {
session_destroy(); session_destroy();
session_start(); session_start();
$_SESSION['flash'] = "Sucessfully logged out"; $_SESSION['flash'] = "Erfolgreich ausgeloggt.";
header('Location: index.php'); header('Location: index.php');
exit(); exit();
break; break;
@ -113,7 +113,7 @@ switch ($_GET['page']) {
$sql->query("UPDATE `config` SET `value`='" . (int) $_POST['recent_count'] . "' WHERE `key`='recent_count'"); $sql->query("UPDATE `config` SET `value`='" . (int) $_POST['recent_count'] . "' WHERE `key`='recent_count'");
} }
} }
$_SESSION['flash'] = "Successfully saved changes."; $_SESSION['flash'] = "Änderungen erfolgreich gespeichert.";
header('Location: ucp.php?page=settings'); header('Location: ucp.php?page=settings');
exit(); exit();
break; break;
@ -123,13 +123,13 @@ switch ($_GET['page']) {
if ($_POST['password_change'] === $_POST['password_verify']) { if ($_POST['password_change'] === $_POST['password_verify']) {
if (strlen($_POST['password_change']) > 3) { if (strlen($_POST['password_change']) > 3) {
$sql->query("UPDATE `config` SET `value`='" . $sql->real_escape_string(crypt_password($_POST['password_change'], gen_salt(22))) . "' WHERE `key`='password';"); $sql->query("UPDATE `config` SET `value`='" . $sql->real_escape_string(crypt_password($_POST['password_change'], gen_salt(22))) . "' WHERE `key`='password';");
$_SESSION['flash'] = "Successfully changed password."; $_SESSION['flash'] = "Passwort erfolgreich geändert.";
header('Location: ucp.php?page=settings'); header('Location: ucp.php?page=settings');
exit(); exit();
} }
} }
} }
$_SESSION['flash'] = "The passwords did not match or your password is shorter than 3 characters."; $_SESSION['flash'] = "Das Passwort stimmt nicht überein oder ist zu kurz.";
header('Location: ucp.php?page=settings'); header('Location: ucp.php?page=settings');
exit(); exit();
break; break;

View File

@ -1,6 +1,6 @@
<footer> <footer>
<hr/> <hr/>
<span class="text-muted footer-lm">{$words_total} words sent in!</span> <span class="float-right footer-rm"><a href="https://github.com/Leafcat/3words">3words</a> by <a href="http://leafc.at">Leafcat Coding</a> &copy; 2014</span> <span class="text-muted footer-lm">{$words_total} Worte wurden schon eingesendet!</span> <span class="float-right footer-rm">3words by <a href="http://leafc.at">Leafcat Coding</a> &copy; 2014 and forked by <a href="http://akamaru.de/">Akamaru</a>. <a href="https://github.com/Akamaru/3words">Code on GitHub</a></span>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -8,16 +8,16 @@
<div class="col-md-3"> <div class="col-md-3">
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<li class="active"><a href="ucp.php?page=inbox">Inbox</a></li> <li class="active"><a href="ucp.php?page=inbox">Inbox</a></li>
<li><a href="ucp.php?page=settings">Settings</a></li> <li><a href="ucp.php?page=settings">Einstellungen</a></li>
</ul> </ul>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<h4>Words sent to you:</h4> <h4>Worte an dich gesendet:</h4>
<table class="table table-responsive table-bordered table-condensed"> <table class="table table-responsive table-bordered table-condensed">
<tbody> <tbody>
{loop="$words"} {loop="$words"}
<tr> <tr>
<td id="words-{$value.id}"><b>{$value.author}</b> thinks that you are <span class="label label-default">{$value.word1}</span>, <span class="label label-default">{$value.word2}</span> and <span class="label label-default">{$value.word3}</span><a class="float-right" href="#" class="text-danger" onclick="b(this)" data-word-id="{$value.id}"><i class="glyphicon glyphicon-remove"></i></a></td> <td id="words-{$value.id}"><b>{$value.author}</b> findet, dass du <span class="label label-default">{$value.word1}</span>, <span class="label label-default">{$value.word2}</span> und <span class="label label-default">{$value.word3}</span> bist. <a class="float-right" href="#" class="text-danger" onclick="b(this)" data-word-id="{$value.id}"><i class="glyphicon glyphicon-remove"></i></a></td>
</tr> </tr>
{/loop} {/loop}
</tbody> </tbody>

View File

@ -6,21 +6,21 @@
{/if} {/if}
<h1 class="text-center">{$site_name}!</h1> <h1 class="text-center">{$site_name}!</h1>
<form method="POST"> <form method="POST">
<p class="text-center">Want to tell them who you are? <input name="author" type="text" class="input-xs" placeholder="Anonymous"></p> <p class="text-center">Wer bist du? <input name="author" type="text" class="input-xs" placeholder="Ein Äffchen"></p>
<div class="row"> <div class="row">
<div class="col-sm-4 rowm"> <div class="col-sm-4 rowm">
<input name="word1" type="text" class="form-control" placeholder="First Word"> <input name="word1" type="text" class="form-control" placeholder="Erstes Wort">
</div> </div>
<div class="col-sm-4 rowm"> <div class="col-sm-4 rowm">
<input name="word2" type="text" class="form-control" placeholder="Second Word"> <input name="word2" type="text" class="form-control" placeholder="Zweites Wort">
</div> </div>
<div class="col-sm-4 rowm"> <div class="col-sm-4 rowm">
<input name="word3" type="text" class="form-control" placeholder="Third Word"> <input name="word3" type="text" class="form-control" placeholder="Drittes Wort">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-4 col-sm-offset-4"> <div class="col-sm-4 col-sm-offset-4">
<button type="submit" class="btn btn-primary btn-block btn-lg">Submit</button> <button type="submit" class="btn btn-primary btn-block btn-lg">Absenden</button>
</div> </div>
</div> </div>
<input type="hidden" name="words"> <input type="hidden" name="words">
@ -28,12 +28,12 @@
{if="$recent_public"} {if="$recent_public"}
<div class="row recent-margin"> <div class="row recent-margin">
<div class="col-md-offset-2 col-md-8"> <div class="col-md-offset-2 col-md-8">
<h4>Recent Answers by others:</h4> <h4>Was andere denken:</h4>
<table class="table table-responsive table-bordered table-condensed"> <table class="table table-responsive table-bordered table-condensed">
<tbody> <tbody>
{loop="$words"} {loop="$words"}
<tr> <tr>
<td><b>{$value.author}</b> wrote that {$user_name} is <span class="label label-default">{$value.word1}</span>, <span class="label label-default">{$value.word2}</span> and <span class="label label-default">{$value.word3}</span></td> <td><b>{$value.author}</b> schrieb, dass {$user_name} <span class="label label-default">{$value.word1}</span>, <span class="label label-default">{$value.word2}</span> und <span class="label label-default">{$value.word3}</span> ist.</td>
</tr> </tr>
{/loop} {/loop}
</tbody> </tbody>

View File

@ -8,11 +8,11 @@
<form role="form" method="POST" action="ucp.php?page=login"> <form role="form" method="POST" action="ucp.php?page=login">
<div class="form-group"> <div class="form-group">
<label for="InputUsername">Username</label> <label for="InputUsername">Username</label>
<input type="text" class="form-control" id="InputUsername" name="username" placeholder="Enter username"> <input type="text" class="form-control" id="InputUsername" name="username" placeholder="Username eingeben">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="InputPassword">Password</label> <label for="InputPassword">Passwort</label>
<input type="password" class="form-control" id="InputUsername" name="password" placeholder="Enter password"> <input type="password" class="form-control" id="InputUsername" name="password" placeholder="Passwort eingeben">
</div> </div>
<input type="hidden" name="login"> <input type="hidden" name="login">
<button type="submit" class="btn btn-default btn-block">Login</button> <button type="submit" class="btn btn-default btn-block">Login</button>

View File

@ -21,7 +21,7 @@
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{$user_name}<b class="caret"></b></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown">{$user_name}<b class="caret"></b></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="ucp.php?page=settings">Settings</a></li> <li><a href="ucp.php?page=settings">Einstellungen</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="ucp.php?page=logout">Logout</a></li> <li><a href="ucp.php?page=logout">Logout</a></li>
{else} {else}

View File

@ -8,38 +8,38 @@
<div class="col-md-3"> <div class="col-md-3">
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<li><a href="ucp.php?page=inbox">Inbox</a></li> <li><a href="ucp.php?page=inbox">Inbox</a></li>
<li class="active"><a href="ucp.php?page=settings">Settings</a></li> <li class="active"><a href="ucp.php?page=settings">Einstellungen</a></li>
</ul> </ul>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<form role="form" action="ucp.php?page=settings" method="POST"> <form role="form" action="ucp.php?page=settings" method="POST">
<div class="form-group"> <div class="form-group">
<label for="sitename">Site name</label> <label for="sitename">Seiten Name</label>
<input type="text" class="form-control" name="sitename" placeholder="3 words about your mom" value="{$site_name}"> <input type="text" class="form-control" name="sitename" placeholder="3 Worte über deiner Mutter" value="{$site_name}">
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input id="recent_check" name="recent_check" type="checkbox" onchange="a(!this.checked)"{if="$recent_public"} checked{/if}> Show recent words <input id="recent_check" name="recent_check" type="checkbox" onchange="a(!this.checked)"{if="$recent_public"} checked{/if}> Zeige letzte Worte
</label> </label>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="recent">Recent words</label> <label for="recent">Letzte Worte</label>
<input type="number" class="form-control" id="recent-count" name="recent_count" value="{$recent_count}"{if="!$recent_public"} disabled{/if}> <input type="number" class="form-control" id="recent-count" name="recent_count" value="{$recent_count}"{if="!$recent_public"} disabled{/if}>
</div> </div>
<button type="submit" class="btn btn-default" id="recent-btn">Submit</button> <button type="submit" class="btn btn-default" id="recent-btn">Speichern</button>
<input type="hidden" name="action" value="generic"> <input type="hidden" name="action" value="generic">
</form> </form>
<hr/> <hr/>
<form role="form" action="ucp.php?page=settings" method="POST"> <form role="form" action="ucp.php?page=settings" method="POST">
<div class="form-group"> <div class="form-group">
<label for="password_change">New password</label> <label for="password_change">Neues Passwort</label>
<input type="password" class="form-control" name="password_change" placeholder="Password"> <input type="password" class="form-control" name="password_change" placeholder="Passwort">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="password_verify">Repeat new password</label> <label for="password_verify">Neues Passwort wiederholen</label>
<input type="password" class="form-control" name="password_verify" placeholder="Password"> <input type="password" class="form-control" name="password_verify" placeholder="Passwort">
</div> </div>
<button type="submit" class="btn btn-default">Change password</button> <button type="submit" class="btn btn-default">Passwort ändern</button>
<input type="hidden" name="action" value="password"> <input type="hidden" name="action" value="password">
</form> </form>
</div> </div>