Robert Vogel has submitted this change and it was merged.

Change subject: Statistics: Fixed interval error message
......................................................................


Statistics: Fixed interval error message

* Replaced hard coded max interval number with $1 in all message files
* Used parse instead of plain for wfMessage
* Added max interval setting to wfMessage using numParams
* Used plural distinction in en, de, fr

Change-Id: Ifadbf191b2ad9061f5fe8afccc6f519dbaa3fca6
---
M Statistics/i18n/de.json
M Statistics/i18n/en.json
M Statistics/i18n/es.json
M Statistics/i18n/fr.json
M Statistics/i18n/lb.json
M Statistics/i18n/mk.json
M Statistics/i18n/pt.json
M Statistics/i18n/qqq.json
M Statistics/i18n/ru.json
M Statistics/i18n/sv.json
M Statistics/i18n/uk.json
M Statistics/i18n/zh-hans.json
M Statistics/includes/specials/SpecialExtendedStatistics.class.php
13 files changed, 18 insertions(+), 14 deletions(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/Statistics/i18n/de.json b/Statistics/i18n/de.json
index 586b609..6e470dc 100644
--- a/Statistics/i18n/de.json
+++ b/Statistics/i18n/de.json
@@ -24,7 +24,7 @@
        "bs-statistics-not-allowed": "Du hast nicht die erforderlichen Rechte.",
        "bs-statistics-finish": "Diagramm erstellen",
        "bs-statistics-filters": "Filter",
-       "bs-statistics-interval-too-big": "Das Intervall ist zu groß gewählt. 
Es darf maximal 35 Intervall-Schritte enthalten.",
+       "bs-statistics-interval-too-big": "Das Intervall ist zu groß gewählt. 
Es darf maximal {{PLURAL:$1|$1 Intervall-Schritt|$1 Intervall-Schritte}} 
enthalten.",
        "bs-statistics-diag-number-of-users": "Anzahl der Nutzer",
        "bs-statistics-diag-number-of-users-desc": "Zeigt die Zahl der Nutzer, 
die sich im ausgewählten Zeitraum registriert haben.",
        "bs-statistics-label-name": "Name",
diff --git a/Statistics/i18n/en.json b/Statistics/i18n/en.json
index cb42f7f..210edcb 100644
--- a/Statistics/i18n/en.json
+++ b/Statistics/i18n/en.json
@@ -22,7 +22,7 @@
        "bs-statistics-not-allowed": "You don't have the necessary permission.",
        "bs-statistics-finish": "Create diagram",
        "bs-statistics-filters": "Filters",
-       "bs-statistics-interval-too-big": "The interval is too big. It should 
not contain more than 35 interval steps.",
+       "bs-statistics-interval-too-big": "The interval is too big. It should 
not contain more than {{PLURAL:$1|$1 interval step|$1 interval steps}}.",
        "bs-statistics-diag-number-of-users": "Number of users",
        "bs-statistics-diag-number-of-users-desc": "Displays the number of 
users which were created within the chosen period.",
        "bs-statistics-label-name": "Name",
diff --git a/Statistics/i18n/es.json b/Statistics/i18n/es.json
index 473a1b9..dd8b3f1 100644
--- a/Statistics/i18n/es.json
+++ b/Statistics/i18n/es.json
@@ -23,7 +23,7 @@
        "bs-statistics-not-allowed": "No tienes los permisos necesarios.",
        "bs-statistics-finish": "Crear diagrama",
        "bs-statistics-filters": "Filtros",
-       "bs-statistics-interval-too-big": "El intervalo es demasiado grande. No 
debe contener más de 35 pasos de intervalo.",
+       "bs-statistics-interval-too-big": "El intervalo es demasiado grande. No 
debe contener más de $1 pasos de intervalo.",
        "bs-statistics-diag-number-of-users": "Número de usuarios",
        "bs-statistics-diag-number-of-users-desc": "Muestra el número de 
usuarios que se crearon durante el periodo elegido.",
        "bs-statistics-label-name": "Nombre",
diff --git a/Statistics/i18n/fr.json b/Statistics/i18n/fr.json
index a7e63f5..0d3393a 100644
--- a/Statistics/i18n/fr.json
+++ b/Statistics/i18n/fr.json
@@ -23,7 +23,7 @@
        "bs-statistics-not-allowed": "Vous n’avez pas la permission requise.",
        "bs-statistics-finish": "Créer un diagramme",
        "bs-statistics-filters": "Filtres",
-       "bs-statistics-interval-too-big": "L'intervalle est trop grand. Il ne 
doit pas contenir plus de 35 étapes d'intervalle.",
+       "bs-statistics-interval-too-big": "L'intervalle est trop grand. Il ne 
doit pas contenir plus de {{PLURAL:$1|$1 étape|$1 étapes}} d'intervalle.",
        "bs-statistics-diag-number-of-users": "Nombre d'utilisateurs",
        "bs-statistics-diag-number-of-users-desc": "Affiche le nombre 
d’utilisateurs qui ont été créés au cours de la période choisie.",
        "bs-statistics-label-name": "Nom",
diff --git a/Statistics/i18n/lb.json b/Statistics/i18n/lb.json
index ee2786f..1ce2e66 100644
--- a/Statistics/i18n/lb.json
+++ b/Statistics/i18n/lb.json
@@ -22,7 +22,7 @@
        "bs-statistics-not-allowed": "Dir hutt net déi néideg Rechter.",
        "bs-statistics-finish": "Diagramm maachen",
        "bs-statistics-filters": "Filteren",
-       "bs-statistics-interval-too-big": "Den Intervall ass ze grouss. En 
däerf aus net méi wéi 35 Intervall-Schrëtt bestoen.",
+       "bs-statistics-interval-too-big": "Den Intervall ass ze grouss. En 
däerf aus net méi wéi $1 Intervall-Schrëtt bestoen.",
        "bs-statistics-diag-number-of-users": "Zuel vun de Benotzer",
        "bs-statistics-diag-number-of-users-desc": "Weist d'Zuel vu Benotzer 
déi an der erausgesichter Period ugeluecht goufen.",
        "bs-statistics-label-name": "Numm",
diff --git a/Statistics/i18n/mk.json b/Statistics/i18n/mk.json
index 29e8dcb..0484016 100644
--- a/Statistics/i18n/mk.json
+++ b/Statistics/i18n/mk.json
@@ -22,7 +22,7 @@
        "bs-statistics-not-allowed": "Ја немате потребната дозвола.",
        "bs-statistics-finish": "Создај дијаграм",
        "bs-statistics-filters": "Филтри",
-       "bs-statistics-interval-too-big": "Интервалот е преголем. Не смее да 
содржи повеќе од 35 чекори.",
+       "bs-statistics-interval-too-big": "Интервалот е преголем. Не смее да 
содржи повеќе од $1 чекори.",
        "bs-statistics-diag-number-of-users": "Број на корисници",
        "bs-statistics-diag-number-of-users-desc": "Го прикажува бројот на 
корисници создадени во избраниот период.",
        "bs-statistics-label-name": "Име",
diff --git a/Statistics/i18n/pt.json b/Statistics/i18n/pt.json
index 124129a..c0b53fc 100644
--- a/Statistics/i18n/pt.json
+++ b/Statistics/i18n/pt.json
@@ -20,7 +20,7 @@
        "bs-statistics-list": "Lista",
        "bs-statistics-not-allowed": "Não tem a permissão necessária.",
        "bs-statistics-filters": "Filtros",
-       "bs-statistics-interval-too-big": "O intervalo é muito grande. Não deve 
conter mais de 35 passos de intervalo.",
+       "bs-statistics-interval-too-big": "O intervalo é muito grande. Não deve 
conter mais de $1 passos de intervalo.",
        "bs-statistics-diag-number-of-users": "Número de utilizadores",
        "bs-statistics-label-name": "Nome",
        "bs-statistics-label-registration": "Registo",
diff --git a/Statistics/i18n/qqq.json b/Statistics/i18n/qqq.json
index 9449f8f..b178f77 100644
--- a/Statistics/i18n/qqq.json
+++ b/Statistics/i18n/qqq.json
@@ -24,7 +24,7 @@
        "bs-statistics-not-allowed": "Error message used in 
[[Special:ExtendedStatistics]], to notify the user that he has not the 
necessary permissions for some actions.",
        "bs-statistics-finish": "Used in [[Special:ExtendedStatistics]], button 
label for create diagram\n{{Identical|Create diagram}}",
        "bs-statistics-filters": "Used in [[Special:ExtendedStatistics]], 
headline for filters section\n{{Identical|Filter}}",
-       "bs-statistics-interval-too-big": "Error message that the interval is 
too big. It should not contain more than 35 interval steps.",
+       "bs-statistics-interval-too-big": "Error message that the interval is 
too big.\n*$1 is the number of maximum interval steps - use for PLURAL 
distinction.",
        "bs-statistics-diag-number-of-users": "Option in 
[[Special:ExtendedStatistics]], label for number of users.\n{{Identical|Number 
of users}}",
        "bs-statistics-diag-number-of-users-desc": "Description message for 
number of users option.",
        "bs-statistics-label-name": "Used in [[Special:ExtendedStatistics]], 
label for name\n{{Identical|Name}}",
diff --git a/Statistics/i18n/ru.json b/Statistics/i18n/ru.json
index 89c23ef..81b4ce1 100644
--- a/Statistics/i18n/ru.json
+++ b/Statistics/i18n/ru.json
@@ -24,7 +24,7 @@
        "bs-statistics-not-allowed": "У вас нет необходимых прав.",
        "bs-statistics-finish": "Создать диаграмму",
        "bs-statistics-filters": "Фильтры",
-       "bs-statistics-interval-too-big": "Интервал слишком велик. Он не должен 
содержать более 35 интервальных шагов.",
+       "bs-statistics-interval-too-big": "Интервал слишком велик. Он не должен 
содержать более $1 интервальных шагов.",
        "bs-statistics-diag-number-of-users": "Количество участников",
        "bs-statistics-diag-number-of-users-desc": "Показывает число учётных 
записей пользователей, созданных в течение выбранного периода.",
        "bs-statistics-label-name": "Имя",
diff --git a/Statistics/i18n/sv.json b/Statistics/i18n/sv.json
index cd47c01..597af18 100644
--- a/Statistics/i18n/sv.json
+++ b/Statistics/i18n/sv.json
@@ -22,7 +22,7 @@
        "bs-statistics-not-allowed": "Du saknar nödvändig behörighet.",
        "bs-statistics-finish": "Skapa diagram",
        "bs-statistics-filters": "Filter",
-       "bs-statistics-interval-too-big": "Intervallet är för stor. Det bör 
inte innehålla mer än 35 intervallsteg.",
+       "bs-statistics-interval-too-big": "Intervallet är för stor. Det bör 
inte innehålla mer än $1 intervallsteg.",
        "bs-statistics-diag-number-of-users": "Antal användare",
        "bs-statistics-diag-number-of-users-desc": "Visar antalet användare som 
skapades inom den valda perioden.",
        "bs-statistics-label-name": "Namn",
diff --git a/Statistics/i18n/uk.json b/Statistics/i18n/uk.json
index b80708a..d666c59 100644
--- a/Statistics/i18n/uk.json
+++ b/Statistics/i18n/uk.json
@@ -23,7 +23,7 @@
        "bs-statistics-not-allowed": "У вас немає необхідного дозволу.",
        "bs-statistics-finish": "Створити діаграму",
        "bs-statistics-filters": "Фільтри",
-       "bs-statistics-interval-too-big": "Завеликий інтервал. Він не повинен 
становити понад 35 кроків.",
+       "bs-statistics-interval-too-big": "Завеликий інтервал. Він не повинен 
становити понад $1 кроків.",
        "bs-statistics-diag-number-of-users": "Кількість користувачів",
        "bs-statistics-diag-number-of-users-desc": "Показує кількість облікових 
записів, створених протягом вибраного періоду.",
        "bs-statistics-label-name": "Назва",
diff --git a/Statistics/i18n/zh-hans.json b/Statistics/i18n/zh-hans.json
index 9bb61c4..c20890b 100644
--- a/Statistics/i18n/zh-hans.json
+++ b/Statistics/i18n/zh-hans.json
@@ -22,7 +22,7 @@
        "bs-statistics-not-allowed": "您没有足够的权限。",
        "bs-statistics-finish": "创建图表",
        "bs-statistics-filters": "过滤器",
-       "bs-statistics-interval-too-big": "间隔太大了。它不应包含超过35个间隔步骤。",
+       "bs-statistics-interval-too-big": "间隔太大了。它不应包含超过$1个间隔步骤。",
        "bs-statistics-diag-number-of-users": "用户人数",
        "bs-statistics-diag-number-of-users-desc": "显示在指定周期内创建的用户数。",
        "bs-statistics-label-name": "名称",
diff --git a/Statistics/includes/specials/SpecialExtendedStatistics.class.php 
b/Statistics/includes/specials/SpecialExtendedStatistics.class.php
index 3c06a67..78dd231 100644
--- a/Statistics/includes/specials/SpecialExtendedStatistics.class.php
+++ b/Statistics/includes/specials/SpecialExtendedStatistics.class.php
@@ -148,8 +148,12 @@
                }
 
                $intervals = Interval::getIntervalsFromDiagram( $oDiagram );
-               if( count( $intervals ) > BsConfig::get( 
'MW::Statistics::MaxNumberOfIntervals' ) ) {
-                       $aResult['message'] = wfMessage( 
'bs-statistics-interval-too-big' )->plain();
+               $iMaxIntervals = BsConfig::get( 
'MW::Statistics::MaxNumberOfIntervals' );
+               if( count( $intervals ) > $iMaxIntervals ) {
+                       $aResult['message'] = wfMessage( 
'bs-statistics-interval-too-big' )
+                               ->numParams( $iMaxIntervals )
+                               ->parse();
+
                        return json_encode($aResult);
                }
                //set_time_limit( 60 );

-- 
To view, visit https://gerrit.wikimedia.org/r/186167
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifadbf191b2ad9061f5fe8afccc6f519dbaa3fca6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth <wi...@hallowelt.biz>
Gerrit-Reviewer: Jgoettlich <goettl...@hallowelt.biz>
Gerrit-Reviewer: Mglaser <gla...@hallowelt.biz>
Gerrit-Reviewer: Pigpen <reym...@hallowelt.biz>
Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: Tweichart <weich...@hallowelt.biz>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to