Skip to content

Commit

Permalink
feature 1559: remove "standard deviation" in rating.
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@5500 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Mar 31, 2010
1 parent 6614470 commit 9f00348
Show file tree
Hide file tree
Showing 22 changed files with 36 additions and 37 deletions.
3 changes: 1 addition & 2 deletions include/picture_rate.inc.php
Expand Up @@ -33,15 +33,14 @@
$query = '
SELECT COUNT(rate) AS count
, ROUND(AVG(rate),2) AS average
, ROUND(STD(rate),2) AS std
FROM '.RATE_TABLE.'
WHERE element_id = '.$picture['current']['id'].'
;';
$row = pwg_db_fetch_assoc(pwg_query($query));
}
else
{ // avg rate null -> no rate -> no need to query db
$row = array( 'count'=>0, 'average'=>NULL, 'std'=>NULL );
$row = array( 'count'=>0, 'average'=>NULL );
}
$template->assign('rate_summary', $row);

Expand Down
4 changes: 2 additions & 2 deletions language/ar_SA/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'ar';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (قيمت %d مرة, standard deviation = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (قيمت %d مرة)';
$lang['%d Kb'] = '%d كيلوبايت';
$lang['%d category updated'] = '%d تصنيف محدث';
$lang['%d categories updated'] = '%d تصنيفات محدثة';
Expand Down Expand Up @@ -372,4 +372,4 @@
$lang['cloud'] = 'سحابة';
$lang['Are you sure?'] = 'هل انت متأكد?';
$lang['delete this comment'] = 'حذف هذا التعليق';
?>
?>
2 changes: 1 addition & 1 deletion language/cs_CZ/common.lang.php
Expand Up @@ -32,7 +32,7 @@
$lang_info['code'] = 'cz';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (hodnoceno %d krát, standardní odchylka = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (hodnoceno %d krát)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d kategorie aktualizována';
$lang['%d categories updated'] = '%d kategorie aktualizovány';
Expand Down
4 changes: 2 additions & 2 deletions language/da_DK/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'da';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (bedømt %d gange, standard afvigelse = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (bedømt %d gange)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d kategori opdateret';
$lang['%d categories updated'] = '%d kategorier opdateret';
Expand Down Expand Up @@ -387,4 +387,4 @@
$lang['This author removed the comment with id %d'] = 'Denne forfatter har fjernet denne kommentar med id %d';
$lang['delete this comment'] = 'slet denne kommentar';
$lang['validate this comment'] = 'godkend denne kommentar';
?>
?>
4 changes: 2 additions & 2 deletions language/de_DE/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'de';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (beachtet %d mal, Standardabweichung = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (beachtet %d mal)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d Kategorie wurde aktualisiert';
$lang['%d categories updated'] = '%d Kategorien wurden aktualisiert';
Expand Down Expand Up @@ -388,4 +388,4 @@
$lang['This author modified following comment:'] = 'Dieser Autor veränderte folgenden Kommentar:';
$lang['This author removed the comment with id %d'] = 'Dieser Autor löschte den Kommentar mit der ID %d';
$lang['validate this comment'] = 'überprüfe diesen Kommentar';
?>
?>
4 changes: 2 additions & 2 deletions language/en_UK/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['zero_plural'] = "1";


$lang['%.2f (rated %d times, standard deviation = %.2f)'] = "%.2f (rated %d times, standard deviation = %.2f)";
$lang['%.2f (rated %d times)'] = "%.2f (rated %d times)";
$lang['%d Kb'] = "%d Kb";
$lang['%d category updated'] = "%d category updated";
$lang['%d categories updated'] = "%d categories updated";
Expand Down Expand Up @@ -386,4 +386,4 @@
$lang['This author removed the comment with id %d'] = 'This author removed the comment with id %d';
$lang['delete this comment'] = "delete this comment";
$lang['validate this comment'] = 'validate this comment';
?>
?>
4 changes: 2 additions & 2 deletions language/es_AR/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'es';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (marcado %d veces, desviación tipo = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (marcado %d veces)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d categoría actualizada';
$lang['%d categories updated'] = '%d categorías actualizadas';
Expand Down Expand Up @@ -368,4 +368,4 @@
$lang['Reset to default values'] = 'Resetear a los valores por defecto';
$lang['delete all images from your favorites'] = 'borrar todas las imágenes de tus favoritos';
$lang['Sent by'] = 'Enviado por';
?>
?>
4 changes: 2 additions & 2 deletions language/es_ES/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'es';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (noté %d fois, écart type = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (noté %d fois)';
$lang['%d Kb'] = '%d Ko';
$lang['%d category updated'] = '%d Categoría actualizada';
$lang['%d categories updated'] = '%d Actualización categorías';
Expand Down Expand Up @@ -389,4 +389,4 @@
$lang['This author removed the comment with id %d'] = 'Este autor suprimió el comentario sustentador al que él identificaba %d';
$lang['validate this comment'] = 'Validar este comentario';

?>
?>
4 changes: 2 additions & 2 deletions language/fr_FR/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'fr';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (notée %d fois, écart-type = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (notée %d fois)';
$lang['%d Kb'] = '%d Ko';
$lang['%d category updated'] = '%d catégorie mise à jour';
$lang['%d categories updated'] = '%d catégories mises à jour';
Expand Down Expand Up @@ -388,4 +388,4 @@
$lang['This author removed the comment with id %d'] = 'Cet auteur a supprimé le commentaire portant l\'identifiant %d';
$lang['delete this comment'] = "supprimer ce commentaire";
$lang['validate this comment'] = 'valider ce commentaire';
?>
?>
2 changes: 1 addition & 1 deletion language/hr_HR/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'hr';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (ocijenjeno %d puta, standardno odstupanje = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (ocijenjeno %d puta)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d skupina obnovljena';
$lang['%d categories updated'] = '%d skupine obnovljene';
Expand Down
2 changes: 1 addition & 1 deletion language/hu_HU/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'hu';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (értékelve %d alkalommal, szórás = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (értékelve %d alkalommal)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d kategória frissítés';
$lang['%d categories updated'] = '%d kategória frissítve';
Expand Down
4 changes: 2 additions & 2 deletions language/it_IT/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'it';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (votata %d volte, media = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (votata %d volte)';
$lang['%d Kb'] = '%d Ko';
$lang['%d category updated'] = '%d categoria aggiornata';
$lang['%d categories updated'] = '%d categorie aggiornate';
Expand Down Expand Up @@ -388,4 +388,4 @@
$lang['This author removed the comment with id %d'] = 'Questo autore a cancellato il commento con l\'ID %d';
$lang['delete this comment'] = 'cancellare questo commento';
$lang['validate this comment'] = 'convalidare questo commento';
?>
?>
4 changes: 2 additions & 2 deletions language/ja_JP/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'ja';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (評価 %d 回、標準偏差 = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (評価 %d 回)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d 件のカテゴリが更新されました。';
$lang['%d categories updated'] = '%d 件のカテゴリが更新されました。';
Expand Down Expand Up @@ -387,4 +387,4 @@
$lang['This author modified following comment:'] = 'このユーザーが次のコメントを書き直しました:';
$lang['This author removed the comment with id %d'] = 'このユーザーがコメントID %d を削除しました。';
$lang['validate this comment'] = 'このコメントを有効にする';
?>
?>
4 changes: 2 additions & 2 deletions language/nl_NL/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'nl';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (waardering %d aantal x, standaard deviation = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (waardering %d aantal x)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d categorie bijgewerkt';
$lang['%d categories updated'] = '%d categorieën bijgewerkt';
Expand Down Expand Up @@ -387,4 +387,4 @@
$lang['This author removed the comment with id %d'] = 'This author removed the comment with id %d';
$lang['validate this comment'] = 'Valideer dit commentaar';

?>
?>
2 changes: 1 addition & 1 deletion language/pl_PL/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['direction'] = 'ltr';
$lang_info['code'] = 'pl';
$lang_info['zero_plural'] = true;
$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (oceniane %d razy, standard deviation = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (oceniane %d razy)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d kategoria zaktualizowana';
$lang['%d categories updated'] = '%d zaktualizowanych kategorii';
Expand Down
2 changes: 1 addition & 1 deletion language/pt_BR/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'pt';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (avaliada %d vezes, margem de erro = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (avaliada %d vezes)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d categoria atualizada';
$lang['%d categories updated'] = '%d categorias atualizadas';
Expand Down
2 changes: 1 addition & 1 deletion language/pt_PT/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'pt';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (avaliada %d vezes, margem de erro = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (avaliada %d vezes)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d categoria atualizada';
$lang['%d categories updated'] = '%d categorias atualizadas';
Expand Down
2 changes: 1 addition & 1 deletion language/ru_RU/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'ru';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (%d оценок, разброс = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (%d оценок)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d категория дополнена';
$lang['%d categories updated'] = 'категорий дополнено: %d';
Expand Down
4 changes: 2 additions & 2 deletions language/sr_RS/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'sr';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (ocenjeno %d puta, standardno odstupanje = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (ocenjeno %d puta)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d kategorija obnovljena';
$lang['%d categories updated'] = '%d kategorije obnovljene';
Expand Down Expand Up @@ -387,4 +387,4 @@
$lang['This author removed the comment with id %d'] = 'Ovaj autor je uklonio komentar sa identifikacijom %d';
$lang['delete this comment'] = 'obriši ovaj komentar';
$lang['validate this comment'] = 'Overi ovaj komentar';
?>
?>
4 changes: 2 additions & 2 deletions language/vi_VN/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'vn';
$lang_info['zero_plural'] = true;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (rated %d times, standard deviation = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (rated %d times)';
$lang['%d Kb'] = '%d Kb';
$lang['%d category updated'] = '%d đề mục đã được cập nhật';
$lang['%d categories updated'] = '%d đề mục đã được cập nhật';
Expand Down Expand Up @@ -371,4 +371,4 @@
$lang['Sent by'] = 'Được gởi bởi';
$lang['Are you sure?'] = 'Bạn có chắc không?';
$lang['delete this comment'] = 'xóa bỏ lời bình này';
?>
?>
2 changes: 1 addition & 1 deletion language/zh_CN/common.lang.php
Expand Up @@ -28,7 +28,7 @@
$lang_info['code'] = 'cn';
$lang_info['zero_plural'] = false;

$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (标注 %d 次, 标准差 = %.2f)';
$lang['%.2f (rated %d times)'] = '%.2f (标注 %d 次)';
$lang['%d Kb'] = '%d KB';
$lang['%d category updated'] = '%d 类已更新';
$lang['%d categories updated'] = '%d 等多类已更新';
Expand Down
6 changes: 3 additions & 3 deletions themes/default/template/picture.tpl
Expand Up @@ -186,8 +186,8 @@ y.callService(
<td class="label">{'Average rate'|@translate}</td>
<td class="value" id="ratingSummary">
{if $rate_summary.count}
{assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
{$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
{assign var='rate_text' value='%.2f (rated %d times)'|@translate }
{$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) }
{else}
{'no rate'|@translate}
{/if}
Expand Down Expand Up @@ -215,7 +215,7 @@ y.callService(
<script type="text/javascript">
makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
ratingSummaryText: "{'%.2f (rated %d times, standard deviation = %.2f)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
</script>
</div>
</form>
Expand Down

0 comments on commit 9f00348

Please sign in to comment.