Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-05-07 10:20:49 +0400
committermattab <matthieu.aubry@gmail.com>2013-05-07 10:20:49 +0400
commit47cda36e60359e8a3de01eaeb86b4edbac315532 (patch)
tree464a719a6f20f130f709a6fe24d1c5ed0b77b534 /plugins
parent8d2cc921b65b82d7242ba0f7b7a2d71e56814fc7 (diff)
fixes #3926 thanks for the suggestion, fixing Piwik core to allow several translations whether the period is used in the sentence or standalone
Diffstat (limited to 'plugins')
-rw-r--r--plugins/PDFReports/PDFReports.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/PDFReports/PDFReports.php b/plugins/PDFReports/PDFReports.php
index 1533a70192..a6f0b1d572 100644
--- a/plugins/PDFReports/PDFReports.php
+++ b/plugins/PDFReports/PDFReports.php
@@ -310,7 +310,7 @@ class Piwik_PDFReports extends Piwik_Plugin
$filename = $notificationInfo[Piwik_PDFReports_API::FILENAME_KEY];
$additionalFiles = $notificationInfo[Piwik_PDFReports_API::ADDITIONAL_FILES_KEY];
- $periods = self::getPeriodToFrequency();
+ $periods = self::getPeriodToFrequencyAsAdjective();
$message = Piwik_Translate('PDFReports_EmailHello');
$subject = Piwik_Translate('General_Report') . ' ' . $reportTitle . " - " . $prettyDate;
@@ -606,6 +606,7 @@ class Piwik_PDFReports extends Piwik_Plugin
}
/**
+ * Used in the Report Listing
* @ignore
*/
static public function getPeriodToFrequency()
@@ -617,4 +618,18 @@ class Piwik_PDFReports extends Piwik_Plugin
Piwik_ScheduledTime::PERIOD_MONTH => Piwik_Translate('General_Monthly'),
);
}
+
+ /**
+ * Used in the Report's email content, ie "monthly report"
+ * @ignore
+ */
+ static public function getPeriodToFrequencyAsAdjective()
+ {
+ return array(
+ Piwik_ScheduledTime::PERIOD_DAY => Piwik_Translate('General_DailyReport'),
+ Piwik_ScheduledTime::PERIOD_WEEK => Piwik_Translate('General_WeeklyReport'),
+ Piwik_ScheduledTime::PERIOD_MONTH => Piwik_Translate('General_MonthlyReport'),
+ Piwik_ScheduledTime::PERIOD_YEAR => Piwik_Translate('General_YearlyReport'),
+ );
+ }
}