suppresion des textes 'à traduire' + corr de 2 bugs

This commit is contained in:
quenenni 2017-08-18 15:32:16 +02:00
parent 5e0d4e8dc7
commit f92f92d34e
16 changed files with 43 additions and 40 deletions

View File

@ -678,7 +678,7 @@ class m_aws {
return false; return false;
} }
if (!preg_match('/^[0-9a-z_-]*$/', $postfix)){ if (!preg_match('/^[0-9a-z_-]*$/', $postfix)){
$msg->raise('Error', "aws", _("There is some forbidden characters in the login (only A-Z 0-9 _ and - are allowed)")); // à traduire $msg->raise('Error', "aws", _("There is some forbidden characters in the login (only A-Z 0-9 _ and - are allowed)"));
return false; return false;
} }
return $login; return $login;

View File

@ -15,7 +15,7 @@ getFields($fields);
if (!empty($delete_id)) { if (!empty($delete_id)) {
if (! $authip->ip_delete($delete_id)) { if (! $authip->ip_delete($delete_id)) {
$msg->raise('Error', "admin", _("Error during deletion")); // à traduire $msg->raise('Error', "admin", _("Error during deletion"));
} }
} }

View File

@ -71,13 +71,13 @@ if (!empty($formu) && $formu) {
switch ($formu) { switch ($formu) {
case 1: // Create the folder $R.$nomfich case 1: // Create the folder $R.$nomfich
if ($bro->CreateDir($R,$nomfich)) { if ($bro->CreateDir($R,$nomfich)) {
$msg->raise("Ok", "bro", _("The folder '%s' was successfully created"), $nomfich); // à traduire $msg->raise("Ok", "bro", _("The folder '%s' was successfully created"), $nomfich);
} }
$p=$bro->GetPrefs(); $p=$bro->GetPrefs();
break; break;
case 6: // Create the file $R.$nomfich case 6: // Create the file $R.$nomfich
if ($bro->CreateFile($R,$nomfich)) { if ($bro->CreateFile($R,$nomfich)) {
$msg->raise("Ok", "bro", _("The file '%s' was successfully created"), $nomfich); // à traduire $msg->raise("Ok", "bro", _("The file '%s' was successfully created"), $nomfich);
} }
$p=$bro->GetPrefs(); $p=$bro->GetPrefs();
if ($p["createfile"]==1) { if ($p["createfile"]==1) {
@ -92,9 +92,9 @@ if (!empty($formu) && $formu) {
if ($bro->DeleteFile($d,$R)) { if ($bro->DeleteFile($d,$R)) {
foreach ($d as $v) { foreach ($d as $v) {
if (is_dir($absolute . "/" . $v)) if (is_dir($absolute . "/" . $v))
$msg->raise("Ok", "bro", _("The folder '%s' was successfully deleted"), $v); // à traduire $msg->raise("Ok", "bro", _("The folder '%s' was successfully deleted"), $v);
else else
$msg->raise("Ok", "bro", _("The file '%s' was successfully deleted"), $v); // à traduire $msg->raise("Ok", "bro", _("The file '%s' was successfully deleted"), $v);
} }
} }
} elseif (empty($cancel) && is_array($d)) { } elseif (empty($cancel) && is_array($d)) {
@ -128,22 +128,22 @@ if (!empty($formu) && $formu) {
if ($bro->CopyFile($d,$R,$actmoveto)) { if ($bro->CopyFile($d,$R,$actmoveto)) {
if (count($d) == 1) { if (count($d) == 1) {
if (is_dir($absolute . "/" . $d[0])) if (is_dir($absolute . "/" . $d[0]))
$msg->raise("Ok", "bro", _("The folder '%s' was successfully copied to '%s'"), array($d[0], $actmoveto)); // à traduire $msg->raise("Ok", "bro", _("The folder '%s' was successfully copied to '%s'"), array($d[0], $actmoveto));
else else
$msg->raise("Ok", "bro", _("The file '%s' was successfully copied to '%s'"), array($d[0], $actmoveto)); // à traduire $msg->raise("Ok", "bro", _("The file '%s' was successfully copied to '%s'"), array($d[0], $actmoveto));
} else } else
$msg->raise("Ok", "bro", _("The files / folders were successfully copied")); // à traduire $msg->raise("Ok", "bro", _("The files / folders were successfully copied"));
} }
} }
if ($actmove) { if ($actmove) {
if ($bro->MoveFile($d,$R,$actmoveto)) { if ($bro->MoveFile($d,$R,$actmoveto)) {
if (count($d) == 1) { if (count($d) == 1) {
if (is_dir($absolute . "/" . $d[0])) if (is_dir($absolute . "/" . $d[0]))
$msg->raise("Ok", "bro", _("The folder '%s' was successfully moved to '%s'"), array($d[0], $actmoveto)); // à traduire $msg->raise("Ok", "bro", _("The folder '%s' was successfully moved to '%s'"), array($d[0], $actmoveto));
else else
$msg->raise("Ok", "bro", _("The file '%s' was successfully moved to '%s'"), array($d[0], $actmoveto)); // à traduire $msg->raise("Ok", "bro", _("The file '%s' was successfully moved to '%s'"), array($d[0], $actmoveto));
} else } else
$msg->raise("Ok", "bro", _("The files / folders were successfully moved")); // à traduire $msg->raise("Ok", "bro", _("The files / folders were successfully moved"));
} }
} }
break; break;
@ -151,21 +151,21 @@ if (!empty($formu) && $formu) {
if ($bro->RenameFile($R,$o,$d)) { // Rename $R (directory) $o (old) $d (new) names if ($bro->RenameFile($R,$o,$d)) { // Rename $R (directory) $o (old) $d (new) names
if (count($d) == 1) { if (count($d) == 1) {
if (is_dir($absolute . "/" . $d[0])) if (is_dir($absolute . "/" . $d[0]))
$msg->raise("Ok", "bro", _("The folder '%s' was successfully renamed to '%s'"), array($o[0], $d[0])); // à traduire $msg->raise("Ok", "bro", _("The folder '%s' was successfully renamed to '%s'"), array($o[0], $d[0]));
else else
$msg->raise("Ok", "bro", _("The file '%s' was successfully renamed to '%s'"), array($o[0], $d[0])); // à traduire $msg->raise("Ok", "bro", _("The file '%s' was successfully renamed to '%s'"), array($o[0], $d[0]));
} else } else
$msg->raise("Ok", "bro", _("The files / folders were successfully renamed")); // à traduire $msg->raise("Ok", "bro", _("The files / folders were successfully renamed"));
} }
break; break;
case 3: // Upload de fichier... case 3: // Upload de fichier...
if ($bro->UploadFile($R)) { if ($bro->UploadFile($R)) {
$msg->raise("Ok", "bro", _("The file '%s' was successfully uploaded"), $_FILES['userfile']['name']); // à traduire $msg->raise("Ok", "bro", _("The file '%s' was successfully uploaded"), $_FILES['userfile']['name']);
} }
break; break;
case 7: // Changement de permissions [ML] case 7: // Changement de permissions [ML]
if ($bro->ChangePermissions($R, $d)) { if ($bro->ChangePermissions($R, $d)) {
$msg->raise("Ok", "bro", _("The permissions were successfully set")); // à traduire $msg->raise("Ok", "bro", _("The permissions were successfully set"));
} }
break; break;
} }
@ -173,7 +173,7 @@ if (!empty($formu) && $formu) {
if (isset($actextract) && $actextract) { if (isset($actextract) && $actextract) {
if ($bro->ExtractFile($R. '/' . $fileextract, $R)) { if ($bro->ExtractFile($R. '/' . $fileextract, $R)) {
$msg->raise("Ok", "bro", _("The extraction of the file '%s' was successfull"), $fileextract); // à traduire $msg->raise("Ok", "bro", _("The extraction of the file '%s' was successfull"), $fileextract);
} }
} }

View File

@ -42,7 +42,7 @@ if(empty($dir)) {
$is_include=true; $is_include=true;
include("hta_add.php"); include("hta_add.php");
} else { } else {
$msg->raise("Ok", "hta", _("Folder %s is protected"), $dir); // à traduire $msg->raise("Ok", "hta", _("Folder %s is protected"), $dir);
include("hta_list.php"); include("hta_list.php");
} }
?> ?>

View File

@ -46,7 +46,7 @@ if ($password != $passwordconf) {
if (!$hta->add_user($user, $password, $dir)) { if (!$hta->add_user($user, $password, $dir)) {
include ("hta_adduser.php"); include ("hta_adduser.php");
} else { } else {
$msg->raise("Ok", "hta", _("The user %s was added to th protected folder %s"), array($user, $dir)); // à traduire $msg->raise("Ok", "hta", _("The user %s was added to th protected folder %s"), array($user, $dir));
include ("hta_edit.php"); include ("hta_edit.php");
} }
?> ?>

View File

@ -40,7 +40,7 @@ if (!empty($confirm_del)) {
reset($d); reset($d);
if ($hta->del_user($d,$dir)) { if ($hta->del_user($d,$dir)) {
foreach ($d as $v) { foreach ($d as $v) {
$msg->raise("Ok", "hta", _("The user '%s' was successfully deleted"), $v); // à traduire $msg->raise("Ok", "hta", _("The user '%s' was successfully deleted"), $v);
} }
} }
$is_include=true; $is_include=true;

View File

@ -20,25 +20,25 @@ if (!empty($s_protocol)) {
getFields($fields); getFields($fields);
if (! $authip->ip_affected_save($s_ipsub, $s_protocol, $$val) ) { if (! $authip->ip_affected_save($s_ipsub, $s_protocol, $$val) ) {
$msg->raise('Error', "ftp", _("Error during ip_affected_save")); // à traduire $msg->raise('Error', "ftp", _("Error during ip_affected_save"));
} }
} }
if (!empty($delete_affected_id)) { if (!empty($delete_affected_id)) {
if (! $authip->ip_affected_delete($delete_affected_id)) { if (! $authip->ip_affected_delete($delete_affected_id)) {
$msg->raise('Error', "ftp", _("Error during deletion")); // à traduire $msg->raise('Error', "ftp", _("Error during deletion"));
} }
} }
if (!empty($delete_id)) { if (!empty($delete_id)) {
if (! $authip->ip_delete($delete_id)) { if (! $authip->ip_delete($delete_id)) {
$msg->raise('Error', "ftp", _("Error during deletion")); // à traduire $msg->raise('Error', "ftp", _("Error during deletion"));
} }
} }
if (!empty($ipsub)) { if (!empty($ipsub)) {
if (! $authip->ip_save($id, $ipsub, $infos)) { if (! $authip->ip_save($id, $ipsub, $infos)) {
$msg->raise('Error', "ftp", _("Error during recording")); // à traduire $msg->raise('Error', "ftp", _("Error during recording"));
} }
} }

View File

@ -104,7 +104,7 @@ if (!$res=$mail->get_details($mail_id)) {
} }
if ($new_account) if ($new_account)
$msg->raise("Ok", "mail", _("Your email has been created successfully")); // à traduire $msg->raise("Ok", "mail", _("Your email has been created successfully"));
else else
$msg->raise("Ok", "mail", _("Your email has been edited successfully")); $msg->raise("Ok", "mail", _("Your email has been edited successfully"));

View File

@ -43,7 +43,7 @@ $fields = array (
getFields($fields); getFields($fields);
if ($piwik->user_add($account_name, $account_mail) ) { if ($piwik->user_add($account_name, $account_mail) ) {
$msg->raise('Ok', "piwik", _('Successfully added piwik account')); // à traduire (ou à corriger) $msg->raise('Ok', "piwik", _('Successfully added piwik account'));
} }
include_once("piwik_userlist.php"); include_once("piwik_userlist.php");
?> ?>

View File

@ -162,7 +162,7 @@ foreach ($sitelist as $site ){
<?php <?php
if (! $no_user) { if (! $no_user) {
?> ?>
<a id="connect_<?php echo $site->id; ?>" href="<?php echo $first_url; ?>" target="_blank"><?php __('Connect as'); ?></a> <!-- à traduire --> <a id="connect_<?php echo $site->id; ?>" href="<?php echo $first_url; ?>" target="_blank"><?php __('Connect as'); ?></a>
<?php <?php
echo $list_users; echo $list_users;
} else { } else {

View File

@ -44,7 +44,7 @@ if (empty($login)) {
if(!empty($confirm_del)) { if(!empty($confirm_del)) {
// contrôle si ce compte piwik a encore des sites associés avant d'accepter sa suppression // contrôle si ce compte piwik a encore des sites associés avant d'accepter sa suppression
if ($piwik->user_has_sites()) { if ($piwik->user_has_sites()) {
$msg->raise('Alert', "piwik", _("You must first remove all the piwik sites associated with this user before deleting him")); // à traduire $msg->raise('Alert', "piwik", _("To be able to delete the last user account, you must first remove all the piwik sites"));
} else if ($piwik->user_delete($login) ) { } else if ($piwik->user_delete($login) ) {
$msg->raise('Ok', "piwik", _("Account %s is successfully deleted"), $login); $msg->raise('Ok', "piwik", _("Account %s is successfully deleted"), $login);
} }

View File

@ -44,11 +44,11 @@ echo $msg->msg_html_all("<li>", true, true);
<?php csrf_get(); ?> <?php csrf_get(); ?>
<table class="tedit"> <table class="tedit">
<tr> <tr>
<th><label for="account_name"><?php __("Account Name"); ?></label></th> <!-- à traduire --> <th><label for="account_name"><?php __("Account Name"); ?></label></th>
<td><span class="int" id="account_namefx"><?php echo $mem->user["login"]; ?>_</span><input type="text" class="int" name="account_name" size="20" id="account_name" maxlength="32" value=""/> <td><span class="int" id="account_namefx"><?php echo $mem->user["login"]; ?>_</span><input type="text" class="int" name="account_name" size="20" id="account_name" maxlength="32" value=""/>
</tr> </tr>
<tr> <tr>
<th><label for="account_mail"><?php __("Linked Account Email"); ?></label></th> <!-- à traduire --> <th><label for="account_mail"><?php __("Linked Account Email"); ?></label></th>
<td><input type="text" class="int" name="account_mail" size="20" id="account_mail" maxlength="32" value="<?php if (count($userslist) == 0) {echo $mem->user["mail"];}?>"/> <td><input type="text" class="int" name="account_mail" size="20" id="account_mail" maxlength="32" value="<?php if (count($userslist) == 0) {echo $mem->user["mail"];}?>"/>
</tr> </tr>
<tr class="trbtn"><td colspan="2"> <tr class="trbtn"><td colspan="2">
@ -74,7 +74,7 @@ echo $msg->msg_html_all("<li>", true, true);
// printVar($piwik->dev()); // printVar($piwik->dev());
if (empty($userslist)){ if (empty($userslist)){
$msg->raise('Info', "piwik", _("No existing Piwik accounts")); // à traduire (ou à corriger) $msg->raise('Info', "piwik", _("No existing Piwik accounts"));
echo $msg->msg_html_all(); echo $msg->msg_html_all();
} else { } else {
?> ?>
@ -125,7 +125,7 @@ foreach ($userslist as $user ){
?> ?>
</table> </table>
<div class="ina" id="alert_div_msg" style="display:none;background-color:yellow;padding:5px;border:2px solid black;margin-top:3em;";> <!-- à traduire --> <div class="ina" id="alert_div_msg" style="display:none;background-color:yellow;padding:5px;border:2px solid black;margin-top:3em;";>
<?php __("An error occurred. It was not possible to retrieve the access information to the Piwik interface") ?> <?php __("An error occurred. It was not possible to retrieve the access information to the Piwik interface") ?>
</div> </div>
<?php include_once("foot.php"); ?> <?php include_once("foot.php"); ?>

View File

@ -224,7 +224,7 @@ class m_authip {
// Error if $ip not an IP // Error if $ip not an IP
if (!checkip($ip) && !checkipv6($ip)) { if (!checkip($ip) && !checkipv6($ip)) {
$msg->raise('Error', 'authip', _("Failed : not an IP address")); // à traduire $msg->raise('Error', 'authip', _("Failed : not an IP address"));
return false; return false;
} }

View File

@ -388,7 +388,7 @@ ORDER BY
$db->query("SELECT * FROM address WHERE domain_id= ? AND address= ? ;", array($dom_id, $mail)); $db->query("SELECT * FROM address WHERE domain_id= ? AND address= ? ;", array($dom_id, $mail));
if ($db->next_record()) { if ($db->next_record()) {
if ($db->f("type") == "mailman") if ($db->f("type") == "mailman")
$msg->raise('Error', "mail", _("This email address already exists in mailman")); // à traduire $msg->raise('Error', "mail", _("This email address already exists in mailman"));
else else
$msg->raise('Error', "mail", _("This email address already exists")); $msg->raise('Error', "mail", _("This email address already exists"));

View File

@ -121,7 +121,7 @@ class m_piwik {
if ($api_data->result === 'success') { if ($api_data->result === 'success') {
$user = $this->get_user($user_login); $user = $this->get_user($user_login);
$user_creation_date = $user->date_registered; $user_creation_date = $user->date_registered;
$ret_value = $db->query("INSERT INTO piwik_users (uid, passwd, login, created_date) VALUES ( ?, ?, ?);", array($cuid, md5('$user_pass'), $user_login, $user_creation_date)); $ret_value = $db->query("INSERT INTO piwik_users (uid, passwd, login, created_date) VALUES ( ?, ?, ?, ?);", array($cuid, md5('$user_pass'), $user_login, $user_creation_date));
return $ret_value; return $ret_value;
} else { } else {
$msg->raise('Error', "piwik", $api_data->message); $msg->raise('Error', "piwik", $api_data->message);
@ -227,9 +227,12 @@ class m_piwik {
$msg->log("piwik","user_has_sites"); $msg->log("piwik","user_has_sites");
$db->query("SELECT id FROM piwik_sites WHERE uid='$cuid'"); $db->query("SELECT id FROM piwik_users WHERE uid='$cuid'");
if ($db->num_rows() > 0) if ($db->num_rows() <= 1) {
return true; $db->query("SELECT id FROM piwik_sites WHERE uid='$cuid'");
if ($db->num_rows() > 0)
return true;
}
return false; return false;
} }

View File

@ -348,7 +348,7 @@ class m_quota {
} }
$type = strtolower($type); $type = strtolower($type);
if (!preg_match("#^[a-z0-9]*$#", $type)) { if (!preg_match("#^[a-z0-9]*$#", $type)) {
$msg->raise('Error', "quota", _("Type can only contains characters a-z and 0-9")); // à traduire $msg->raise('Error', "quota", _("Type can only contains characters a-z and 0-9"));
return false; return false;
} }
while (list($key, $val) = each($qlist)) { while (list($key, $val) = each($qlist)) {