Translations

This commit is contained in:
Matteo Gheza 2020-07-03 11:33:29 +02:00
parent 384f0b0bd9
commit ca148c3339
15 changed files with 168 additions and 238 deletions

View File

@ -316,17 +316,17 @@ function vero1($text, $img1 = "", $img2 = ""){
//var_dump($risultato);
foreach($risultato as $row){
$name = ($row['online']==1) ? '<u>' . $row['name'] . "</u>" : $row['name'];
echo("<h1>Dati anagrafici <b>$name</b></h1><br><br>");
echo("<h1>".t("Personal data",false)." <b>$name</b></h1><br><br>");
echo('<img alt="VVF" src="./risorse/images/distaccamento.png" width="150" class="img-resposive"><br><br><br>');
$disp = vero1($row['avaible'], "<i class='fa fa-check' style='color:green' width='22px'></i>", "<i class='fa fa-times' style='color:red' width='22px'></i>");
$caposquadra = vero1($row['caposquadra'], "<img src='./risorse/images/cascoRosso.png' width='22px'>", "<img src='./risorse/images/cascoNero.png' width='22px'>");
$autista = vero1($row['autista'], "<img src='./risorse/images/volante.png' width='22px'>");
echo("<p>name: <b>$name</b></p><br>");
echo("<p>Disponibilità: <b>{$disp}</b></p><br>");
echo("<p>Caposquadra: <b>{$caposquadra}</b></p><br>");
echo("<p>Autista: <b>{$autista}</b></p><br>");
echo("<p>Numero di telefono <i class='fa fa-phone' style='color:green' width='22px'></i>: <b><a href='tel:{$row['telefono']}'>{$row['telefono']}</a></b></p><br>");
echo("<p>Minuti di disponibilità <br>(Questo mese) <i class='demo-icon icon-hourglass'></i>: <b>{$row['minuti_dispo']} minuti</b></p><br>");
echo("<p>Interventi svolti: <b>{$row['interventi']}</b></p><br>");
echo("<p>".t("Name",false).": <b>$name</b></p><br>");
echo("<p>".t("Avaible",false).": <b>{$disp}</b></p><br>");
echo("<p>".t("Foreman",false).": <b>{$caposquadra}</b></p><br>");
echo("<p>".t("Driver",false).": <b>{$autista}</b></p><br>");
echo("<p>".t("Phone number",false)." <i class='fa fa-phone' style='color:green' width='22px'></i>: <b><a href='tel:{$row['telefono']}'>{$row['telefono']}</a></b></p><br>");
echo("<p>".t("Availability Minutes",false)." <br>(".t("This week",false).") <i class='demo-icon icon-hourglass'></i>: <b>{$row['minuti_dispo']} minuti</b></p><br>");
echo("<p>".t("Services",false).": <b>{$row['interventi']}</b></p><br>");
}
?>

View File

@ -69,16 +69,16 @@ $risultato = $database->exec("SELECT * FROM `%PREFIX%_esercitazioni` ORDER BY da
<table id="esercitazioni" cellspacing='0' class="display table table-striped table-bordered dt-responsive nowrap" style="width: 90%; text-align:center;">
<thead>
<tr>
<th>Data</th>
<th>Name</th>
<th>Ora inizio</th>
<th>Ora fine</th>
<th>Capo</th>
<th>Personale</th>
<th>Luogo</th>
<th>Note</th>
<?php if($impostazioni['modifica']) { echo "<th>Modifica</th>"; } ?>
<?php if($impostazioni['elimina']) { echo "<th>Elimina</th>"; } ?>
<th><?php t("Date"); ?></th>
<th><?php t("Name"); ?></th>
<th><?php t("Start time"); ?></th>
<th><?php t("End time"); ?></th>
<th><?php t("Foreman"); ?></th>
<th><?php t("People"); ?></th>
<th><?php t("Place"); ?></th>
<th><?php t("Notes"); ?></th>
<?php if($impostazioni['modifica']) { echo "<th>".t("Edit", false)."</th>"; } ?>
<?php if($impostazioni['elimina']) { echo "<th>".t("Remove", false)."</th>"; } ?>
</tr>
</thead>
<tbody>

View File

@ -69,18 +69,18 @@ $risultato = $database->exec("SELECT * FROM `%PREFIX%_interventi` ORDER BY data
<table id="interventi" cellspacing='0' class="display table table-striped table-bordered dt-responsive nowrap" style="width: 90%; text-align:center;">
<thead>
<tr>
<th>Data</th>
<th>Codice</th>
<th>Uscita</th>
<th>Rientro</th>
<th>Caposquadra</th>
<th>Autisti</th>
<th>Personale</th>
<th>Luogo</th>
<th>Note</th>
<th>Tipo</th>
<?php if($impostazioni['modifica']) { echo "<th>Modifica</th>"; } ?>
<?php if($impostazioni['elimina']) { echo "<th>Elimina</th>"; } ?>
<th><?php t("Date"); ?></th>
<th><?php t("Code"); ?></th>
<th><?php t("Start time"); ?></th>
<th><?php t("End time"); ?></th>
<th><?php t("Foreman"); ?></th>
<th><?php t("Drivers"); ?></th>
<th><?php t("People"); ?></th>
<th><?php t("Place"); ?></th>
<th><?php t("Notes"); ?></th>
<th><?php t("Type"); ?></th>
<?php if($impostazioni['modifica']) { echo "<th>".t("Edit", false)."</th>"; } ?>
<?php if($impostazioni['elimina']) { echo "<th>".t("Remove", false)."</th>"; } ?>
</tr>
</thead>
<tbody>

View File

@ -44,7 +44,7 @@ th, td {
<th><?php t("Call"); ?></th>
<th><?php t("Write"); ?></th>
<th><?php t("Services"); ?></th>
<th><?php t("Minuti Disponibilità"); ?></th>
<th><?php t("Availability Minutes"); ?></th>
<th><?php t("Other"); ?></th>
<?php
foreach($risultato as $row){
@ -89,7 +89,7 @@ th, td {
$interventi = $row['interventi'];
$minuti = $row['minuti_dispo'];
$u = 'anagrafica.php?user=' . str_replace(' ', '_', urldecode(strtolower($row["id"])));
echo "<td>$interventi</td><td>$minuti</td><td><a href='$u'><p>Altri dettagli</p></a></td></tr>";
echo "<td>$interventi</td><td>$minuti</td><td><a href='$u'><p>".t("Others infos",false)."</p></a></td></tr>";
}
}
?>

View File

@ -71,10 +71,10 @@ select::-ms-expand {
<table style="width: 90%; text-align:center;">
<thead>
<tr>
<th>Azione</th>
<th>Interessato</th>
<th>Fatto da</th>
<th>Ora</th>
<th><?php t("Action"); ?></th>
<th><?php t("Interested"); ?></th>
<th><?php t("Made by"); ?></th>
<th><?php t("Datetime"); ?></th>
</tr>
</thead>
<tbody>

View File

@ -204,96 +204,26 @@ textarea {
}
</style>
<body>
{% if esercitazione.modalità == "add" %}
{% if esercitazione.modalità == "modifica" or esercitazione.modalità == "add" %}
<form method="post">
<div class="container">
<label><b>Giorno dell' esercitazione</b></label>
<input autocomplete="off" class="datepicker" name="data" placeholder="DD/MM/YYY" type="text">
<br>
<br>
<label><b>Name</b></label>
<input id="name" type="text" name="name" placeholder="1234/5" required>
<br>
<br>
<label><b>Ora inizio</b></label>
<input type="time" name="start_time" required>
<br>
<br>
<label><b>Ora fine</b></label>
<input type="time" name="end_time" required>
<br>
<br>
<label><b>Caposquadra</b></label>
<br>
{% for user in esercitazione.personale %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
<label>
<input type="checkbox" name='capo' value='{{ user.id }}'>
<span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span>
{{ user.name }}
</label>
</div>
{% endfor %}
<script>
$('input[name="capo"]').on('change', function() {
$('input[name="' + this.name + '"]').not(this).prop('checked', false);
});
</script>
<br>
<label><b>Altro personale</b></label>
<br>
{% for user in esercitazione.personale %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
<label>
<input type="checkbox" name='personale[]' value='{{ user.id }}'>
<span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span>
{{ user.name }}
</label>
</div>
{% endfor %}
<br>
<label><b>Luogo dell' esercitazione</b></label>
<input type="text" name="luogo" required>
<br>
<br>
<label><b>Altre note (es. via o info)</b></label><br>
<textarea name='note'></textarea>
<br>
<br>
<input id="modalità" type="hidden" value="add" name="mod"></input>
<input id="token" type="hidden" value="{{ esercitazione.token }}" name="token"></input>
<button type="submit">invia</button>
</div>
</form>
<script>
$('form').submit(function () {
if(!$('#token').val().endsWith("dJN299u49")){
$('#token').val($('#token').val() + "");
}
return true;
});
</script>
{% endif %}
{% if esercitazione.modalità == "modifica" %}
<form method="post">
<div class="container">
<label><b>Giorno dell' esercitazione</b></label>
<label><b>{{ 'Training day'|t }}</b></label>
<input autocomplete="off" class="datepicker" name="data" placeholder="DD/MM/YYY" type="text" value="{{ values.data }}">
<br>
<br>
<label><b>Name</b></label>
<label><b>{{ 'Name'|t }}</b></label>
<input id="name" type="text" name="name" placeholder="1° esercitazione" required value="{{ values.name }}">
<br>
<br>
<label><b>Ora inizio</b></label>
<label><b>{{ 'Start time'|t }}</b></label>
<input type="time" name="start_time" required value="{{ values.inizio }}">
<br>
<br>
<label><b>Ora fine</b></label>
<label><b>{{ 'End time'|t }}</b></label>
<input type="time" name="end_time" required value="{{ values.fine }}">
<br>
<br>
<label><b>Caposquadra</b></label>
<label><b>{{ 'Foreman'|t }}</b></label>
<br>
{% for user in esercitazione.personale %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
@ -310,7 +240,7 @@ $('form').submit(function () {
});
</script>
<br>
<label><b>Altro personale</b></label>
<label><b>{{ 'Others people'|t }}</b></label>
<br>
{% for user in esercitazione.personale %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
@ -322,21 +252,22 @@ $('form').submit(function () {
</div>
{% endfor %}
<br>
<label><b>Luogo dell' esercitazione</b></label>
<label><b>{{ 'Training place'|t }}</b></label>
<input type="text" name="luogo" required value="{{ values.luogo }}">
<br>
<br>
<label><b>Altre note (es. via o info)</b></label><br>
<label><b>{{ 'Others notes (ex. others infos)'|t }}</b></label><br>
<textarea name='note'></textarea>
<br>
<br>
<input id="modalità" type="hidden" value="modifica" name="mod"></input>
<input id="modalità" type="hidden" value="{{ intervento.modalità }}" name="mod"></input>
<input id="id" type="hidden" value="{{ esercitazione.id }}" name="id"></input>
<input id="token" type="hidden" value="{{ esercitazione.token }}" name="token"></input>
<button type="submit">invia</button>
<button type="submit">{{ 'Submit'|t }}</button>
</div>
</form>
<script>
//No js Visual Studio Code errors {% if intervento.modalità == "modifica" %}
$.each('{{ values.capo|striptags|e("js") }}'.split(','), function( index, value ) {
$('.capo-'+value).prop('checked', true);
});
@ -344,6 +275,7 @@ $.each('{{ values.personale|striptags|e("js") }}'.split(','), function( index, v
$('.personale-'+value).prop('checked', true);
});
$('#note').val('{{ values.note|e("js") }}');
//{% endif %}
$('form').submit(function () {
if(!$('#token').val().endsWith("dJN299u49")){
$('#token').val($('#token').val() + "");
@ -367,17 +299,17 @@ $('form').submit(function () {
}
</style>
<div style="margin: 0 auto; text-align: center">
<p>Sei sicuro di voler eliminare l' esercitazione?</p>
<p>{{ 'Are you sure you want to delete the training?'|t }}</p>
<form method="post">
<input id="modalità" type="hidden" value="elimina" name="mod"></input>
<input id="token" type="hidden" value="{{ esercitazione.token }}" name="token"></input>
<input id="id" type="hidden" value="{{ esercitazione.id }}" name="id"></input>
<input id="incrementa" type="hidden" value="{{ incrementa }}" name="incrementa"></input>
<button id="add" type="submit">invia</button>
<button id="add" type="submit">{{ 'Submit'|t }}</button>
</form>
<script>
$('form').submit(function () {
return confirm("L'azione non può essere annullata. Sei sicuro di voler continuare?");
return confirm("{{ 'The action cannot be canceled. Are you sure you want to continue?'|t }}");
});
</script>
</div>

View File

@ -204,125 +204,26 @@ textarea {
}
</style>
<body>
{% if intervento.modalità == "add" %}
{% if intervento.modalità == "modifica" or intervento.modalità == "add" %}
<form method="post">
<div class="container">
<label><b>Giorno dell' intervento</b></label>
<input autocomplete="off" class="datepicker" name="data" placeholder="DD/MM/YYY" type="text">
<br>
<br>
<label><b>Progressivo</b></label>
<input id="progressivo" type="text" name="codice" placeholder="1234/5" required>
<br>
<br>
<label><b>Ora di uscita</b></label>
<input type="time" name="uscita" required>
<br>
<br>
<label><b>Ora di rientro</b></label>
<input type="time" name="rientro" required>
<br>
<br>
<label><b>Caposquadra</b></label>
<br>
{% for user in intervento.personale %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
<label>
<input type="checkbox" name='capo' value='{{ user.id }}'>
<span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span>
{{ user.name }}
</label>
</div>
{% endfor %}
<script>
$('input[name="capo"]').on('change', function() {
$('input[name="' + this.name + '"]').not(this).prop('checked', false);
});
</script>
<br>
<label><b>Autisti</b></label>
<br>
{% for user in intervento.personale %}
{% if user.autista == 1 %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
<label>
<input type="checkbox" name='autisti[]' value='{{ user.id }}'>
<span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span>
{{ user.name }}
</label>
</div>
{% endif %}
{% endfor %}
<br>
<label><b>Altro personale</b></label>
<br>
{% for user in intervento.personale %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
<label>
<input type="checkbox" name='personale[]' value='{{ user.id }}'>
<span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span>
{{ user.name }}
</label>
</div>
{% endfor %}
<br>
<label><b>Luogo dell' intervento</b></label>
<input type="text" name="luogo" required>
<br>
<br>
<label><b>Altre note (es. via o info)</b></label><br>
<textarea name='note'></textarea>
<br>
<br>
<label><b>Tipo di intervento</b></label>
<br>
<select name='tipo'>
{% for tipo in intervento.tipologie %}
<option value='{{ tipo.name }}'>{{ tipo.name }}</option>
{% endfor %}
</select>
<br>
<input id="modalità" type="hidden" value="add" name="mod"></input>
<input id="token" type="hidden" value="{{ intervento.token }}" name="token"></input>
<button type="submit">invia</button>
</div>
</form>
<script>
$('form').submit(function () {
if(!$('#token').val().endsWith("dJN299u49")){
$('#token').val($('#token').val() + "");
}
var progressivo_valido = /^[0-9/]{3,6}$/
var progressivo = $('#progressivo').val();
if(!progressivo_valido.test(progressivo)){
var invia_progressivo = confirm("Il codice progressivo è stato rilevato come incorretto, vuoi aggiungere comunque l' intervento?");
} else {
var invia_progressivo = true;
}
return invia_progressivo;
});
</script>
{% endif %}
{% if intervento.modalità == "modifica" %}
<form method="post">
<div class="container">
<label><b>Giorno dell' intervento</b></label>
<label><b>{{ 'Service day'|t }}</b></label>
<input autocomplete="off" class="datepicker" name="data" placeholder="DD/MM/YYY" type="text" value="{{ values.data }}">
<br>
<br>
<label><b>Progressivo</b></label>
<label><b>{{ 'Code'|t }}</b></label>
<input id="progressivo" type="text" name="codice" placeholder="1234/5" required value="{{ values.codice }}">
<br>
<br>
<label><b>Ora di uscita</b></label>
<label><b>{{ 'Start time'|t }}</b></label>
<input type="time" name="uscita" required value="{{ values.uscita }}">
<br>
<br>
<label><b>Ora di rientro</b></label>
<label><b>{{ 'End time'|t }}</b></label>
<input type="time" name="rientro" required value="{{ values.rientro }}">
<br>
<br>
<label><b>Caposquadra</b></label>
<label><b>{{ 'Foreman'|t }}</b></label>
<br>
{% for user in intervento.personale %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
@ -339,7 +240,7 @@ $('form').submit(function () {
});
</script>
<br>
<label><b>Autisti</b></label>
<label><b>{{ 'Drivers'|t }}</b></label>
<br>
{% for user in intervento.personale %}
{% if user.autista == 1 %}
@ -353,7 +254,7 @@ $('form').submit(function () {
{% endif %}
{% endfor %}
<br>
<label><b>Altro personale</b></label>
<label><b>{{ 'Others people'|t }}</b></label>
<br>
{% for user in intervento.personale %}
<div {{ user.name == "test" ? "style='display: none'" : "" }} class="checkbox">
@ -365,15 +266,15 @@ $('form').submit(function () {
</div>
{% endfor %}
<br>
<label><b>Luogo dell' intervento</b></label>
<label><b>{{ 'Service place'|t }}</b></label>
<input type="text" name="luogo" required value="{{ values.luogo }}">
<br>
<br>
<label><b>Altre note (es. via o info)</b></label><br>
<label><b>{{ 'Others notes (ex. others infos)'|t }}</b></label><br>
<textarea name='note' id='note'></textarea>
<br>
<br>
<label><b>Tipo di intervento</b></label>
<label><b>{{ 'Service type'|t }}</b></label>
<br>
<select name='tipo' class="tipi">
{% for tipo in intervento.tipologie %}
@ -381,13 +282,14 @@ $('form').submit(function () {
{% endfor %}
</select>
<br>
<input id="modalità" type="hidden" value="modifica" name="mod"></input>
<input id="modalità" type="hidden" value="{{ intervento.modalità }}" name="mod"></input>
<input id="token" type="hidden" value="{{ intervento.token }}" name="token"></input>
<input id="id" type="hidden" value="{{ intervento.id }}" name="id"></input>
<button type="submit">invia</button>
<button type="submit">{{ 'Submit'|t }}</button>
</div>
</form>
<script>
//No js Visual Studio Code errors {% if intervento.modalità == "modifica" %}
$.each('{{ values.capo }}'.split(','), function( index, value ) {
$('.capo-'+value).prop('checked', true);
});
@ -399,6 +301,7 @@ $.each('{{ values.personale }}'.split(','), function( index, value ) {
});
$( ".tipi" ).val('{{ values.tipo }}');
$('#note').val('{{ values.note }}');
//{% endif %}
$('form').submit(function () {
if(!$('#token').val().endsWith("dJN299u49")){
$('#token').val($('#token').val() + "");
@ -406,7 +309,7 @@ $('form').submit(function () {
var progressivo_valido = /^[0-9/]{3,6}$/
var progressivo = $('#progressivo').val();
if(!progressivo_valido.test(progressivo)){
var invia_progressivo = confirm("Il codice progressivo è stato rilevato come incorretto, vuoi aggiungere comunque l' intervento?");
var invia_progressivo = confirm("{{ 'The code has been detected as incorrect, do you want to add the service anyway?'|t }}");
} else {
var invia_progressivo = true;
}
@ -429,17 +332,17 @@ $('form').submit(function () {
}
</style>
<div style="margin: 0 auto; text-align: center">
<p>Sei sicuro di voler eliminare l' intervento?</p>
<p>{{ 'Are you sure you want to delete the service?'|t }}</p>
<form method="post">
<input id="modalità" type="hidden" value="elimina" name="mod"></input>
<input id="token" type="hidden" value="{{ intervento.token }}" name="token"></input>
<input id="id" type="hidden" value="{{ intervento.id }}" name="id"></input>
<input id="incrementa" type="hidden" value="{{ incrementa }}" name="incrementa"></input>
<button id="add" type="submit">invia</button>
<button id="add" type="submit">{{ 'Submit'|t }}</button>
</form>
<script>
$('form').submit(function () {
return confirm("L'azione non può essere annullata. Sei sicuro di voler continuare?");
return confirm("{{ 'The action cannot be canceled. Are you sure you want to continue?'|t }}");
});
</script>
</div>

View File

@ -0,0 +1,14 @@
<?php
// Translated by: Name Surname (github, email or another social profile url/username)
return [
"Personal data" => "Personal data",
"Name" => "Name",
"Avaible" => "Avaible",
"Foreman" => "Foreman",
"Driver" => "Driver",
"Phone number" => "Phone number",
"Availability Minutes" => "Availability Minutes",
"This week" => "This week",
"Services" => "Services"
];

View File

@ -0,0 +1,15 @@
<?php
// Translated by: Name Surname (github, email or another social profile url/username)
return [
"Date" => "Date",
"Name" => "Name",
"Start time" => "Start time",
"End time" => "End time",
"Foreman" => "Foreman",
"People" => "People",
"Place" => "Place",
"Notes" => "Notes",
"Edit" => "Edit",
"Remove" => "Remove"
];

View File

@ -0,0 +1,17 @@
<?php
// Translated by: Name Surname (github, email or another social profile url/username)
return [
"Date" => "Date",
"Code" => "Code",
"Start time" => "Start time",
"End time" => "End time",
"Foreman" => "Foreman",
"Drivers" => "Drivers",
"People" => "People",
"Place" => "Place",
"Notes" => "Notes",
"Type" => "Type",
"Edit" => "Edit",
"Remove" => "Remove"
];

View File

@ -8,6 +8,7 @@ return [
"Call" => "Call",
"Write" => "Write",
"Services" => "Services",
"Minuti Disponibilità" => "Minuti Disponibilità",
"Other" => "Other"
"Availability Minutes" => "Availability Minutes",
"Other" => "Other",
"Others infos" => "Others infos"
];

View File

@ -0,0 +1,9 @@
<?php
// Translated by: Name Surname (github, email or another social profile url/username)
return [
"Action" => "Action",
"Interested" => "Interested",
"Made by" => "Made by",
"Datetime" => "Datetime"
];

View File

@ -0,0 +1,4 @@
<?php
// Translated by: Name Surname (github, email or another social profile url/username)
return [];

View File

@ -0,0 +1,16 @@
<?php
// Translated by: Name Surname (github, email or another social profile url/username)
return [
"Training day" => "Training day",
"Name" => "Name",
"Start time" => "Start time",
"End time" => "End time",
"Foreman" => "Foreman",
"Others people" => "Others people",
"Training place" => "Training place",
"Others notes (ex. others infos)" => "Others notes (ex. others infos)",
"Submit" => "Submit",
"Are you sure you want to delete the training?" => "Are you sure you want to delete the training?",
"The action cannot be canceled. Are you sure you want to continue?" => "The action cannot be canceled. Are you sure you want to continue?"
];

View File

@ -0,0 +1,19 @@
<?php
// Translated by: Name Surname (github, email or another social profile url/username)
return [
"Service day" => "Service day",
"Code" => "Code",
"Start time" => "Start time",
"End time" => "End time",
"Foreman" => "Foreman",
"Drivers" => "Drivers",
"Others people" => "Others people",
"Service place" => "Service place",
"Others notes (ex. others infos)" => "Others notes (ex. others infos)",
"Service type" => "Service type",
"Submit" => "Submit",
"The code has been detected as incorrect, do you want to add the service anyway?" => "The code has been detected as incorrect, do you want to add the service anyway?",
"Are you sure you want to delete the service?" => "Are you sure you want to delete the service?",
"The action cannot be canceled. Are you sure you want to continue?" => "The action cannot be canceled. Are you sure you want to continue?"
];