Added i18n (french)

This commit is contained in:
Samuel Ortion 2021-04-20 17:05:13 +02:00
parent 7e2c6c122c
commit 1e4ae8b19e
60 changed files with 2615 additions and 367 deletions

View File

@ -4,29 +4,9 @@ ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require "$root/database/credentials.php";
// Connect the database
try {
$db = new PDO("mysql:host=$host;dbname=$database;charset=utf8",
$user,
$password,
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
));
} catch (Exception $e) {
die("Error : ".$e->getMessage());
}
if (isset($_GET['record'])) {
$req = $db->prepare('SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` WHERE id=:id');
$req->execute(array(
"id"=>$_GET['record']
));
} else {
$req = $db->prepare('SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` ORDER BY date DESC, time DESC LIMIT 1');
$req->execute();
}
$data = $req->fetch();
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
@ -44,12 +24,12 @@ include("$root/analytics/owa.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>About</h2>
<p>Chiro-Canto is an online bat sound sharing set of tools, inspired by <a href="https://xeno-canto.org">Xeno-Canto</a>.</p>
<h3>Author</h3>
<p>This website is developped with &#9829; by Samuel ORTION, a juvenile <em>Geekus biologicus</em>.</p>
<h3>Source code</h3>
<p>This project is available under the GNU Affero GPL v3 license at <a href="https://forge.ortion.xyz/Chiro-Canto/chiro-canto">https://forge.ortion.xyz/Chiro-Canto/chiro-canto</a>.</p>
<h2><?=_('About')?></h2>
<p><?=_('Chiro-Canto is an online bat sound sharing set of tools, inspired by <a href="https://xeno-canto.org">Xeno-Canto</a>.')?></p>
<h3><?=_('Author')?></h3>
<p><?=_('This website is developped with &#9829; by Samuel ORTION, a juvenile <em>Geekus biologicus</em>.')?></p>
<h3><?=_('Source code')?></h3>
<p><?=_('This project is available under the GNU Affero GPL v3 license at <a href="https://forge.ortion.xyz/Chiro-Canto/chiro-canto">https://forge.ortion.xyz/Chiro-Canto/chiro-canto</a>.')?></p>
</section>
<?php include("$root/footer.php");?>
</body>

View File

@ -5,6 +5,8 @@ error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
include("$root/vendor/erusev/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/$lang/lang.php");
?>
<!DOCTYPE html>
<html lang="en">

View File

@ -8,7 +8,7 @@ ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include("$root/vendor/erusev/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
require("$root/lang/gettext.php");
function archive() {
global $root;
$results = array();

View File

@ -23,7 +23,7 @@ include("$root/analytics/owa.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>All Articles</h2>
<h2><?=_('All Articles')?></h2>
<?php if (isset($results['error'])) { ?>
<div class="error"><?php echo $results['error'] ?></div>
<?php }
@ -32,8 +32,8 @@ include("$root/analytics/owa.php");
<?php } ?>
<table>
<tr>
<th>Publication Date</th>
<th>Article</th>
<th><?=('Publication Date')?></th>
<th><?=_('Article')?></th>
</tr>
<?php foreach($results['articles'] as $article) { ?>
<tr>
@ -44,8 +44,8 @@ include("$root/analytics/owa.php");
</tr>
<?php } ?>
</table>
<p><a href="admin.php?action=new">New article</a></p>
<p><a href="./">Return to Homepage</a></p>
<p><a href="admin.php?action=new"><?=_('New article')?></a></p>
<p><a href="./"><?=_('Return to Homepage')?></a></p>
</section>
<?php include("$root/footer.php");?>

View File

@ -2,5 +2,5 @@
<h3><?php echo htmlspecialchars($results['articles'][0]->title)?></h3>
<div><?php echo $Parsedown->text(htmlspecialchars($results['articles'][0]->summary))?></div>
<div><?php echo $Parsedown->text(htmlspecialchars($results['articles'][0]->content))?></div>
<p class="pub-date">Published on <?php echo date('j F Y', $results['articles'][0]->publication_date)?></p>
<p><a href="./">Return to Homepage</a></p>
<p class="pub-date"><?=_('Published on ')?><?php echo date('j F Y', $results['articles'][0]->publication_date)?></p>
<p><a href="./"><?=_('Return to Homepage')?></a></p>

3
public/auth/index.php Normal file
View File

@ -0,0 +1,3 @@
<?php
header('Location: login');
?>

View File

@ -4,7 +4,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
@ -13,7 +13,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login | Chiro - Canto</title>
<title><?=_('Login')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -24,15 +24,16 @@ include("$root/analytics/owa.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Login</h2>
<h2><?=_('Login')?></h2>
<?=(isset($_SESSION['error_msg']) and ! $_SESSION['error_msg'] == "" ) ? '<div class="error">'.$_SESSION['error_msg'].'</div>' : ""?>
<form action="login.php" method="post">
<label for="username">Username*</label>
<input id="username" type="text" name="username" placeholder="Enter your username.." required>
<label for="username"><?=_('Username')?>*</label>
<input id="username" type="text" name="username" placeholder="<?=_('Enter your username..')?>" required>
<label for="password">Password*</label>
<input type="password" name="password" id="password" placeholder="Enter your password.." required>
<input type="submit" name="submit" value="submit"><input type="reset" name="reset" value="reset">
<input type="password" name="password" id="password" placeholder="<?=_('Enter your password..')?>" required>
<input type="submit" name="submit" value="<?=_('submit')?>"><input type="reset" name="reset" value="<?=_('reset')?>">
</form>
<a href="/auth/register"><?=_('Not yet registered ?')?></a>
</section>
<?php include("$root/footer.php");?>
</body>

View File

@ -46,16 +46,16 @@ if (isset($_POST['submit']))
$username = $_POST['username'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper username.\n";
$_SESSION['error_msg'] .= _('You did not enter a proper username.').'\n';
}
if (isset($_POST['password'])) {
$password = $_POST['password'];
} else {
$_SESSION['error_msg'] .= "You did not enter a proper password.\n";
$_SESSION['error_msg'] .= _('You did not enter a proper password.').'\n';
}
} else
{
$_SESSION['error_msg'] .= "You did not submit the register form.\n";
$_SESSION['error_msg'] .= _('You did not submit the register form.');
}
if ($_SESSION['error_msg'] == "")
@ -67,11 +67,11 @@ if ($_SESSION['error_msg'] == "")
$_SESSION['username'] = $username;
header('Location: '."/");
} else {
$_SESSION['error_msg'] = "Incorrect password, please try again.\n";
$_SESSION['error_msg'] = _('Incorrect password, please try again.').'\n';
header('Location: '."../../auth/login");
}
} else
{
// header('Location: '."../../auth/login");
header('Location: '."../../auth/login");
}
?>

View File

@ -4,6 +4,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
?>
@ -13,7 +14,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register | Chiro - Canto</title>
<title><?=_('Register')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -24,23 +25,24 @@ include("$root/analytics/owa.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Register</h2>
<h2><?=_('Register')?></h2>
<?=(isset($_SESSION['error_msg']) and ! $_SESSION['error_msg'] == "") ? '<div class="error">'.$_SESSION['error_msg'].'</div>' : ""?>
<form action="register.php" method="post">
<label for="firstname">First Name*</label>
<label for="firstname"><?=_('First Name')?>*</label>
<input id="firstname" type="text" name="firstname" placeholder="John" required>
<label for="lastname">Last Name*</label>
<label for="lastname"><?=_('Last Name')?>*</label>
<input id="lastname" type="text" name="lastname" placeholder="Doe" required>
<label for="username">Username*</label>
<label for="username"><?=_('Username')?>*</label>
<input id="username" type="text" name="username" placeholder="jojo" required>
<label for="password">Password*</label>
<label for="password"><?=_('Password')?>*</label>
<input type="password" name="password" id="password" placeholder="************" required>
<label for="email">Your email*</label>
<label for="email"><?=_('Your email')?>*</label>
<input type="email" name="email" id="email" placeholder="john.doe@example.com" required>
<label for="website">Your website (optional)</label>
<label for="website"><?=_('Your website (optional)')?></label>
<input type="url" name="website" id="website" placeholder="https://example.com">
<input type="submit" name="submit" value="submit"><input type="reset" name="reset" value="reset">
<input type="submit" name="submit" value="<?=_('submit')?>"><input type="reset" name="reset" value="<?=_('reset')?>">
</form>
<a href="/auth/login"><?=_('Already registered ?')?></a>
</section>
<?php include("$root/footer.php");?>
</body>

View File

@ -38,38 +38,38 @@ if (isset($_POST['submit']))
$fname = $_POST['firstname'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper first name.\n";
$_SESSION['error_msg'] .= _('You did not enter a proper first name.').'\n';
}
if (isset($_POST['lastname']))
{
$lname = $_POST['lastname'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper last name.\n";
$_SESSION['error_msg'] .= _('You did not enter a proper last name.');
}
if (isset($_POST['username']))
{
$username = $_POST['username'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper username.\n";
$_SESSION['error_msg'] .= _('You did not enter a proper username.').'\n';
}
if (isset($_POST['email']))
{
$email = $_POST['email'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper email address.\n";
$_SESSION['error_msg'] .= _('You did not enter a proper email address.').'\n';
}
$website = isset($_POST['website']) ? $_POST['website'] : "";
if (isset($_POST['password'])) {
$password_hash = password_hash($_POST['password'], PASSWORD_DEFAULT);
} else {
$_SESSION['error_msg'] .= "You did not enter a proper password.\n";
$_SESSION['error_msg'] .= _('You did not enter a proper password.').'\n';
}
} else
{
$_SESSION['error_msg'] .= "You did not submit the register form.\n";
$_SESSION['error_msg'] .= _('You did not submit the register form.').'\n';
}
if ($_SESSION['error_msg'] == "")

View File

@ -1,5 +1,6 @@
<?php
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
<html lang="en">
@ -18,28 +19,28 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php"); ?>
<?php include("$root/header.php"); ?>
<section>
<h2>Contact</h2>
<h2><?=_('Contact')?></h2>
<article>
<form action="sendmail.php" method="post">
<label for="fname">First Name*</label>
<input type="text" id="fname" name="firstname" placeholder="Your first name.." required><br>
<label for="fname"><?=_('First Name')?>*</label>
<input type="text" id="fname" name="firstname" placeholder="<?=_('Your first name..')?>" required><br>
<label for="lname">Last Name*</label>
<input type="text" id="lname" name="lastname" placeholder="Your last name.." required><br>
<label for="lname"><?=_('Last Name')?>*</label>
<input type="text" id="lname" name="lastname" placeholder="<?=_('Your last name..')?>" required><br>
<label for="email">Email*</label>
<input type="email" id="email" name="email" placeholder="Your email.." required><br>
<label for="email"><?=_('Email')?>*</label>
<input type="email" id="email" name="email" placeholder="<?=_('Your email..')?>" required><br>
<label for="website">Website</label>
<input type="url" id="website" name="website" placeholder="Your website.."><br>
<label for="website"><?=_('Website')?></label>
<input type="url" id="website" name="website" placeholder="<?=_('Your website..')?>"><br>
<label for="subject">Subject*</label>
<input type="text" id="subject" name="subject" placeholder="Your subject.." required><br>
<label for="subject"><?=_('Subject')?>*</label>
<input type="text" id="subject" name="subject" placeholder="<?=_('Your subject..')?>" required><br>
<label for="message">Message*</label>
<textarea id="message" name="message" placeholder="Write something.." required style="height:200px"></textarea><br>
<label for="message"><?=_('Message')?>*</label>
<textarea id="message" name="message" placeholder="<?=_('Write something..')?>" required style="height:200px"></textarea><br>
<input type="submit" value="Submit"><input type="reset" value="Reset">
<input type="submit" value="<?=_('submit')?>"><input type="reset" value="<?=_('reset')?>">
</form>
</article>
</section>

View File

@ -21,27 +21,27 @@ if (isset($_POST)) {
if (isset($_POST['firstname'])) {
$fname = $_POST['firstname'];
} else {
$error_msg .= "You have not entered a proper first name.\n";
$error_msg .= _('You have not entered a proper first name.').'\n';
}
if (isset($_POST['lastname'])) {
$lname = $_POST['lastname'];
} else {
$error_msg .= "You have not entered a proper last name.\n";
$error_msg .= _('You have not entered a proper last name.').'\n';
}
if (isset($_POST['email'])) {
$email = $_POST['email'];
} else {
$error_msg .= "You have not entered a proper email address.\n";
$error_msg .= _('You have not entered a proper email address.').'\n';
}
if (isset($_POST['subject'])) {
$subject = $_POST['subject'];
} else {
$error_msg .= "You have not entered a proper subject.\n";
$error_msg .= _('You have not entered a proper subject.').'\n';
}
if (isset($_POST['message'])) {
$message = $_POST['message'];
} else {
$error_msg .= "You have not entered a proper message.\n";
$error_msg .= _('You have not entered a proper message.').'\n';
}
}
@ -82,7 +82,7 @@ try {
$mail->send();
$mail->smtpClose();
echo 'Message has been sent';
echo _('Message has been sent');
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
echo _('Message could not be sent. Mailer Error: ') + $mail->ErrorInfo;
}

View File

@ -4,6 +4,8 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/gettext.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -36,7 +38,7 @@ $result = $req->fetchAll();
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Discussion | Chiro - Canto</title>
<title><?=_('Discussion')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -47,8 +49,8 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Discussion</h2>
<h3>New messages</h3>
<h2><?=_('Discussion')?></h2>
<h3><?=_('New messages')?></h3>
<ul>
<?php
$no_msg = true;
@ -71,15 +73,15 @@ include("$root/analytics/matomo.php");
}
}
if ($no_msg) {
echo "No message received.\n";
echo _('No message received.').'\n';
}
?>
</ul>
<h3>Send a message</h3>
<h3><?_('Send a message')?></h3>
<form action="messages" method="get">
<label for="author">Addressee</label>
<label for="author"><?=_('Addressee')?></label>
<input type="text" name="author" id="author">
<input type="submit" value="Send">
<input type="submit" value="<?=_('Send')?>">
</form>
</section>
<?php include("$root/footer.php");?>

View File

@ -5,6 +5,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -25,7 +26,7 @@ if (isset($_SESSION['username'])) {
$sender_id = $data['id'];
}
} else {
$_SESSION['error_msg'] = "You must be logged in to receive an send message.";
$_SESSION['error_msg'] = _('You must be logged in to receive or send messages.');
header('Location: /auth/login');
}
if (isset($_GET['author'])) {
@ -72,7 +73,7 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Discussion</h2>
<h2><?=_('Discussion')?></h2>
<div class="messages">
<div class="author">
<?=$addressee?>
@ -108,8 +109,8 @@ include("$root/analytics/matomo.php");
<form action="sendmessage.php" method="post">
<input type="hidden" name="message_by" value="<?=$user_id?>">
<input type="hidden" name="message_to" value="<?=$_GET['author']?>">
<input type="text" name="message_content" id="message_content" placeholder="Enter your message..">
<input type="submit" name="submit" value="Send">
<input type="text" name="message_content" id="message_content" placeholder="<?=_('Enter your message..')?>">
<input type="submit" name="submit" value="<?=_('Send')?>">
</form>
<?php
}

View File

@ -33,16 +33,16 @@ if (isset($_POST['submit'])) {
if (isset($_POST['message_by'])) {
$message_by = $_POST['message_by'];
} else {
$_SESSION['error_msg'] .= "Error: No message author.\n";
$_SESSION['error_msg'] .= _('Error: No message author').'\n';
}
if (isset($_POST['message_to'])) {
$message_to = $_POST['message_to'];
} else {
$_SESSION['error_msg'] .= "Error: No message destinator.\n";
$_SESSION['error_msg'] .= _('Error: No message destinator').'\n';
} if (isset($_POST['message_content'])) {
$message_content = $_POST['message_content'];
} else {
$_SESSION['error_msg'] .= "Error: No message content.\n";
$_SESSION['error_msg'] .= _('Error: No message content').'\n';
}
if (isset($_SESSION['error_msg']) and $_SESSION['error_msg'] != "") {

View File

@ -4,6 +4,8 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/$lang/lang.php");
?>
<!DOCTYPE html>
<html lang="en">
@ -24,7 +26,7 @@ include("$root/analytics/matomo.php");
<section>
<h2>GUANO v1.0</h2>
<?=isset($_SESSION['error_msg']) and $_SESSION['error_msg'] != "" ? '<div class="error">'.$_SESSION['error_msg'].'</div>' : "";?>
<a href="/articles">about GUANO</a>
<a href="/articles"><?=_('about GUANO')?></a>
<article id="guano">
<?php
require "$root/database/credentials.php";
@ -50,7 +52,7 @@ if (isset($_GET['record'])) {
if ($data = $req->fetch()) {
} else {
$_SESSION['error_msg'] = "Can't fetch data.";
$_SESSION['error_msg'] = _("Can't fetch data.");
}
?>
GUANO|Version: 1.0<br><br>

View File

@ -4,6 +4,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
<html lang="en">
@ -11,7 +12,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -22,7 +23,7 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Explore</h2>
<h2><?=_('Explore')?></h2>
<div class="explore wrapper">
<div class="list">
<a href="/explore/list"><img src="/media/icons/list.png" alt="list"></a>

View File

@ -4,6 +4,7 @@ ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -25,7 +26,7 @@ $result = $req->fetchAll();
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
@ -37,17 +38,17 @@ include("$root/analytics/owa.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Explore</h2>
<h3>Recording List</h3>
<h2><?=_('Explore')?></h2>
<h3><?=_('Recording List')?></h3>
<table id="list">
<thead>
<tr>
<th>Datetime</th>
<th>Species</th>
<th>File Name</th>
<th>Author</th>
<th>License</th>
<th>Audio</th>
<th><?=_('Datetime')?></th>
<th><?=_('Species')?></th>
<th><?=_('File Name')?></th>
<th><?=_('Author')?></th>
<th><?=_('License')?></th>
<th><?=_('Audio')?></th>
</tr>
</thead>
<tbody>
@ -68,9 +69,9 @@ include("$root/analytics/owa.php");
<td>
<a href="/explore/spectrograms/?record=<?=$row['id']?>"><?=$row['file_name']?></a>
<a href="/storage/records/<?=$row['file_name']?>" title="Download file"><i class="fa fa-download" aria-hidden="true"></i></a>
<a href="/larynx/?record=<?=$row['id']?>" title="Open with Larynx"><img src="/media/icons/wave.svg" alt="spectro analysis"></a>
<a href="/explore/guano?record=<?=$row['id']?>" title="See GUANO metadata"><img src="/media/icons/data.png" alt="database search"></a>
<a href="/explore/record/edit/?id=<?=$row['id']?>" title="Edit record metadata"><i class="fa fa-edit " ></i></a>
<a href="/larynx/?record=<?=$row['id']?>" title="<?=_('Open with Larynx')?>"><img src="/media/icons/wave.svg" alt="spectro analysis"></a>
<a href="/explore/guano?record=<?=$row['id']?>" title="<?=_('See GUANO metadata')?>"><img src="/media/icons/data.png" alt="database search"></a>
<a href="/explore/record/edit/?id=<?=$row['id']?>" title="<?=_('Edit record metadata')?>"><i class="fa fa-edit " ></i></a>
</td>
<td><?=$username?></td>
<td><?=$row['license']?></td>

View File

@ -5,6 +5,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -26,7 +27,7 @@ $result = $req->fetchAll();
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""/>
@ -44,8 +45,8 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Explore</h3>
<h4>Record Map</h4>
<h><?=_('Explore')?></h3>
<h4><?=_('Record Map')?></h4>
<div id="map"></div>
</section>
<?php include("$root/footer.php");?>

View File

@ -4,6 +4,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -37,7 +38,7 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Mystery recording</h3>
<h3><?=_('Mystery recording')?></h3>
<?php
foreach ($result as $row)
{
@ -45,7 +46,7 @@ foreach ($result as $row)
<div class="sound">
<h3><?=$row['file_name']?></h3>
<h4><em><?=$row['species']?></em></h4>
<p>Recorded on <?=$row['date']?> at <?=$row['time']?></p>
<p><?=_('Recorded on ')?><?=$row['date']?> <?=_('at')?> <?=$row['time']?></p>
<?php
if (file_exists($root."/storage/spectrograms/".$row['file_name'].'.png'))
{

View File

@ -5,6 +5,8 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/$lang/lang.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -28,7 +30,7 @@ if ($data = $req->fetch())
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -38,16 +40,16 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Explore</h3>
<h4>Random Record</h4>
<h3><?=_('Explore')?></h3>
<h4><?=_('Random Record')?></h4>
<table>
<thead>
<tr>
<th>Species</th>
<th>File Name</th>
<th>Author</th>
<th>License</th>
<th>Audio</th>
<th><?=_('Species')?></th>
<th><?=_('File name')?></th>
<th><?=_('Author')?></th>
<th><?=_('License')?></th>
<th><?=_('Audio')?></th>
</tr>
</thead>
<tbody>
@ -60,7 +62,7 @@ include("$root/analytics/matomo.php");
</tr>
</tbody>
</table>
<p>Click on the file name to go to the spectrogram view.</p>
<p><?=_('Click on the file name to go to the spectrogram view.')?></p>
</section>
<?php include("$root/footer.php");?>
</body>

View File

@ -5,6 +5,8 @@ error_reporting(E_ALL);
session_start();
session_reset();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/$lang/lang.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -24,7 +26,7 @@ if (isset($_GET['id'])){
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit | Chiro - Canto</title>
<title><?=_('Edit')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
@ -36,7 +38,7 @@ if (isset($_GET['id'])){
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Edit</h2>
<h2><?=_('Edit')?></h2>
<?php
$req = $db->prepare('SELECT * FROM records WHERE id=:id');
$req->execute(array(
@ -46,32 +48,32 @@ if (isset($_GET['id'])){
?>
<form action="update.php" method="post">
<label for="file_name">File Name*</label>
<label for="file_name"><?=_('File Name')?>*</label>
<input type="text" id="file_name"value="<?=$data['file_name']?>" readonly>
<label for="coordinates">Coordinates*</label>
<label for="coordinates"><?=_('Coordinates')?>*</label>
<input type="text" id="coordinates" value="<?=$data['lat']?>, <?=$data['lng']?>" readonly>
<label for="date">Date*</label>
<label for="date"><?=_('Date')?>*</label>
<input type="date" name="date" id="date" value="<?=$data['date']?>">
<label for="time">Time*</label>
<label for="time"><?=_('Time')?>*</label>
<input type="time" name="time" id="time" value="<?=$data['time']?>">
<label for="recordist-name">Recordist Name*</label>
<label for="recordist-name"><?=_('Recordist Name')?>*</label>
<input type="text" name="recordist-name" id="recordist-name" value="<?=$data['recordist_name']?>" required>
<label for="species">Species*</label>
<label for="species"><?=_('Species')?>*</label>
<input type="text" name="species" id="species" value="<?=$data['species']?>">
<label for="subpsecies">Subspecies</label>
<input type="text" name="subpseices" id="subspecies" value="<?=$data['subspecies']?>">
<label for="subpsecies"><?=_('Subspecies')?></label>
<input type="text" name="subspecies" id="subspecies" value="<?=$data['subspecies']?>">
<label for="make">Recorder Manufacturer</label>
<label for="make"><?=_('Recorder Manufacturer')?></label>
<input type="text" name="make" id="make" value="<?=$data['make']?>">
<label for="model">Recorder Model</label>
<label for="model"><?=_('Recorder Model')?></label>
<input type="text" name="model" id="model" value="<?=$data['model']?>">
<label for="serial">Recorder Serial Number</label>
<label for="serial"><?=_('Recorder Serial Number')?></label>
<input type="text" name="serial" id="serial" value="<?=$data['serial']?>">
</form>
<?php
} else {
$_SESSION['error_msg'] = "Can't fetch information on record with id '".$_GET['id']."'.";
$_SESSION['error_msg'] = _("Can't fetch information on record with id") . "'".$_GET['id']."'";
}
echo $_SESSION['error_msg'];
?>

View File

@ -4,6 +4,8 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/$lang/lang.php");
?>
<!DOCTYPE html>
<html lang="en">
@ -11,7 +13,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -22,7 +24,7 @@ include("$root/analytics/owa.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Record</h3>
<h3><?=_('Record')?></h3>
<?php
require "$root/database/credentials.php";
// Connect the database
@ -50,7 +52,7 @@ include("$root/analytics/owa.php");
<div class="sound">
<h3><?=$data['file_name']?></h3>
<h4><em><?=$data['species']?></em></h4>
<p>Recorded on <?=$data['date']?> at <?=$data['time']?></p>
<p><?=_('Recorded on')?> <?=$data['date']?> <?=_('at')?> <?=$data['time']?></p>
<?php
if (file_exists($root."/storage/spectrograms/".$data['file_name'].'.png'))
{
@ -65,7 +67,7 @@ include("$root/analytics/owa.php");
</div>
<?php
} else {
echo "Can't find the record associated with this id, please try again.";
echo _("Can't find the record associated with this id, please try again.");
}?>
</section>
<?php include("$root/footer.php");?>

View File

@ -4,30 +4,16 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
// require "$root/database/credentials.php";
// // Connect the database
// try {
// $db = new PDO("mysql:host=$host;dbname=$database;charset=utf8",
// $user,
// $password,
// array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
// ));
// } catch (Exception $e) {
// die("Error : ".$e->getMessage());
// }
// $req = $db->prepare('SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` WHERE species="unknown" ORDER BY `entry_timestamp` ASC LIMIT 1');
// $req->execute();
// $result = $req->fetchAll();
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -38,20 +24,20 @@ include("$root/analytics/owa.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Explore</h3>
<h4>Multicriteria recordings Search</h4>
<h3><?=_('Explore')?></h3>
<h4><?=_('Multicriteria recordings Search')?></h4>
<form action="searchrecord.php" method="post">
<label for="species">Species name</label>
<label for="species"><?=_('Species name')?></label>
<input type="text" name="species" id="species">
<label for="subspecies">Subspecies name</label>
<label for="subspecies"><?=_('Subspecies name')?></label>
<input type="text" name="subspecies" id="subspecies">
<label for="recordist">Recordist name</label>
<label for="recordist"><?=_('Recordist name')?></label>
<input type="text" name="recordist" id="recordist">
<label for="date-after">After date</label>
<label for="date-after"><?=_('After date')?></label>
<input type="text" name="date-after" id="date-after" placeholder="YYYY-MM-DD">
<label for="date-before">Before date</label>
<label for="date-before"><?=_('Befora date')?></label>
<input type="text" name="date-before" id="date-before" placeholder="YYYY-MM-DD">
<label for="in-remarks">Keyword(s) in remarks (comma separated)</label>
<label for="in-remarks"><?=_('Keyword(s) in remarks (comma separated)')?></label>
<input type="text" name="keywords" id="in-remarks">
<input type="submit" name="submit" value="Search"><input type="reset">
</form>

View File

@ -5,6 +5,8 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/$lang/lang.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -97,7 +99,7 @@ if ($_SESSION['error_msg'] == "") {
}
}
} else {
$_SESSION['error_msg'] .= "You did not enter any query.\n";
$_SESSION['error_msg'] .= _("You did not enter any query.").'\n';
header("Location: /explore/search");
}
@ -112,15 +114,15 @@ if ($_SESSION['error_msg'] == "") {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<body>
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Explore</h3>
<h4>Search Results</h4>
<h3><?=_('Explore')?></h3>
<h4><?=_('Search results')?></h4>
<?php
// echo $sql;
$req = $db->prepare($sql);
@ -128,16 +130,16 @@ if ($_SESSION['error_msg'] == "") {
$result = $req->fetchAll();
// print_r($sql);
if (empty($result)) {
echo "No result for this query, please try again.\n";
echo _("No result for this query, please try again.").'\n';
} else {
?>
<table>
<thead>
<tr>
<th>File name</th>
<th>Author</th>
<th>License</th>
<th>Date</th>
<th><?=_('File name')?></th>
<th><?=_('Author')?></th>
<th><?=_('License')?></th>
<th><?=_('Datetime')?></th>
</tr>
</thead>
<tbody>

View File

@ -4,6 +4,8 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/$lang/lang.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -33,7 +35,7 @@ $data = $req->fetch();
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -44,13 +46,13 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Spectrograms</h3>
<h3><?=_('Spectrograms')?></h3>
<?php
?>
<div class="sound">
<h3><?=$data['file_name']?></h3>
<h4><em><?=$data['species']?></em></h4>
<p>Recorded on <?=$data['date']?> at <?=$data['time']?></p>
<p><?=_('Recorded on')?> <?=$data['date']?> at <?=$data['time']?></p>
<?php
if (file_exists($root."/storage/spectrograms/".$data['file_name'].'.png'))
{

View File

@ -4,6 +4,8 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/gettext.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -26,7 +28,7 @@ $result = $req->fetchAll();
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -36,20 +38,20 @@ include("$root/analytics/matomo.php");
<body>
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<h3>Chiroptera Taxa</h3>
<p>These taxa come from INPN TAXREF v14.0.</p>
<h3><?=_('Taxa')?></h3>
<p><?=_('These taxa come from INPN TAXREF v14.0.')?></p>
<table>
<thead>
<tr>
<th>Kingdom</th>
<th>Phylum</th>
<th>Class</th>
<th>Order</th>
<th>Family</th>
<th>Subfamily</th>
<th>Tribu</th>
<th>Genus</th>
<th>Species</th>
<th><?=_('Kingdom')?></th>
<th><?=_('Phylum')?></th>
<th><?=_('Class')?></th>
<th><?=_('Order')?></th>
<th><?=_('Family')?></th>
<th><?=_('Subfamily')?></th>
<th><?=_('Tribu')?></th>
<th><?=_('Genus')?></th>
<th><?=_('Species')?></th>
</tr>
</thead>
<tbody>

View File

@ -5,6 +5,7 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
require "$root/database/credentials.php";
// Connect the database
try {
@ -27,7 +28,7 @@ $result = $req->fetchAll();
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -38,14 +39,14 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Explore</h3>
<h4>Random Record</h4>
<h3><?=_('Explore')?></h3>
<h4><?=_('Users')?></h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Username</th>
<th>Private message link</th>
<th><?=_('Name')?></th>
<th><?=_('Username')?></th>
<th><?=_('Private message link')?></th>
</tr>
</thead>
<tbody>

View File

@ -22,12 +22,12 @@ $rows = $req->fetchAll(PDO::FETCH_ASSOC);
$Parsedown = new Parsedown();
?>
<h3>Categories</h3>
<h3><?=_('Categories')?></h3>
<table id="categories">
<thead>
<tr>
<th scope="col">Title</th>
<th scope="col">Description</th>
<th scope="col"><?=_('Title')?></th>
<th scope="col"><?=_('Description')?></th>
</tr>
</thead>
<tbody>
@ -43,11 +43,11 @@ foreach ($rows as $row) {
}
?> </tbody>
</table>
<h3>Create a category</h3>
<h3><?=_("Create a category")?></h3>
<form action="createcategory.php" method="post">
<label for="title">Category title</label>
<input type="text" id="title" name="title" placeholder="Enter a name for the new category.." required>
<label for="description">Category description</label>
<textarea name="description" id="description" cols="30" rows="5" placeholder="Enter a description for the new category (support Markdown).." required></textarea>
<input type="submit" value="submit" name="submit"><input type="reset" value="reset">
<label for="title"><?=_('Category title')?></label>
<input type="text" id="title" name="title" placeholder="<?=_('Enter a name for the new category..')?>" required>
<label for="description"><?=_('Category description')?></label>
<textarea name="description" id="description" cols="30" rows="5" placeholder="<?=_('Enter a description for the new category (support Markdown)..')?>" required></textarea>
<input type="submit" value="<?=_('submit')?>" name="submit"><input type="reset" value="<?=_('reset')?>">
</form>

View File

@ -34,17 +34,17 @@ if (isset($_POST['submit']))
$name = $_POST['title'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper category title. \n";
$_SESSION['error_msg'] .= _("You did not enter a proper category title.") . '\n';
}
if (isset($_POST['description']))
{
$description = $_POST['description'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper category description. \n";
$_SESSION['error_msg'] .= _("You did not enter a proper category description.") . '\n';
}
} else {
$_SESSION['error_msg'] .= "You did not log in.\n";
$_SESSION['error_msg'] .= _("You did not log in.") . '\n';
header('Location: '."/auth/login/");
}
} else

View File

@ -56,22 +56,22 @@ if (isset($_POST['submit']))
$topic_subject = $_POST['topic_subject'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper topic subject. \n";
$_SESSION['error_msg'] .= _("You did not enter a proper topic subject.") . '\n';
}
if (isset($_POST['category']))
{
$id_cat = $_POST['category'];
} else
{
$_SESSION['error_msg'] .= "You did not enter a proper topic category. \n";
$_SESSION['error_msg'] .= _("You did not enter a proper topic category.") . '\n';
}
} else {
$_SESSION['error_msg'] .= "You did not log in.\n";
$_SESSION['error_msg'] .= _("You did not log in.") . '\n';
header('Location: '."/auth/login/");
}
} else
{
$_SESSION['error_msg'] .= "You did not sumit the category creation form.\n";
$_SESSION['error_msg'] .= _("You did not sumit the category creation form.") . '\n';
}
if ($_SESSION['error_msg'] == "")

View File

@ -4,7 +4,7 @@ ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
@ -13,7 +13,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forum | Chiro - Canto</title>
<title><?=_('Forum')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -24,7 +24,7 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Forum</h2>
<h2><?=_('Forum')?></h2>
<?php include("categories.php");?>
</section>
<?php include("$root/footer.php");?>

View File

@ -33,21 +33,21 @@ if ($data = $req->fetch())
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chiro - Canto</title>
<title><?=_('Forum')?> Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<body>
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Forum</h2>
<h3>Create a new topic <?=isset($cat_name) ? "in ".$cat_name : ""?></h3>
<h2><?=_('Forum')?></h2>
<h3><?=_('Create a new topic')?> <?=isset($cat_name) ? "in ".$cat_name : ""?></h3>
<form action="createtopic.php" method="post">
<label for="topic">Topic subject</label>
<input type="text" name="topic_subject" id="topic" placeholder="Enter a topic subject.." required>
<label for="category">Topic category</label>
<label for="topic"><?=_('Topic subject')?></label>
<input type="text" name="topic_subject" id="topic" placeholder="<?=_('Enter a topic subject..')?>" required>
<label for="category"><?=_('Topic category')?></label>
<input type="number" id="category" name="category" value="<?=$_GET['cat']?>" required>
<input type="submit" value="submit" name="submit"><input type="reset" value="reset">
<input type="submit" value="submit" name="<?=_('submit')?>"><input type="reset" value="<?=_('reset')?>">
</form>
</section>
<?php include("$root/footer.php");?>

View File

@ -4,7 +4,8 @@ ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/$lang/lang.php");
?>
<!DOCTYPE html>
@ -13,7 +14,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forum | Chiro - Canto</title>
<title><?=_('Forum')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -24,7 +25,7 @@ include("$root/analytics/owa.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Forum</h2>
<h2><?=_('Forum')?></h2>
<?php include("topics.php");?>
</section>
<?php include("$root/footer.php");?>

View File

@ -43,22 +43,22 @@ if (isset($_POST['submit']))
$topic_id = $_POST['topic_id'];
} else
{
$_SESSION['error_msg'] .= "You did not enter your reply. \n";
$_SESSION['error_msg'] .= _("You did not enter your reply.") .'\n';
}
if (isset($_POST['reply']) and $_POST['reply'] != "")
{
$reply_content = $_POST['reply'];
} else
{
$_SESSION['error_msg'] .= "You did not enter your reply. \n";
$_SESSION['error_msg'] .= _("You did not enter your reply.") .'\n';
}
} else {
$_SESSION['error_msg'] .= "You did not log in.\n";
$_SESSION['error_msg'] .= _("You did not log in.") .'\n';
header('Location: '."/auth/login/");
}
} else
{
$_SESSION['error_msg'] .= "You did not sumit the reply form.\n";
$_SESSION['error_msg'] .= _("You did not sumit the reply form.") .'\n';
}
if ($_SESSION['error_msg'] == "")

View File

@ -40,9 +40,9 @@ if (isset($_GET['topic'])){
<table id="replies">
<thead>
<tr>
<th scope="col">Author</th>
<th scope="col">Reply</th>
<th scope="col">Date</th>
<th scope="col"><?=_('Author')?></th>
<th scope="col"><?=_('Reply')?></th>
<th scope="col"><?=_('Date')?></th>
</tr>
</thead>
<tbody>
@ -71,7 +71,7 @@ if (isset($_GET['topic'])){
</tbody>
</table>
<br>
<h2>Your Reply</h2>
<h2><?=_('Your Reply')?></h2>
<!--
<div class="container column">
<div class="container items row">
@ -90,27 +90,20 @@ if (isset($_GET['topic'])){
</div> -->
<form action="sendreply.php" method="post">
<input type="hidden" name="topic_id" value="<?=$topic_id?>">
<textarea name="reply" id="reply" cols="30" rows="10" placeholder="Enter your reply (support Markdown).."></textarea>
<textarea name="reply" id="reply" cols="30" rows="10" placeholder="<?=_('Enter your reply (support Markdown)..')?>"></textarea>
<script>
var easyMDE = new EasyMDE({showIcons: ['strikethrough', 'code', 'table', 'redo', 'heading', 'undo', 'heading-bigger', 'heading-smaller', 'heading-1', 'heading-2', 'heading-3', 'clean-block', 'horizontal-rule']});
</script>
<input type="submit" name="submit" value="submit">
<input type="reset" name="reset" value="reset">
</form>
<form id="url-form">
<label for="url-input">URL</label>
<input type="url" id="url-input" name="url" placeholder="https://example.com">
<label for="text">Description (optional)</label>
<input type="text" name="url-description" id="url-description">
<input type="button" name="submit" value="Ok" id="submit-url">
</form>
<script src="scripts/editor.js"></script>
<?php
} catch (Exception $e)
{
die("Error : ".$e->getMessage());
echo "Can't fetch topic data.\n";
echo _("Can't fetch topic data.") .'\n';
}
}
else {
@ -124,10 +117,10 @@ else {
<table id="categories">
<thead>
<tr>
<th scope="col">Subjects</th>
<th scope="col">Answers</th>
<th scope="col">Author</th>
<th scope="col">Creation date</th>
<th scope="col"><?=_('Subjects')?></th>
<th scope="col"><?=_('Answers')?></th>
<th scope="col"><?=_('Author')?></th>
<th scope="col"><?=_('Creation date')?></th>
</tr>
</thead>
<tbody>
@ -144,10 +137,18 @@ else {
$firstname = $data['firstname'];
$lastname = $data['lastname'];
}
$req = $db->prepare('SELECT COUNT(*) AS counter FROM replies WHERE reply_topic=:reply_topic');
$req->execute(array(
"reply_topic"=>$row['id']
));
if ($data = $req->fetch()) {
$n_messages = $data['counter'];
}
?>
<tr>
<td><a href="<?="?topic=".$row['id']?>"><?=$row['topic_subject']?></a></td>
<td><?="To be completed"?></td>
<td><?=isset($n_messages) ? $n_messages : _("No reply")?></td>
<td><?="$firstname $lastname ($username)"?></td>
<td><?=$row['topic_date']?></td>
</tr>

View File

@ -29,6 +29,6 @@ $result = $req->fetchAll();
}
?>
</ul>
<a href="?option=upload">Upload Image</a>
<a href="?option=upload"><?=_('Upload Image')?></a>
<script src="scripts/gallery.js"></script>
<?php

View File

@ -4,6 +4,8 @@ ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : 'en';
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
<html lang="en">
@ -11,7 +13,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gallery | Chiro - Canto</title>
<title><?=_('Gallery')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -22,7 +24,7 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Gallery</h2>
<h2><?=_('Gallery')?></h2>
<?=$_SESSION['error_msg']?>
<?=isset($_SESSION['error_msg']) and $_SESSION['error_msg'] != "" ? '<div class="error">'.$_SESSION['error_msg'].'</div>' : ""?>
<?php

View File

@ -6,11 +6,11 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
function form() {
?>
<form action="upload.php" method="post" enctype="multipart/form-data">
<label for="file">Image*</label><br>
<label for="file"><?=_('Image')?>*</label><br>
<input type="file" name="file" value="file" required><br>
<label for="species">Species</label>
<input type="text" name="species" id="species">
<input type="submit" name="submit" value="submit">
<input type="submit" name="submit" value="<?=_('submit')?>">
</form>
<?php
}
@ -39,7 +39,7 @@ function db_entry($species, $filename) {
$author_id = $data['id'];
}
} else {
$_SESSION['error_msg'] .= "You need to be logged in to upload images.";
$_SESSION['error_msg'] .= _("You need to be logged in to upload images.");
header("Location: /auth/login");
}
$req = $db->prepare('INSERT INTO images (species, file_name, author_id, entry_date) VALUES (:species, :file_name, :author_id, now())');
@ -63,10 +63,10 @@ if(isset($_POST['submit'])){
db_entry(isset($_POST['species']) ? $_POST['species'] : "", $name);
header('Location: /gallery');
} else {
echo "Can't move your file.";
echo _("Can't move your file.");
}
} else {
$_SESSION['error_msg'] .= 'You should select a file to upload !!';
$_SESSION['error_msg'] .= _('You should select a file to upload !');
}
} else {
form();

View File

@ -3,7 +3,7 @@
<div class="container column">
<a href="/">
<h1>Chiro - Canto</h1>
<h2>Bat sound sharing tools</h2>
<h2><?=_('To share bat sounds all over the world');?></h2>
</a>
</div>
</div>

View File

@ -21,7 +21,7 @@ if ($data = $req->fetch())
<div class="sound">
<h3><?=$data['file_name']?></h3>
<h4><em><?=$data['species']?></em></h4>
<p>Recorded on <?=$data['date']?> at <?=$data['time']?></p>
<p><?=_('Recorded on')?> <?=$data['date']?> at <?=$data['time']?></p>
<?php
if (file_exists($root."/storage/spectrograms/".$data['file_name'].'.png'))
{
@ -36,6 +36,6 @@ if ($data = $req->fetch())
</div>
<?php
} else {
echo "Error fetch.";
echo _("Error fetch.");
}
?>

View File

@ -32,9 +32,9 @@ if ($data = $req->fetch()) {
}
?>
<div id="status">
<?=$record_counter?> Records Uploaded<br>
<?=$user_counter?> Users Registered<br>
<?=$taxa_counter?> Taxa Available<br>
<?=$record_counter?> <?=_('records_uploaded')?><br>
<?=$user_counter?> <?=_('users_registered')?><br>
<?=$taxa_counter?> <?=_('taxa_available')?><br>
<?php
$bytes = disk_free_space("$root/storage/records");
@ -42,6 +42,6 @@ if ($data = $req->fetch()) {
$si_prefix = array( 'B', 'KB', 'MB', 'GB', 'TB', 'EB', 'ZB', 'YB' );
$base = 1024;
$class = min((int)log($bytes , $base) , count($si_prefix) - 1);
echo sprintf('%1.2f', $bytes / pow($base,$class)).' '.$si_prefix[$class];?> of Free space <br>
echo sprintf('%1.2f', $bytes / pow($base,$class)).' '.$si_prefix[$class];?> <?=_('free_space')?> <br>
<progress id="space" max="<?=$total?>" value="<?=$total-$bytes?>"> <?=$bytes?> </progress>
</div>

View File

@ -4,6 +4,7 @@ ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
?>
@ -25,9 +26,9 @@ include("$root/analytics/matomo.php");
<?php include("header.php");?>
<img class="banner" src="/media/pictures/spectro_eptser.png" alt="Eptesicus serotinus spectrogram (Audacity)">
<section>
<h2>Last uploaded sound</h2>
<h2><?=_("Last uploaded sound")?></h2>
<?php include("$root/home/last-uploaded-file.php"); ?>
<h2>Stats</h2>
<h2><?=_("Stats")?></h2>
<?php include("$root/home/status.php"); ?>
</section>
<?php include("footer.php");?>

33
public/lang/en/lang.php Normal file
View File

@ -0,0 +1,33 @@
<?php
$lang = array();
$lang['header-description'] = "To share bat sounds all over the world";
$lang['menu'] = array();
$lang['menu']['about'] = 'about';
$lang['menu']['contact'] = 'contact';
$lang['menu']['explore'] = 'explore';
$lang['menu']['list'] = 'list';
$lang['menu']['map'] = 'map';
$lang['menu']['mysteries'] = 'mysteries';
$lang['menu']['random'] = 'random';
$lang['menu']['search'] = 'search';
$lang['menu']['spectrograms'] = 'spectrograms';
$lang['menu']['taxa'] = 'taxa';
$lang['menu']['guano'] = 'guano';
$lang['menu']['users'] = 'users';
$lang['menu']['upload'] = 'upload';
$lang['menu']['larynx'] = 'larynx';
$lang['menu']['forum'] = 'forum';
$lang['menu']['messages'] = 'chat';
$lang['menu']['articles'] = 'articles';
$lang['welcome'] = "Welcome";
$lang['last_uploaded_sound'] = "Last uploaded sound";
$lang['recorded_on'] = "Recorded on";
$lang['stats'] = "Stats";
$lang['records_uploaded'] = "uploaded records";
$lang['users_registered'] = "users registered";
$lang['taxa_available'] = "available taxa";
$lang['free_space'] = "of free space";

40
public/lang/gettext.php Normal file
View File

@ -0,0 +1,40 @@
<?php
// print_r($_COOKIE);
$lang = isset($_COOKIE['language']) ? $_COOKIE['language'] : (isset($_SESSION['language']) ? $_SESSION['language'] : "en_US");
$results = putenv('LC_ALL='.$lang);
// echo $lang;
if (!$results) {
echo "putenv failed";
}
// putenv('LANG='.$lang);
$results = setlocale(LC_ALL, $lang);
if (!$results) {
echo "setlocale failed";
}
// Spécifie la localisation des tables de traduction
$results = bindtextdomain('default', "$root/lang/locale");
if (!$results) {
echo "bindtextdomain failed";
}
// Choisit le domaine
$results = textdomain('default');
if (!$results) {
echo "textdomain failed";
}
$results = bind_textdomain_codeset('default', 'UTF-8');
if (!$results) {
echo "bind_textdomain_codeset failed";
}
// // La traduction est cherché dans ./locale/de_DE/LC_MESSAGES/myPHPApp.mo
// // Affichage d'un message de test
// echo gettext("Bienvenue dans mon application PHP");
// // Or use the alias _() for gettext()
// echo _("Passer une bonne journée");
?>

View File

@ -0,0 +1,977 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-20 12:45+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: public/index.php:29
msgid "Last uploaded sound"
msgstr ""
#: public/index.php:31
msgid "Stats"
msgstr ""
#: public/menu.php:5
msgid "about"
msgstr ""
#: public/menu.php:8
msgid "contact"
msgstr ""
#: public/menu.php:13
msgid "explore"
msgstr ""
#: public/menu.php:17
msgid "list"
msgstr ""
#: public/menu.php:19
msgid "map"
msgstr ""
#: public/menu.php:21 public/menu.php:59
msgid "mysteries"
msgstr ""
#: public/menu.php:24
msgid "random"
msgstr ""
#: public/menu.php:26
msgid "search"
msgstr ""
#: public/menu.php:28
msgid "spectrograms"
msgstr ""
#: public/menu.php:31
msgid "taxa"
msgstr ""
#: public/menu.php:33
msgid "guano"
msgstr ""
#: public/menu.php:36
msgid "users"
msgstr ""
#: public/menu.php:43
msgid "upload"
msgstr ""
#: public/menu.php:46
msgid "larynx"
msgstr ""
#: public/menu.php:52
msgid "forum"
msgstr ""
#: public/menu.php:55
msgid "messages"
msgstr ""
#: public/menu.php:62
msgid "articles"
msgstr ""
#: public/menu.php:66
msgid "Welcome"
msgstr ""
#: public/header.php:6
msgid "To share bat sounds all over the world"
msgstr ""
#: public/forum/index.php:16 public/forum/index.php:27
#: public/forum/newtopic.php:36 public/forum/newtopic.php:43
#: public/forum/topics/index.php:17 public/forum/topics/index.php:28
msgid "Forum"
msgstr ""
#: public/forum/categories.php:25
msgid "Categories"
msgstr ""
#: public/forum/categories.php:29
msgid "Title"
msgstr ""
#: public/forum/categories.php:30
msgid "Description"
msgstr ""
#: public/forum/categories.php:46
msgid "Create a category"
msgstr ""
#: public/forum/categories.php:48
msgid "Category title"
msgstr ""
#: public/forum/categories.php:49
msgid "Enter a name for the new category.."
msgstr ""
#: public/forum/categories.php:50
msgid "Category description"
msgstr ""
#: public/forum/categories.php:51
msgid "Enter a description for the new category (support Markdown).."
msgstr ""
#: public/forum/categories.php:52 public/forum/newtopic.php:50
#: public/upload/location.php:13 public/upload/upload.php:73
#: public/gallery/upload.php:13 public/auth/login/index.php:34
#: public/auth/register/index.php:43 public/contact/index.php:43
msgid "submit"
msgstr ""
#: public/forum/categories.php:52 public/forum/newtopic.php:50
#: public/upload/upload.php:74 public/auth/login/index.php:34
#: public/auth/register/index.php:43 public/contact/index.php:43
msgid "reset"
msgstr ""
#: public/forum/createcategory.php:37
msgid "You did not enter a proper category title."
msgstr ""
#: public/forum/createcategory.php:44
msgid "You did not enter a proper category description."
msgstr ""
#: public/forum/createcategory.php:47 public/forum/createtopic.php:69
#: public/forum/topics/sendreply.php:56
msgid "You did not log in."
msgstr ""
#: public/forum/newtopic.php:44
msgid "Create a new topic"
msgstr ""
#: public/forum/newtopic.php:46
msgid "Topic subject"
msgstr ""
#: public/forum/newtopic.php:47
msgid "Enter a topic subject.."
msgstr ""
#: public/forum/newtopic.php:48
msgid "Topic category"
msgstr ""
#: public/forum/createtopic.php:59
msgid "You did not enter a proper topic subject."
msgstr ""
#: public/forum/createtopic.php:66
msgid "You did not enter a proper topic category."
msgstr ""
#: public/forum/createtopic.php:74
msgid "You did not sumit the category creation form."
msgstr ""
#: public/forum/topics/topics.php:43 public/forum/topics/topics.php:122
#: public/explore/search/searchrecord.php:140
#: public/explore/random/index.php:50 public/explore/list/index.php:49
#: public/about/index.php:29 public/search/index.php:90
msgid "Author"
msgstr ""
#: public/forum/topics/topics.php:44
msgid "Reply"
msgstr ""
#: public/forum/topics/topics.php:45 public/explore/record/edit/index.php:55
#: public/search/index.php:92
msgid "Date"
msgstr ""
#: public/forum/topics/topics.php:74
msgid "Your Reply"
msgstr ""
#: public/forum/topics/topics.php:93
msgid "Enter your reply (support Markdown).."
msgstr ""
#: public/forum/topics/topics.php:106
msgid "Can't fetch topic data."
msgstr ""
#: public/forum/topics/topics.php:120
msgid "Subjects"
msgstr ""
#: public/forum/topics/topics.php:121
msgid "Answers"
msgstr ""
#: public/forum/topics/topics.php:123
msgid "Creation date"
msgstr ""
#: public/forum/topics/topics.php:151
msgid "No reply"
msgstr ""
#: public/forum/topics/sendreply.php:46 public/forum/topics/sendreply.php:53
msgid "You did not enter your reply."
msgstr ""
#: public/forum/topics/sendreply.php:61
msgid "You did not sumit the reply form."
msgstr ""
#: public/upload/index.php:26
msgid "Upload"
msgstr ""
#: public/upload/index.php:37
msgid "Upload Your Recording"
msgstr ""
#: public/upload/location.php:2
msgid "Location"
msgstr ""
#: public/upload/location.php:3
msgid "Metadata"
msgstr ""
#: public/upload/location.php:4
msgid "Verify"
msgstr ""
#: public/upload/location.php:10 public/upload/upload.php:10
#: public/explore/record/edit/index.php:53
msgid "Coordinates"
msgstr ""
#: public/upload/upload.php:8
msgid "File"
msgstr ""
#: public/upload/upload.php:8
msgid "Audio File must be in wav format."
msgstr ""
#: public/upload/upload.php:12 public/explore/random/index.php:48
#: public/explore/taxa/index.php:54 public/explore/list/index.php:47
#: public/explore/record/edit/index.php:61
msgid "Species"
msgstr ""
#: public/upload/upload.php:14
msgid "Species identified"
msgstr ""
#: public/upload/upload.php:15
msgid "Enter a species.."
msgstr ""
#: public/upload/upload.php:19
msgid "Identity unknown"
msgstr ""
#: public/upload/upload.php:21 public/explore/record/edit/index.php:63
msgid "Subspecies"
msgstr ""
#: public/upload/upload.php:22
msgid "Enter a subspecies name.."
msgstr ""
#: public/upload/upload.php:23 public/explore/search/searchrecord.php:141
#: public/explore/random/index.php:51 public/explore/list/index.php:50
#: public/search/index.php:91
msgid "License"
msgstr ""
#: public/upload/upload.php:32 public/explore/record/edit/index.php:59
msgid "Recordist Name"
msgstr ""
#: public/upload/upload.php:33
msgid "Enter your name.."
msgstr ""
#: public/upload/upload.php:34
msgid "Country"
msgstr ""
#: public/upload/upload.php:37
msgid "Recording Date"
msgstr ""
#: public/upload/upload.php:39
msgid "Recording Time"
msgstr ""
#: public/upload/upload.php:41
msgid "Optional Metadata"
msgstr ""
#: public/upload/upload.php:43
msgid "Sound Types"
msgstr ""
#: public/upload/upload.php:45
msgid "uncertain"
msgstr ""
#: public/upload/upload.php:46
msgid "echolocation"
msgstr ""
#: public/upload/upload.php:47
msgid "buzz"
msgstr ""
#: public/upload/upload.php:48
msgid "social cry"
msgstr ""
#: public/upload/upload.php:49
msgid "song"
msgstr ""
#: public/upload/upload.php:51
msgid "Quality"
msgstr ""
#: public/upload/upload.php:53
msgid "Unrated"
msgstr ""
#: public/upload/upload.php:54
msgid "Loud and Clear"
msgstr ""
#: public/upload/upload.php:55
msgid ""
"Clear, but bat a bit distant, or some interference with other sound sources"
msgstr ""
#: public/upload/upload.php:56
msgid "Moderately clear, or quite some interference"
msgstr ""
#: public/upload/upload.php:57
msgid "Faint recording, or much interference"
msgstr ""
#: public/upload/upload.php:58
msgid "Barely audible"
msgstr ""
#: public/upload/upload.php:60
msgid "Remarks"
msgstr ""
#: public/upload/upload.php:62
msgid "Recorder manufacturer"
msgstr ""
#: public/upload/upload.php:64
msgid "Recorder model"
msgstr ""
#: public/upload/upload.php:66 public/explore/record/edit/index.php:70
msgid "Recorder Serial Number"
msgstr ""
#: public/upload/upload.php:68
msgid "Samplerate"
msgstr ""
#: public/upload/upload.php:70
msgid "Time Expansion Factor"
msgstr ""
#: public/upload/submit.php:113
msgid "This file extension is not allowed; please upload a WAV file."
msgstr ""
#: public/upload/submit.php:117
msgid "The file size must be below 10MB."
msgstr ""
#: public/upload/submit.php:122
msgid "The file "
msgstr ""
#: public/upload/submit.php:122
msgid "has been uploaded."
msgstr ""
#: public/upload/submit.php:124
msgid "Sorry, there was an error uploading your file"
msgstr ""
#: public/upload/submit.php:134
msgid "Incorrect coordinates, please try again."
msgstr ""
#: public/upload/submit.php:149
msgid "Error, incorrect species name."
msgstr ""
#: public/upload/submit.php:167
msgid "Incorrect license"
msgstr ""
#: public/upload/submit.php:174
msgid "Incorrect Recordist Name."
msgstr ""
#: public/upload/submit.php:181
msgid "Incorrect Country. "
msgstr ""
#: public/upload/submit.php:188
msgid "Incorrect date."
msgstr ""
#: public/upload/submit.php:195
msgid "Incorrect time."
msgstr ""
#: public/upload/submit.php:202
msgid "Incorrect sound type."
msgstr ""
#: public/upload/submit.php:209
msgid "Incorrect quality value."
msgstr ""
#: public/upload/submit.php:237
msgid "Form not submitted."
msgstr ""
#: public/gallery/index.php:16 public/gallery/index.php:27
msgid "Gallery"
msgstr ""
#: public/gallery/upload.php:9
msgid "Image"
msgstr ""
#: public/gallery/upload.php:42
msgid "You need to be logged in to upload images."
msgstr ""
#: public/gallery/upload.php:66
msgid "Can't move your file."
msgstr ""
#: public/gallery/upload.php:69
msgid "You should select a file to upload !"
msgstr ""
#: public/gallery/gallery.php:32
msgid "Upload Image"
msgstr ""
#: public/auth/login/index.php:16 public/auth/login/index.php:27
msgid "Login"
msgstr ""
#: public/auth/login/index.php:30 public/auth/register/index.php:35
#: public/explore/users/index.php:48
msgid "Username"
msgstr ""
#: public/auth/login/index.php:31
msgid "Enter your username.."
msgstr ""
#: public/auth/login/index.php:33
msgid "Enter your password.."
msgstr ""
#: public/auth/login/index.php:36
msgid "Not yet registered ?"
msgstr ""
#: public/auth/login/login.php:49 public/auth/register/register.php:55
msgid "You did not enter a proper username."
msgstr ""
#: public/auth/login/login.php:54 public/auth/register/register.php:68
msgid "You did not enter a proper password."
msgstr ""
#: public/auth/login/login.php:58 public/auth/register/register.php:72
msgid "You did not submit the register form."
msgstr ""
#: public/auth/login/login.php:70
msgid "Incorrect password, please try again."
msgstr ""
#: public/auth/register/index.php:17 public/auth/register/index.php:28
msgid "Register"
msgstr ""
#: public/auth/register/index.php:31 public/contact/index.php:25
msgid "First Name"
msgstr ""
#: public/auth/register/index.php:33 public/contact/index.php:28
msgid "Last Name"
msgstr ""
#: public/auth/register/index.php:37
msgid "Password"
msgstr ""
#: public/auth/register/index.php:39
msgid "Your email"
msgstr ""
#: public/auth/register/index.php:41
msgid "Your website (optional)"
msgstr ""
#: public/auth/register/index.php:45
msgid "Already registered ?"
msgstr ""
#: public/auth/register/register.php:41
msgid "You did not enter a proper first name."
msgstr ""
#: public/auth/register/register.php:48
msgid "You did not enter a proper last name."
msgstr ""
#: public/auth/register/register.php:62
msgid "You did not enter a proper email address."
msgstr ""
#: public/home/last-uploaded-file.php:39
msgid "Error fetch."
msgstr ""
#: public/home/status.php:35
msgid "records_uploaded"
msgstr ""
#: public/home/status.php:36
msgid "users_registered"
msgstr ""
#: public/home/status.php:37
msgid "taxa_available"
msgstr ""
#: public/home/status.php:45
msgid "free_space"
msgstr ""
#: public/explore/mysteries/index.php:42
msgid "Mystery recording"
msgstr ""
#: public/explore/mysteries/index.php:50
msgid "Recorded on "
msgstr ""
#: public/explore/mysteries/index.php:50 public/explore/record/index.php:55
msgid "at"
msgstr ""
#: public/explore/spectrograms/index.php:38 public/explore/index.php:15
#: public/explore/index.php:26 public/explore/search/index.php:16
#: public/explore/search/index.php:27
#: public/explore/search/searchrecord.php:117
#: public/explore/search/searchrecord.php:124
#: public/explore/random/index.php:33 public/explore/random/index.php:43
#: public/explore/map/index.php:30 public/explore/map/index.php:48
#: public/explore/taxa/index.php:31 public/explore/list/index.php:29
#: public/explore/list/index.php:41 public/explore/users/index.php:31
#: public/explore/users/index.php:42 public/explore/record/index.php:16
#: public/search/index.php:68 public/search/index.php:79
msgid "Explore"
msgstr ""
#: public/explore/spectrograms/index.php:49
msgid "Spectrograms"
msgstr ""
#: public/explore/spectrograms/index.php:55 public/explore/record/index.php:55
msgid "Recorded on"
msgstr ""
#: public/explore/search/index.php:28
msgid "Multicriteria recordings Search"
msgstr ""
#: public/explore/search/index.php:30
msgid "Species name"
msgstr ""
#: public/explore/search/index.php:32
msgid "Subspecies name"
msgstr ""
#: public/explore/search/index.php:34
msgid "Recordist name"
msgstr ""
#: public/explore/search/index.php:36
msgid "After date"
msgstr ""
#: public/explore/search/index.php:38
msgid "Befora date"
msgstr ""
#: public/explore/search/index.php:40
msgid "Keyword(s) in remarks (comma separated)"
msgstr ""
#: public/explore/search/searchrecord.php:102
msgid "You did not enter any query."
msgstr ""
#: public/explore/search/searchrecord.php:125
msgid "Search results"
msgstr ""
#: public/explore/search/searchrecord.php:133 public/search/index.php:83
msgid "No result for this query, please try again."
msgstr ""
#: public/explore/search/searchrecord.php:139
#: public/explore/random/index.php:49 public/search/index.php:89
msgid "File name"
msgstr ""
#: public/explore/search/searchrecord.php:142 public/explore/list/index.php:46
msgid "Datetime"
msgstr ""
#: public/explore/random/index.php:44
msgid "Random Record"
msgstr ""
#: public/explore/random/index.php:52 public/explore/list/index.php:51
msgid "Audio"
msgstr ""
#: public/explore/random/index.php:65
msgid "Click on the file name to go to the spectrogram view."
msgstr ""
#: public/explore/map/index.php:49
msgid "Record Map"
msgstr ""
#: public/explore/taxa/index.php:41
msgid "Taxa"
msgstr ""
#: public/explore/taxa/index.php:42
msgid "These taxa come from INPN TAXREF v14.0."
msgstr ""
#: public/explore/taxa/index.php:46
msgid "Kingdom"
msgstr ""
#: public/explore/taxa/index.php:47
msgid "Phylum"
msgstr ""
#: public/explore/taxa/index.php:48
msgid "Class"
msgstr ""
#: public/explore/taxa/index.php:49
msgid "Order"
msgstr ""
#: public/explore/taxa/index.php:50
msgid "Family"
msgstr ""
#: public/explore/taxa/index.php:51
msgid "Subfamily"
msgstr ""
#: public/explore/taxa/index.php:52
msgid "Tribu"
msgstr ""
#: public/explore/taxa/index.php:53
msgid "Genus"
msgstr ""
#: public/explore/list/index.php:42
msgid "Recording List"
msgstr ""
#: public/explore/list/index.php:48 public/explore/record/edit/index.php:51
msgid "File Name"
msgstr ""
#: public/explore/list/index.php:72
msgid "Open with Larynx"
msgstr ""
#: public/explore/list/index.php:73
msgid "See GUANO metadata"
msgstr ""
#: public/explore/list/index.php:74
msgid "Edit record metadata"
msgstr ""
#: public/explore/guano/index.php:29
msgid "about GUANO"
msgstr ""
#: public/explore/guano/index.php:55
msgid "Can't fetch data."
msgstr ""
#: public/explore/users/index.php:43
msgid "Users"
msgstr ""
#: public/explore/users/index.php:47
msgid "Name"
msgstr ""
#: public/explore/users/index.php:49
msgid "Private message link"
msgstr ""
#: public/explore/record/index.php:27
msgid "Record"
msgstr ""
#: public/explore/record/index.php:70
msgid "Can't find the record associated with this id, please try again."
msgstr ""
#: public/explore/record/edit/index.php:29
#: public/explore/record/edit/index.php:41
msgid "Edit"
msgstr ""
#: public/explore/record/edit/index.php:57
msgid "Time"
msgstr ""
#: public/explore/record/edit/index.php:66
msgid "Recorder Manufacturer"
msgstr ""
#: public/explore/record/edit/index.php:68
msgid "Recorder Model"
msgstr ""
#: public/explore/record/edit/index.php:76
msgid "Can't fetch information on record with id"
msgstr ""
#: public/about/index.php:27
msgid "About"
msgstr ""
#: public/about/index.php:28
msgid ""
"Chiro-Canto is an online bat sound sharing set of tools, inspired by <a href="
"\"https://xeno-canto.org\">Xeno-Canto</a>."
msgstr ""
#: public/about/index.php:30
msgid ""
"This website is developped with &#9829; by Samuel ORTION, a juvenile "
"<em>Geekus biologicus</em>."
msgstr ""
#: public/about/index.php:31
msgid "Source code"
msgstr ""
#: public/about/index.php:32
msgid ""
"This project is available under the GNU Affero GPL v3 license at <a href="
"\"https://forge.ortion.xyz/Chiro-Canto/chiro-canto\">https://forge.ortion."
"xyz/Chiro-Canto/chiro-canto</a>."
msgstr ""
#: public/contact/index.php:22
msgid "Contact"
msgstr ""
#: public/contact/index.php:26
msgid "Your first name.."
msgstr ""
#: public/contact/index.php:29
msgid "Your last name.."
msgstr ""
#: public/contact/index.php:31
msgid "Email"
msgstr ""
#: public/contact/index.php:32
msgid "Your email.."
msgstr ""
#: public/contact/index.php:34
msgid "Website"
msgstr ""
#: public/contact/index.php:35
msgid "Your website.."
msgstr ""
#: public/contact/index.php:37
msgid "Subject"
msgstr ""
#: public/contact/index.php:38
msgid "Your subject.."
msgstr ""
#: public/contact/index.php:40
msgid "Message"
msgstr ""
#: public/contact/index.php:41
msgid "Write something.."
msgstr ""
#: public/contact/sendmail.php:24
msgid "You have not entered a proper first name."
msgstr ""
#: public/contact/sendmail.php:29
msgid "You have not entered a proper last name."
msgstr ""
#: public/contact/sendmail.php:34
msgid "You have not entered a proper email address."
msgstr ""
#: public/contact/sendmail.php:39
msgid "You have not entered a proper subject."
msgstr ""
#: public/contact/sendmail.php:44
msgid "You have not entered a proper message."
msgstr ""
#: public/contact/sendmail.php:85
msgid "Message has been sent"
msgstr ""
#: public/contact/sendmail.php:87
msgid "Message could not be sent. Mailer Error: "
msgstr ""
#: public/search/index.php:80
msgid "Search Results"
msgstr ""
#: public/articles/view.php:5
msgid "Published on "
msgstr ""
#: public/articles/view.php:6 public/articles/list.php:48
msgid "Return to Homepage"
msgstr ""
#: public/articles/list.php:26
msgid "All Articles"
msgstr ""
#: public/articles/list.php:36
msgid "Article"
msgstr ""
#: public/articles/list.php:47
msgid "New article"
msgstr ""
#: public/larynx/index.php:32
msgid "A web tool for bat sound analysis"
msgstr ""
#: public/larynx/index.php:103
msgid "Error: Can't retrieve audio from database in Larynx"
msgstr ""
#: public/discussion/messages/index.php:29
msgid "You must be logged in to receive or send messages."
msgstr ""
#: public/discussion/messages/index.php:76 public/discussion/index.php:41
#: public/discussion/index.php:52
msgid "Discussion"
msgstr ""
#: public/discussion/messages/index.php:112
msgid "Enter your message.."
msgstr ""
#: public/discussion/messages/index.php:113 public/discussion/index.php:84
msgid "Send"
msgstr ""
#: public/discussion/messages/sendmessage.php:36
msgid "Error: No message author"
msgstr ""
#: public/discussion/messages/sendmessage.php:41
msgid "Error: No message destinator"
msgstr ""
#: public/discussion/messages/sendmessage.php:45
msgid "Error: No message content"
msgstr ""
#: public/discussion/index.php:53
msgid "New messages"
msgstr ""
#: public/discussion/index.php:76
msgid "No message received."
msgstr ""
#: public/discussion/index.php:80
msgid "Send a message"
msgstr ""
#: public/discussion/index.php:82
msgid "Addressee"
msgstr ""

Binary file not shown.

View File

@ -0,0 +1,994 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-20 12:45+0200\n"
"PO-Revision-Date: 2021-04-20 14:05+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.4.2\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: fr\n"
#: public/index.php:29
msgid "Last uploaded sound"
msgstr "Dernier fichier téléversé"
#: public/index.php:31
msgid "Stats"
msgstr "Statistiques"
#: public/menu.php:5
msgid "about"
msgstr "à propos"
#: public/menu.php:8
msgid "contact"
msgstr "contact"
#: public/menu.php:13
msgid "explore"
msgstr "explorer"
#: public/menu.php:17
msgid "list"
msgstr "liste"
#: public/menu.php:19
msgid "map"
msgstr "carte"
#: public/menu.php:21 public/menu.php:59
msgid "mysteries"
msgstr "mystères"
#: public/menu.php:24
msgid "random"
msgstr "aléatoire"
#: public/menu.php:26
msgid "search"
msgstr "recherche"
#: public/menu.php:28
msgid "spectrograms"
msgstr "spectrogramme"
#: public/menu.php:31
msgid "taxa"
msgstr "taxons"
#: public/menu.php:33
msgid "guano"
msgstr "guano"
#: public/menu.php:36
msgid "users"
msgstr "utilisateurs"
#: public/menu.php:43
msgid "upload"
msgstr "téléchargement"
#: public/menu.php:46
msgid "larynx"
msgstr "larynx"
#: public/menu.php:52
msgid "forum"
msgstr "forum"
#: public/menu.php:55
msgid "messages"
msgstr "messages"
#: public/menu.php:62
msgid "articles"
msgstr "articles"
#: public/menu.php:66
msgid "Welcome"
msgstr "Bienvenue"
#: public/header.php:6
msgid "To share bat sounds all over the world"
msgstr "Partager des sons de chauve-souris du monde entier"
#: public/forum/index.php:16 public/forum/index.php:27
#: public/forum/newtopic.php:36 public/forum/newtopic.php:43
#: public/forum/topics/index.php:17 public/forum/topics/index.php:28
msgid "Forum"
msgstr "Forum"
#: public/forum/categories.php:25
msgid "Categories"
msgstr "Catégories"
#: public/forum/categories.php:29
msgid "Title"
msgstr "Titre"
#: public/forum/categories.php:30
msgid "Description"
msgstr "Description"
#: public/forum/categories.php:46
msgid "Create a category"
msgstr "Créer une catégorie"
#: public/forum/categories.php:48
msgid "Category title"
msgstr "Titre de la catégorie"
#: public/forum/categories.php:49
msgid "Enter a name for the new category.."
msgstr "Entrer un nom pour la nouvelle catégorie.."
#: public/forum/categories.php:50
msgid "Category description"
msgstr "Description de la catégorie"
#: public/forum/categories.php:51
msgid "Enter a description for the new category (support Markdown).."
msgstr ""
"Entrer une description pour la nouvelle catégorie (supporte Markdown).."
#: public/forum/categories.php:52 public/forum/newtopic.php:50
#: public/upload/location.php:13 public/upload/upload.php:73
#: public/gallery/upload.php:13 public/auth/login/index.php:34
#: public/auth/register/index.php:43 public/contact/index.php:43
msgid "submit"
msgstr "soumettre"
#: public/forum/categories.php:52 public/forum/newtopic.php:50
#: public/upload/upload.php:74 public/auth/login/index.php:34
#: public/auth/register/index.php:43 public/contact/index.php:43
msgid "reset"
msgstr "annuler"
#: public/forum/createcategory.php:37
msgid "You did not enter a proper category title."
msgstr "Vous n'avez pas entré de titre."
#: public/forum/createcategory.php:44
msgid "You did not enter a proper category description."
msgstr "Vous n'avez pas entré de description."
#: public/forum/createcategory.php:47 public/forum/createtopic.php:69
#: public/forum/topics/sendreply.php:56
msgid "You did not log in."
msgstr "Vous n'êtes pas connecté."
#: public/forum/newtopic.php:44
msgid "Create a new topic"
msgstr "Créer un nouveau sujet"
#: public/forum/newtopic.php:46
msgid "Topic subject"
msgstr "Topic"
#: public/forum/newtopic.php:47
msgid "Enter a topic subject.."
msgstr "Entrer un sujet.."
#: public/forum/newtopic.php:48
msgid "Topic category"
msgstr "Catégorie du sujet"
#: public/forum/createtopic.php:59
msgid "You did not enter a proper topic subject."
msgstr "Vous n'avez pas entré de sujet."
#: public/forum/createtopic.php:66
msgid "You did not enter a proper topic category."
msgstr "Vous n'avez pas entré de catégorie de sujet."
#: public/forum/createtopic.php:74
msgid "You did not sumit the category creation form."
msgstr "Vous n'avez pas soumis le formulaire de création de catégorie."
#: public/forum/topics/topics.php:43 public/forum/topics/topics.php:122
#: public/explore/search/searchrecord.php:140
#: public/explore/random/index.php:50 public/explore/list/index.php:49
#: public/about/index.php:29 public/search/index.php:90
msgid "Author"
msgstr "Auteur"
#: public/forum/topics/topics.php:44
msgid "Reply"
msgstr "Réponse"
#: public/forum/topics/topics.php:45 public/explore/record/edit/index.php:55
#: public/search/index.php:92
msgid "Date"
msgstr "Date"
#: public/forum/topics/topics.php:74
msgid "Your Reply"
msgstr "Votre réponse"
#: public/forum/topics/topics.php:93
msgid "Enter your reply (support Markdown).."
msgstr "Entrer votre réponse (supporte Markdown).."
#: public/forum/topics/topics.php:106
msgid "Can't fetch topic data."
msgstr "Impossible de récupérer les données."
#: public/forum/topics/topics.php:120
msgid "Subjects"
msgstr "Sujets"
#: public/forum/topics/topics.php:121
msgid "Answers"
msgstr "Réponses"
#: public/forum/topics/topics.php:123
msgid "Creation date"
msgstr "Date de création"
#: public/forum/topics/topics.php:151
msgid "No reply"
msgstr "Pas de réponse"
#: public/forum/topics/sendreply.php:46 public/forum/topics/sendreply.php:53
msgid "You did not enter your reply."
msgstr "Vous n'avez pas entré votre réponse."
#: public/forum/topics/sendreply.php:61
msgid "You did not sumit the reply form."
msgstr "Vous n'avez pas soumis le formulaire de réponse."
#: public/upload/index.php:26
msgid "Upload"
msgstr "Téléchargement"
#: public/upload/index.php:37
msgid "Upload Your Recording"
msgstr "Télécharger votre enregistrement"
#: public/upload/location.php:2
msgid "Location"
msgstr "Lieu"
#: public/upload/location.php:3
msgid "Metadata"
msgstr "Métadonnées"
#: public/upload/location.php:4
msgid "Verify"
msgstr "Vérification"
#: public/upload/location.php:10 public/upload/upload.php:10
#: public/explore/record/edit/index.php:53
msgid "Coordinates"
msgstr "Coordonnées"
#: public/upload/upload.php:8
msgid "File"
msgstr "Fichier"
#: public/upload/upload.php:8
msgid "Audio File must be in wav format."
msgstr "Le fichier doit être au format wav."
#: public/upload/upload.php:12 public/explore/random/index.php:48
#: public/explore/taxa/index.php:54 public/explore/list/index.php:47
#: public/explore/record/edit/index.php:61
msgid "Species"
msgstr "Espèce"
#: public/upload/upload.php:14
msgid "Species identified"
msgstr "Espèce identifiée"
#: public/upload/upload.php:15
msgid "Enter a species.."
msgstr "Entrer une espèce.."
#: public/upload/upload.php:19
msgid "Identity unknown"
msgstr "Identité inconnue"
#: public/upload/upload.php:21 public/explore/record/edit/index.php:63
msgid "Subspecies"
msgstr "Sous-espèce"
#: public/upload/upload.php:22
msgid "Enter a subspecies name.."
msgstr "Entrer un nom de sous-espèce.."
#: public/upload/upload.php:23 public/explore/search/searchrecord.php:141
#: public/explore/random/index.php:51 public/explore/list/index.php:50
#: public/search/index.php:91
msgid "License"
msgstr "Licence"
#: public/upload/upload.php:32 public/explore/record/edit/index.php:59
msgid "Recordist Name"
msgstr "Nom de l'auteur de l'enregistrement"
#: public/upload/upload.php:33
msgid "Enter your name.."
msgstr "Entrer votre nom.."
#: public/upload/upload.php:34
msgid "Country"
msgstr "Pays"
#: public/upload/upload.php:37
msgid "Recording Date"
msgstr "Date d'enregistrement"
#: public/upload/upload.php:39
msgid "Recording Time"
msgstr "Heure d'enregistrement"
#: public/upload/upload.php:41
msgid "Optional Metadata"
msgstr "Métadonnées optionnelles"
#: public/upload/upload.php:43
msgid "Sound Types"
msgstr "Type de son"
#: public/upload/upload.php:45
msgid "uncertain"
msgstr "incertain"
#: public/upload/upload.php:46
msgid "echolocation"
msgstr "écholocation"
#: public/upload/upload.php:47
msgid "buzz"
msgstr "buzz"
#: public/upload/upload.php:48
msgid "social cry"
msgstr "cris sociaux"
#: public/upload/upload.php:49
msgid "song"
msgstr "chant"
#: public/upload/upload.php:51
msgid "Quality"
msgstr "Qualité"
#: public/upload/upload.php:53
msgid "Unrated"
msgstr "Non spécifiée"
#: public/upload/upload.php:54
msgid "Loud and Clear"
msgstr "Fort et clair"
#: public/upload/upload.php:55
msgid ""
"Clear, but bat a bit distant, or some interference with other sound sources"
msgstr ""
"Clair, mais chauve-souris un peu distante, ou quelques interference avec "
"d'autres sons"
#: public/upload/upload.php:56
msgid "Moderately clear, or quite some interference"
msgstr "Modérément clair, ou quelques interférences"
#: public/upload/upload.php:57
msgid "Faint recording, or much interference"
msgstr "Enregistrement faible, ou beaucoup d'interference"
#: public/upload/upload.php:58
msgid "Barely audible"
msgstr "Quasiment inaudible"
#: public/upload/upload.php:60
msgid "Remarks"
msgstr "Remarques"
#: public/upload/upload.php:62
msgid "Recorder manufacturer"
msgstr "Constructeur de l'enregistreur"
#: public/upload/upload.php:64
msgid "Recorder model"
msgstr "Modèle de l'enregistreur"
#: public/upload/upload.php:66 public/explore/record/edit/index.php:70
msgid "Recorder Serial Number"
msgstr "Numéro de série de l'enregistreur"
#: public/upload/upload.php:68
msgid "Samplerate"
msgstr "Fréquence d'échantillonage"
#: public/upload/upload.php:70
msgid "Time Expansion Factor"
msgstr "Facteur d'expansion de temps"
#: public/upload/submit.php:113
msgid "This file extension is not allowed; please upload a WAV file."
msgstr ""
"Cette extension de fichier n'est pas autorisée; merci de télécharger un son ."
"wav."
#: public/upload/submit.php:117
msgid "The file size must be below 10MB."
msgstr "Le fichier doit faire moins de 10MB."
#: public/upload/submit.php:122
msgid "The file "
msgstr "Le fichier "
#: public/upload/submit.php:122
msgid "has been uploaded."
msgstr "a été téléchargé."
#: public/upload/submit.php:124
msgid "Sorry, there was an error uploading your file"
msgstr "Désolé, il y a eu une erreur lors du téléchargement"
#: public/upload/submit.php:134
msgid "Incorrect coordinates, please try again."
msgstr "Coordonnées incorrectes, merci de réessayer."
#: public/upload/submit.php:149
msgid "Error, incorrect species name."
msgstr "Erreur, espèce incorrecte."
#: public/upload/submit.php:167
msgid "Incorrect license"
msgstr "Licence incorrecte"
#: public/upload/submit.php:174
msgid "Incorrect Recordist Name."
msgstr "Auteur de l'enregistrement incorrect."
#: public/upload/submit.php:181
msgid "Incorrect Country. "
msgstr "Pays incorrect. "
#: public/upload/submit.php:188
msgid "Incorrect date."
msgstr "Date incorrecte."
#: public/upload/submit.php:195
msgid "Incorrect time."
msgstr "Heure incorrecte."
#: public/upload/submit.php:202
msgid "Incorrect sound type."
msgstr "Type de son incorrect."
#: public/upload/submit.php:209
msgid "Incorrect quality value."
msgstr "Qualité incorrecte."
#: public/upload/submit.php:237
msgid "Form not submitted."
msgstr "Formulaire non soumis."
#: public/gallery/index.php:16 public/gallery/index.php:27
msgid "Gallery"
msgstr "Galerie"
#: public/gallery/upload.php:9
msgid "Image"
msgstr "Image"
#: public/gallery/upload.php:42
msgid "You need to be logged in to upload images."
msgstr "Vous devez être connecté pour télécharger une image."
#: public/gallery/upload.php:66
msgid "Can't move your file."
msgstr "Erreur: impossible de déplacer le fichier."
#: public/gallery/upload.php:69
msgid "You should select a file to upload !"
msgstr "Vous devez sélectionner un fichier à télécharger !"
#: public/gallery/gallery.php:32
msgid "Upload Image"
msgstr "Télécharger une image"
#: public/auth/login/index.php:16 public/auth/login/index.php:27
msgid "Login"
msgstr "Connexion"
#: public/auth/login/index.php:30 public/auth/register/index.php:35
#: public/explore/users/index.php:48
msgid "Username"
msgstr "Nom d'utilisateur"
#: public/auth/login/index.php:31
msgid "Enter your username.."
msgstr "Entrer un nom d'utilisateur.."
#: public/auth/login/index.php:33
msgid "Enter your password.."
msgstr "Entrer votre mot de passe.."
#: public/auth/login/index.php:36
msgid "Not yet registered ?"
msgstr "Pas encore inscrit ?"
#: public/auth/login/login.php:49 public/auth/register/register.php:55
msgid "You did not enter a proper username."
msgstr "Vous n'avez pas entré un nom d'utilisateur correct."
#: public/auth/login/login.php:54 public/auth/register/register.php:68
msgid "You did not enter a proper password."
msgstr "Vous n'avez pas entré de mot de passe."
#: public/auth/login/login.php:58 public/auth/register/register.php:72
msgid "You did not submit the register form."
msgstr "Vous n'avez pas soumis le formulaire d'inscription."
#: public/auth/login/login.php:70
msgid "Incorrect password, please try again."
msgstr "Mot de passe incorrect, merci de réessayer."
#: public/auth/register/index.php:17 public/auth/register/index.php:28
msgid "Register"
msgstr "Inscription"
#: public/auth/register/index.php:31 public/contact/index.php:25
msgid "First Name"
msgstr "Prénom"
#: public/auth/register/index.php:33 public/contact/index.php:28
msgid "Last Name"
msgstr "Nom"
#: public/auth/register/index.php:37
msgid "Password"
msgstr "Mot de passe"
#: public/auth/register/index.php:39
msgid "Your email"
msgstr "Votre email"
#: public/auth/register/index.php:41
msgid "Your website (optional)"
msgstr "Votre site web (optionnel)"
#: public/auth/register/index.php:45
msgid "Already registered ?"
msgstr "Déjà inscrit ?"
#: public/auth/register/register.php:41
msgid "You did not enter a proper first name."
msgstr "Vous n'avez pas entré de prénom."
#: public/auth/register/register.php:48
msgid "You did not enter a proper last name."
msgstr "Vous n'avez pas entré de nom."
#: public/auth/register/register.php:62
msgid "You did not enter a proper email address."
msgstr "Vous n'avez pas entré d'adresse email."
#: public/home/last-uploaded-file.php:39
msgid "Error fetch."
msgstr "Erreur de collecte."
#: public/home/status.php:35
msgid "records_uploaded"
msgstr "Enregistrements téléchargés"
#: public/home/status.php:36
msgid "users_registered"
msgstr "Utilisateurs enregistrés"
#: public/home/status.php:37
msgid "taxa_available"
msgstr "Taxons disponibles"
#: public/home/status.php:45
msgid "free_space"
msgstr "Espace libre sur le disque"
#: public/explore/mysteries/index.php:42
msgid "Mystery recording"
msgstr "Enregistrement mystère"
#: public/explore/mysteries/index.php:50
msgid "Recorded on "
msgstr "Enregistré le"
#: public/explore/mysteries/index.php:50 public/explore/record/index.php:55
msgid "at"
msgstr "à"
#: public/explore/spectrograms/index.php:38 public/explore/index.php:15
#: public/explore/index.php:26 public/explore/search/index.php:16
#: public/explore/search/index.php:27
#: public/explore/search/searchrecord.php:117
#: public/explore/search/searchrecord.php:124
#: public/explore/random/index.php:33 public/explore/random/index.php:43
#: public/explore/map/index.php:30 public/explore/map/index.php:48
#: public/explore/taxa/index.php:31 public/explore/list/index.php:29
#: public/explore/list/index.php:41 public/explore/users/index.php:31
#: public/explore/users/index.php:42 public/explore/record/index.php:16
#: public/search/index.php:68 public/search/index.php:79
msgid "Explore"
msgstr "Explorer"
#: public/explore/spectrograms/index.php:49
msgid "Spectrograms"
msgstr "Spectrogramme"
#: public/explore/spectrograms/index.php:55 public/explore/record/index.php:55
msgid "Recorded on"
msgstr "Enregistré le "
#: public/explore/search/index.php:28
msgid "Multicriteria recordings Search"
msgstr "Recherche d'enregistrement mutlicritères"
#: public/explore/search/index.php:30
msgid "Species name"
msgstr "Nom de l'espèce"
#: public/explore/search/index.php:32
msgid "Subspecies name"
msgstr "Nom de la sous-espèce"
#: public/explore/search/index.php:34
msgid "Recordist name"
msgstr "Nom de l'auteur de l'enregistrement"
#: public/explore/search/index.php:36
msgid "After date"
msgstr "Après la date"
#: public/explore/search/index.php:38
msgid "Befora date"
msgstr "Avant la date"
#: public/explore/search/index.php:40
msgid "Keyword(s) in remarks (comma separated)"
msgstr "Mot(s) clé dans les remarques (séparés par des virgules)"
#: public/explore/search/searchrecord.php:102
msgid "You did not enter any query."
msgstr "Vous n'avez pas entré de champ."
#: public/explore/search/searchrecord.php:125
msgid "Search results"
msgstr "Résultats de recherche"
#: public/explore/search/searchrecord.php:133 public/search/index.php:83
msgid "No result for this query, please try again."
msgstr "Pas de résultats pour cette requête, merci de réessayer."
#: public/explore/search/searchrecord.php:139
#: public/explore/random/index.php:49 public/search/index.php:89
msgid "File name"
msgstr "Nom du fichier"
#: public/explore/search/searchrecord.php:142 public/explore/list/index.php:46
msgid "Datetime"
msgstr "Date et heure"
#: public/explore/random/index.php:44
msgid "Random Record"
msgstr "Enregistrement aléatoire"
#: public/explore/random/index.php:52 public/explore/list/index.php:51
msgid "Audio"
msgstr "Audio"
#: public/explore/random/index.php:65
msgid "Click on the file name to go to the spectrogram view."
msgstr "Cliquer sur le nom du fichier pour voir le spectrogramme."
#: public/explore/map/index.php:49
msgid "Record Map"
msgstr "Carte des enregistrements"
#: public/explore/taxa/index.php:41
msgid "Taxa"
msgstr "Taxons"
#: public/explore/taxa/index.php:42
msgid "These taxa come from INPN TAXREF v14.0."
msgstr "Ces taxons proviennent du TAXREF v14.0 de l'INPN."
#: public/explore/taxa/index.php:46
msgid "Kingdom"
msgstr "Règne"
#: public/explore/taxa/index.php:47
msgid "Phylum"
msgstr "Phylum"
#: public/explore/taxa/index.php:48
msgid "Class"
msgstr "Classe"
#: public/explore/taxa/index.php:49
msgid "Order"
msgstr "Ordre"
#: public/explore/taxa/index.php:50
msgid "Family"
msgstr "Famille"
#: public/explore/taxa/index.php:51
msgid "Subfamily"
msgstr "Sous-famille"
#: public/explore/taxa/index.php:52
msgid "Tribu"
msgstr "Tribu"
#: public/explore/taxa/index.php:53
msgid "Genus"
msgstr "Genre"
#: public/explore/list/index.php:42
msgid "Recording List"
msgstr "Liste des enregistrements"
#: public/explore/list/index.php:48 public/explore/record/edit/index.php:51
msgid "File Name"
msgstr "Nom du fichier"
#: public/explore/list/index.php:72
msgid "Open with Larynx"
msgstr "Ouvrir avec Larynx"
#: public/explore/list/index.php:73
msgid "See GUANO metadata"
msgstr "Voir les métadonées au format GUANO"
#: public/explore/list/index.php:74
msgid "Edit record metadata"
msgstr "Editer les métadonnées de l'enregistrement"
#: public/explore/guano/index.php:29
msgid "about GUANO"
msgstr "À propos de GUANO"
#: public/explore/guano/index.php:55
msgid "Can't fetch data."
msgstr "Impossible de collecter les données."
#: public/explore/users/index.php:43
msgid "Users"
msgstr "Utilisateurs"
#: public/explore/users/index.php:47
msgid "Name"
msgstr "Nom"
#: public/explore/users/index.php:49
msgid "Private message link"
msgstr "Lien vers les messages privés."
#: public/explore/record/index.php:27
msgid "Record"
msgstr "Enregistrement"
#: public/explore/record/index.php:70
msgid "Can't find the record associated with this id, please try again."
msgstr ""
"Impossible de trouver l'enregistrement associé avec cet id, merci de "
"réessayer."
#: public/explore/record/edit/index.php:29
#: public/explore/record/edit/index.php:41
msgid "Edit"
msgstr "Editer"
#: public/explore/record/edit/index.php:57
msgid "Time"
msgstr "Heure"
#: public/explore/record/edit/index.php:66
msgid "Recorder Manufacturer"
msgstr "Fabriquant de l'enregistreur"
#: public/explore/record/edit/index.php:68
msgid "Recorder Model"
msgstr "Modèle de l'enregistreur"
#: public/explore/record/edit/index.php:76
msgid "Can't fetch information on record with id"
msgstr ""
"Impossible de collecter les informations sur l'enregistrement associé avec "
"l'id"
#: public/about/index.php:27
msgid "About"
msgstr "À propos"
#: public/about/index.php:28
msgid ""
"Chiro-Canto is an online bat sound sharing set of tools, inspired by <a href="
"\"https://xeno-canto.org\">Xeno-Canto</a>."
msgstr ""
"Chiro-Canto est un outil en ligne de partage de sons de chauve-souris "
"inspiré par <a href=\"https://xeno-canto.org\">Xeno-Canto</a>."
#: public/about/index.php:30
msgid ""
"This website is developped with &#9829; by Samuel ORTION, a juvenile "
"<em>Geekus biologicus</em>."
msgstr ""
"Ce site web est développé avec &#9829; par Samuel ORTION, un <em>Geekus "
"biologicus</em> juvénile."
#: public/about/index.php:31
msgid "Source code"
msgstr "Code source"
#: public/about/index.php:32
msgid ""
"This project is available under the GNU Affero GPL v3 license at <a href="
"\"https://forge.ortion.xyz/Chiro-Canto/chiro-canto\">https://forge.ortion."
"xyz/Chiro-Canto/chiro-canto</a>."
msgstr ""
"Ce projet est disponible sous licence libre GNU Affero GPL v3 sur mon dépôt "
"Git : <a href=\"https://forge.ortion.xyz/Chiro-Canto/chiro-canto\">https://"
"forge.ortion.xyz/Chiro-Canto/chiro-canto</a>."
#: public/contact/index.php:22
msgid "Contact"
msgstr "Conact"
#: public/contact/index.php:26
msgid "Your first name.."
msgstr "Votre prénom.."
#: public/contact/index.php:29
msgid "Your last name.."
msgstr "Votre nom.."
#: public/contact/index.php:31
msgid "Email"
msgstr "Email"
#: public/contact/index.php:32
msgid "Your email.."
msgstr "Votre email.."
#: public/contact/index.php:34
msgid "Website"
msgstr "Site web"
#: public/contact/index.php:35
msgid "Your website.."
msgstr "Votre site web.."
#: public/contact/index.php:37
msgid "Subject"
msgstr "Sujet.."
#: public/contact/index.php:38
msgid "Your subject.."
msgstr "Votre sujet.."
#: public/contact/index.php:40
msgid "Message"
msgstr "Message"
#: public/contact/index.php:41
msgid "Write something.."
msgstr "Ecrivez quelque chose.."
#: public/contact/sendmail.php:24
msgid "You have not entered a proper first name."
msgstr "Vous n'avez pas entré de prénom."
#: public/contact/sendmail.php:29
msgid "You have not entered a proper last name."
msgstr "Vous n'avez pas entré de nom."
#: public/contact/sendmail.php:34
msgid "You have not entered a proper email address."
msgstr "Vous n'avez pas entré d'adresse mail."
#: public/contact/sendmail.php:39
msgid "You have not entered a proper subject."
msgstr "Vous n'avez pas entré de sujet."
#: public/contact/sendmail.php:44
msgid "You have not entered a proper message."
msgstr "Vous n'avez pas entré de message."
#: public/contact/sendmail.php:85
msgid "Message has been sent"
msgstr "Le message a été envoyé."
#: public/contact/sendmail.php:87
msgid "Message could not be sent. Mailer Error: "
msgstr "Le message n'a pas pu être envoyé. Erreur du courrielleur : "
#: public/search/index.php:80
msgid "Search Results"
msgstr "Résultats de recherche"
#: public/articles/view.php:5
msgid "Published on "
msgstr "Publié le"
#: public/articles/view.php:6 public/articles/list.php:48
msgid "Return to Homepage"
msgstr "Retour vers la page d'accueuil"
#: public/articles/list.php:26
msgid "All Articles"
msgstr "Tous les articles"
#: public/articles/list.php:36
msgid "Article"
msgstr "Article"
#: public/articles/list.php:47
msgid "New article"
msgstr "Nouvel article"
#: public/larynx/index.php:32
msgid "A web tool for bat sound analysis"
msgstr "Une application web pour l'analyse de son"
#: public/larynx/index.php:103
msgid "Error: Can't retrieve audio from database in Larynx"
msgstr "Erreur: Impossible de récupérer l'audio dans Larynx"
#: public/discussion/messages/index.php:29
msgid "You must be logged in to receive or send messages."
msgstr "Vous devez être connecté pour recevoir ou evoyer des messages."
#: public/discussion/messages/index.php:76 public/discussion/index.php:41
#: public/discussion/index.php:52
msgid "Discussion"
msgstr "Discussion"
#: public/discussion/messages/index.php:112
msgid "Enter your message.."
msgstr "Entrer votre message.."
#: public/discussion/messages/index.php:113 public/discussion/index.php:84
msgid "Send"
msgstr "Envoyer"
#: public/discussion/messages/sendmessage.php:36
msgid "Error: No message author"
msgstr "Erreur: Pas d'auteur du message"
#: public/discussion/messages/sendmessage.php:41
msgid "Error: No message destinator"
msgstr "Erreur: Pas de destinataire du message"
#: public/discussion/messages/sendmessage.php:45
msgid "Error: No message content"
msgstr "Erreur: Pas de message"
#: public/discussion/index.php:53
msgid "New messages"
msgstr "Nouveaux messages"
#: public/discussion/index.php:76
msgid "No message received."
msgstr "Pas de message reçus"
#: public/discussion/index.php:80
msgid "Send a message"
msgstr "Envoyer un message"
#: public/discussion/index.php:82
msgid "Addressee"
msgstr "Destinataire"

10
public/lang/select.php Normal file
View File

@ -0,0 +1,10 @@
<?php
session_start();
if (isset($_POST['language'])) {
$cookie_name = 'language';
$cookie_value = $_POST['language'];
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
$_SESSION['language'] = $_POST['language'];
}
header('Location: /');
?>

View File

@ -5,6 +5,7 @@ error_reporting(E_ALL);
session_start();
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$version = "1.0";
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
<html lang="en">
@ -28,7 +29,7 @@ include("$root/analytics/matomo.php");
<?php include("$root/header.php");?>
<section>
<h2>Larynx</h2>
<p>A web tool for bat sound analysis</p>
<p><?=_('A web tool for bat sound analysis')?></p>
<a href="#larynx">
<div class="arrow bounce"></div>
</a>
@ -99,7 +100,7 @@ include("$root/analytics/matomo.php");
</html>
<?php
} else {
$_SESSION['error_msg'] = "Error: Can't retrieve audio from database in Larynx";
$_SESSION['error_msg'] = _("Error: Can't retrieve audio from database in Larynx");
header('Location: /');
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -2,68 +2,81 @@
<div class="container">
<ul>
<a href="/about">
<li>about</li>
<li><?=_('about')?></li>
</a>
<a href="/contact">
<li>contact</li>
<li><?=_('contact')?></li>
</a>
<a href="/explore">
<li>
<div class="dropdown">
<span>explore</span>
<span><?=_('explore')?></span>
<div class="dropdown-content">
<ul>
<a href="/explore/list">
<li>list</li>
<li><?=_('list')?></li>
</a><a href="/explore/map">
<li>map</li>
<li><?=_('map')?></li>
</a><a href="/explore/mysteries">
<li>mysteries</li>
<li><?=_('mysteries')?></li>
</a>
<a href="/explore/random">
<li>random</li>
<li><?=_('random')?></li>
</a><a href="/explore/search">
<li>search</li>
<li><?=_('search')?></li>
</a><a href="/explore/spectrograms">
<li>spectrograms</li>
<li><?=_('spectrograms')?></li>
</a>
<a href="/explore/taxa">
<li>taxa</li>
<li><?=_('taxa')?></li>
</a><a href="/explore/guano">
<li>guano</li>
<li><?=_('guano')?></li>
</a>
<a href="/explore/users">
<li>users</li>
<li><?=_('users')?></li>
</a>
</ul>
</div>
</div></li>
</a>
<a href="/upload">
<li>upload</li>
<li><?=_('upload')?></li>
</a>
<a href="/larynx">
<li>larynx</li>
<li><?=_('larynx')?></li>
</a>
<a href="/api">
<li>API</li>
</a>
<a href="/forum">
<li>forum</li>
<li><?=_('forum')?></li>
</a>
<a href="/discussion" class="notification">
<li>messages</li>
<li><?=_('messages')?></li>
<?php include("$root/discussion/notification.php")?>
</a>
<a href="/explore/mysteries">
<li>mysteries</li>
<li><?=_('mysteries')?></li>
</a>
<a href="/articles">
<li>articles</li>
<li><?=_('articles')?></li>
</a>
</ul>
<div>
<?=isset($_SESSION['username']) ? "Welcome ".$_SESSION['username']. " !" : '<a href="/auth/login">sign in</a> <a href="/auth/register">sign up</a>'?>
<div class="container row">
<?=isset($_SESSION['username']) ? _('Welcome')." ".$_SESSION['username']. " !" : '<a href="/auth/login">sign in</a> <a href="/auth/register">sign up</a>'?>
<div class="language">
<button class="collapsible language"><img src="/media/icons/language.jpg" alt="language"></button>
<div class="content">
<form action="/lang/select.php" id="language" method="post">
<select name="language">
<option value="en_US">English</option>
<option value="fr_FR">French</option>
</select>
<input type="submit" value="Ok">
</form>
</div>
</div>
</div>
</div>
</nav>

View File

@ -3,7 +3,8 @@ ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$root = realpath($_SERVER['DOCUMENT_ROOT']);
require($root."/database/credentials.php");
require("$root/lang/gettext.php");
require("$root/database/credentials.php");
// Connect the database
try{
$db = new PDO("mysql:host=$host;dbname=$database;charset=utf8",
@ -46,16 +47,15 @@ if (isset($_POST['search']))
$result = $req->fetchAll();
}
}
// print_r($result);
}
} else
{
// header('Location: /');
header('Location: /explore/search');
}
if (empty($result))
{
// header('Location: /');
header('Location: /explore/search');
} else
{
?>
@ -65,7 +65,7 @@ if (empty($result))
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore | Chiro - Canto</title>
<title><?=_('Explore')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -76,20 +76,20 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h3>Explore</h3>
<h4>Search Results</h4>
<h3><?=_('Explore')?></h3>
<h4><?=_('Search Results')?></h4>
<?php
if (empty($result)) {
echo "No result for this query, please try again.\n";
echo _("No result for this query, please try again.");
} else {
?>
<table>
<thead>
<tr>
<th>File name</th>
<th>Author</th>
<th>License</th>
<th>Date</th>
<th><?=_('File name')?></th>
<th><?=_('Author')?></th>
<th><?=_('License')?></th>
<th><?=_('Date')?></th>
</tr>
</thead>
<tbody>

View File

@ -106,7 +106,7 @@ label {
input,
select,
textarea {
/* width: fit-content; */
width: 100%;
/* Full width */
padding: 12px;
margin: 0;
@ -119,8 +119,6 @@ textarea {
/* Add a top margin */
margin-bottom: 1em;
/* Bottom margin */
resize: vertical
/* Allow the user to vertically resize the textarea (not horizontally) */
;
}
@ -137,16 +135,18 @@ input[type=submit] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
margin: 0.1em;
border: none;
border-radius: 4px;
cursor: pointer;
/* width: auto; */
width: auto;
}
input[type=reset] {
background-color: #af4c4c;
color: white;
padding: 12px 20px;
margin: 0.1em;
border: none;
border-radius: 4px;
cursor: pointer;
@ -240,6 +240,7 @@ iframe html body {
display: flex;
padding-top: 0;
padding-bottom: 0;
padding: 0.5em;
}
.container.row {
@ -736,6 +737,7 @@ section.observation label {
#map {
object-fit: contain;
height: 50vh;
}
#map img {
@ -744,4 +746,24 @@ section.observation label {
.fa {
height: 1em;
}
.language {
background: transparent;
margin: 0;
padding: 0.1em;
}
.language:hover {
background: transparent;
}
.language::after {
content: none;
}
#language {
position: absolute;
right: 2.5em;
top: 2.5em;
}

View File

@ -15,6 +15,7 @@ if (!isset($_SESSION['username']) or $_SESSION['username'] == "") {
}
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
?>
<!DOCTYPE html>
<html lang="en">
@ -22,7 +23,7 @@ $root = realpath($_SERVER["DOCUMENT_ROOT"]);
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Upload | Chiro - Canto</title>
<title><?=_('Upload')?> | Chiro - Canto</title>
<link rel="stylesheet" type="text/css" href="/styles/style.css">
</head>
<?php
@ -33,7 +34,7 @@ include("$root/analytics/matomo.php");
<?php include("$root/menu.php");?>
<?php include("$root/header.php");?>
<section>
<h2>Upload Your Recording</h2>
<h2><?=_('Upload Your Recording')?></h2>
<?php echo (isset($_SESSION['error_msg']) and ! $_SESSION['error_msg'] == "" ) ? '<div class="error">'.$_SESSION['error_msg'].'</div>' : "";
if (isset($_GET['step']))
{

View File

@ -1,16 +1,16 @@
<ul class="breadcrumb">
<li class="active">Location</li>
<li>Metadata</li>
<li>Verify</li>
<li class="active"><?=_('Location')?></li>
<li><?=_('Metadata')?></li>
<li><?=_('Verify')?></li>
</ul>
<div id="map" style="height: 440px; border: 1px solid #AAA;"></div>
<form action="submitlocation.php" method="post">
<label for="latlng">Coordinates</label>
<label for="latlng"><?=_('Coordinates')?></label>
<div class="coordinates">
<input type="text" id="latlng" name="latlng">
<input type="submit" value="Submit">
<input type="submit" value="<?=_('submit')?>">
</div>
</form>
<script type='text/javascript' src='/scripts/jquery/script.js'></script>

View File

@ -1,7 +1,8 @@
<?php
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require("$root/lang/gettext.php");
function db_entry() {
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
global $root;
require($root."/database/credentials.php");
// Connect the database
try {
@ -64,7 +65,7 @@ function db_entry() {
"sound_type"=>implode(',', $_SESSION['observation']['type']),
"duration"=>$t,
"make"=>isset($_SESSION['observation']['make']) ? $_SESSION['observation']['make'] : "",
"model"=>isset($_SESSION['osbservation']['model']) ? $_SESSION['osbservation']['model'] : "",
"model"=>isset($_SESSION['osbservation']['model']) ? $_SESSION['observation']['model'] : "",
"serial"=>isset($_SESSION['observation']['serial']) ? $_SESSION['observation']['serial'] : "",
"sample_rate"=>isset($_SESSION['observation']['sample_rate']) ? $_SESSION['observation']['sample_rate'] : 384,
"time_expansion"=>isset($_SESSION['observation']['time_expansion']) ? $_SESSION['observation']['time_expansion'] : 10,
@ -109,18 +110,18 @@ if (isset($_POST['submit']))
$file_extension_allowed = ['wav'];
if (! in_array($fileExtension, $file_extension_allowed))
{
$_SESSION['error_msg'] .= "This file extension is not allowed; please upload a WAV file.\n";
$_SESSION['error_msg'] .= _("This file extension is not allowed; please upload a WAV file.");
}
if ($fileSize > 10*1024*1024)
{
$_SESSION['error_msg'] .= "The file size must be below 10MB. \n";
$_SESSION['error_msg'] .= _("The file size must be below 10MB.");
}
print_r($target_file);
if (move_uploaded_file($_FILES['file']['tmp_name'], $target_file))
{
echo "The file ". htmlspecialchars(basename($_FILES['file']['name']))." has been uploaded.";
echo _("The file "). htmlspecialchars(basename($_FILES['file']['name']))." "._("has been uploaded.");
} else {
echo "Sorry, there was an error uploading your file";
echo _("Sorry, there was an error uploading your file");
}
$_SESSION['observation']['file'] = basename($_FILES['file']['name']);
if (isset($_POST['latlng'])) {
@ -130,7 +131,7 @@ if (isset($_POST['submit']))
$_SESSION['observation']['lng'] = explode(',', $latlng)[1];
} else {
$_SESSION['error_msg'] .= "Incorrect coordinates, please try again.";
$_SESSION['error_msg'] .= _("Incorrect coordinates, please try again.");
}
if (isset($_POST['spchoice']))
{
@ -145,7 +146,7 @@ if (isset($_POST['submit']))
setcookie('species', $_SESSION['observation']['species'], time() + 86400 * 365.2, "/");
} else
{
$_SESSION['error_msg'].= "Error, incorrect species name.\n";
$_SESSION['error_msg'].= _("Error, incorrect species name.");
}
if (isset($_POST['subspecies']))
{
@ -163,49 +164,49 @@ if (isset($_POST['submit']))
setcookie('license', $_SESSION['observation']['license'], time() + 86400 * 365.2, "/");
} else
{
$_SESSION['error_msg'] .= "Incorrect license\n";
$_SESSION['error_msg'] .= _("Incorrect license");
}
if (isset($_POST['name']))
{
$_SESSION['observation']['recordist-name'] = $_POST['name'];
setcookie('name', $_SESSION['observation']['recordist-name'], time() + 86400 * 365.2, "/");
} else {
$_SESSION['error_msg'] .= "Incorrect Recordist Name.\n";
$_SESSION['error_msg'] .= _("Incorrect Recordist Name.");
}
if (isset($_POST['loc-country']))
{
$_SESSION['observation']['country'] = $_POST['loc-country'];
} else
{
$_SESSION['error_msg'] .= "Incorrect Country. \n";
$_SESSION['error_msg'] .= _("Incorrect Country. ");
}
if (isset($_POST['recording-date']))
{
$_SESSION['observation']['date'] = $_POST['recording-date'];
} else
{
$_SESSION['error_msg'] .= "Incorrect date. \n";
$_SESSION['error_msg'] .= _("Incorrect date.");
}
if (isset($_POST['recording-time']))
{
$_SESSION['observation']['time'] = $_POST['recording-time'];
} else
{
$_SESSION['error_msg'] .= "Incorrect time. \n";
$_SESSION['error_msg'] .= _("Incorrect time.");
}
if (isset($_POST['sound-type-option']))
{
$_SESSION['observation']['type'] = $_POST['sound-type-option'];
} else
{
$_SESSION['error_msg'] .= "Incorrect sound type. \n";
$_SESSION['error_msg'] .= _("Incorrect sound type.");
}
if (isset($_POST['quality']))
{
$_SESSION['observation']['quality'] = $_POST['quality'];
} else
{
$_SESSION['error_msg'] .= "Incorrect quality value.\n";
$_SESSION['error_msg'] .= _("Incorrect quality value.");
}
if (isset($_POST['remarks']))
{
@ -233,7 +234,7 @@ if (isset($_POST['submit']))
$_SESSION['observation']['time_expansion'] = $_POST['time_expansion'];
}
} else {
$_SESSION['error_msg'] = "Form not submitted.\n";
$_SESSION['error_msg'] = _("Form not submitted.");
}
if ($_SESSION['error_msg'] == "") {

File diff suppressed because one or more lines are too long

150
totranslate.txt Normal file
View File

@ -0,0 +1,150 @@
./public/index.php
./public/menu.php
./public/header.php
./public/footer.php
./public/forum/index.php
./public/forum/categories.php
./public/forum/createcategory.php
./public/forum/newtopic.php
./public/forum/createtopic.php
./public/forum/topics/index.php
./public/forum/topics/topics.php
./public/forum/topics/sendreply.php
./public/upload/index.php
./public/upload/location.php
./public/upload/metadata.php
./public/upload/verify.php
./public/upload/submitlocation.php
./public/upload/submitobservation.php
./public/upload/submitmetadata.php
./public/upload/getspecieshint.php
./public/upload/upload.php
./public/upload/submit.php
./public/gallery/index.php
./public/gallery/upload.php
./public/gallery/gallery.php
./public/auth/login/index.php
./public/auth/login/login.php
./public/auth/register/index.php
./public/auth/register/register.php
./public/auth/index.php
./public/database/credentials.php
./public/home/last-uploaded-file.php
./public/home/status.php
./public/vendor/erusev/parsedown/Parsedown.php
./public/vendor/composer/installed.php
./public/vendor/composer/InstalledVersions.php
./public/vendor/composer/autoload_namespaces.php
./public/vendor/composer/autoload_psr4.php
./public/vendor/composer/autoload_classmap.php
./public/vendor/composer/autoload_static.php
./public/vendor/composer/platform_check.php
./public/vendor/composer/autoload_real.php
./public/vendor/composer/ClassLoader.php
./public/vendor/autoload.php
./public/vendor/phpmailer/phpmailer/get_oauth_token.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ba.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-eo.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-gl.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-hy.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-uk.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php
./public/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php
./public/vendor/phpmailer/phpmailer/src/Exception.php
./public/vendor/phpmailer/phpmailer/src/OAuth.php
./public/vendor/phpmailer/phpmailer/src/PHPMailer.php
./public/vendor/phpmailer/phpmailer/src/POP3.php
./public/vendor/phpmailer/phpmailer/src/SMTP.php
./public/src/dump_taxref_into_database.php
./public/explore/mysteries/index.php
./public/explore/spectrograms/index.php
./public/explore/index.php
./public/explore/search/index.php
./public/explore/search/searchrecord.php
./public/explore/random/index.php
./public/explore/map/index.php
./public/explore/taxa/index.php
./public/explore/list/index.php
./public/explore/guano/index.php
./public/explore/users/index.php
./public/explore/record/index.php
./public/explore/record/edit/index.php
./public/explore/record/edit/update.php
./public/about/index.php
./public/contact/index.php
./public/contact/sendmail.php
./public/contact/config.php
./public/api/v1/doc/index.php
./public/api/v1/records/index.php
./public/api/v1/records/insertion/index.php
./public/api/v1/oauth2/index.php
./public/api/v1/oauth2/oauth2client.php
./public/api/v1/index.php
./public/api/index.php
./public/search/searchbar.php
./public/search/index.php
./public/analytics/matomo.php
./public/analytics/owa.php
./public/articles/index.php
./public/articles/Article.php
./public/articles/config.php
./public/articles/home.php
./public/articles/archive.php
./public/articles/view.php
./public/articles/admin.php
./public/articles/list.php
./public/articles/edit.php
./public/larynx/index.php
./public/larynx/v/2.0/index.php
./public/larynx/v/2.1/index.php
./public/discussion/messages/index.php
./public/discussion/messages/sendmessage.php
./public/discussion/notification.php
./public/discussion/index.php
./public/lang/en/lang.php
./public/lang/gettext.php
./public/lang/select.php

4
translate.sh Normal file
View File

@ -0,0 +1,4 @@
# Generate php file list
find -name *.php > totranslate.txt
# Generate translation template
xgettext -f totranslate.txt -o public/lang/locale/chiro-canto.pot