Skip to content
Extraits de code Groupes Projets
Valider 27c4424c rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Deprecating "page title|url not defined" in config file and now using translations

git-svn-id: http://dev.piwik.org/svn/trunk@4713 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent ca14d184
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 14 ajouts et 17 suppressions
......@@ -104,10 +104,6 @@ anonymous_user_enable_use_segments_API = 1
; it is useful to have an actual string to write in the UI
action_default_name = index
; this action name is used when the URL has no page title or page URL defined
action_default_name_when_not_defined = "page title not defined"
action_default_url_when_not_defined = "page url not defined"
; if you want all your users to use Piwik in only one language, disable the LanguagesManager
; plugin, and set this default_language (users won't see the language drop down)
default_language = en
......
......@@ -243,8 +243,6 @@ class Piwik_Actions extends Piwik_Plugin
}
self::$defaultActionName = Zend_Registry::get('config')->General->action_default_name;
self::$defaultActionNameWhenNotDefined = Zend_Registry::get('config')->General->action_default_name_when_not_defined;
self::$defaultActionUrlWhenNotDefined = Zend_Registry::get('config')->General->action_default_url_when_not_defined;
$this->columnToSortByBeforeTruncation = Piwik_Archive::INDEX_NB_VISITS;
$this->maximumRowsInDataTableLevelZero = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_actions;
$this->maximumRowsInSubDataTable = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_subtable_actions;
......@@ -275,6 +273,9 @@ class Piwik_Actions extends Piwik_Plugin
*/
public function archiveDay( $notification )
{
self::$defaultActionNameWhenNotDefined = Piwik_Translate('General_NotDefined', Piwik_Translate('Actions_ColumnPageName'));
self::$defaultActionUrlWhenNotDefined = Piwik_Translate('General_NotDefined', Piwik_Translate('Actions_ColumnPageURL'));
/* @var $archiveProcessing Piwik_ArchiveProcessing */
$archiveProcessing = $notification->getNotificationObject();
......
......@@ -63,11 +63,11 @@ class Test_Piwik_Actions extends UnitTestCase
),
array(
'params' => array( 'name' => '', 'type' => Piwik_Tracker_Action::TYPE_ACTION_NAME),
'expected' => array( Zend_Registry::get('config')->General->action_default_name_when_not_defined ),
'expected' => array( 'Page Name not defined' ),
),
array(
'params' => array( 'name' => '', 'type' => Piwik_Tracker_Action::TYPE_ACTION_URL),
'expected' => array( Zend_Registry::get('config')->General->action_default_url_when_not_defined ),
'expected' => array( 'Page URL not defined' ),
),
array(
'params' => array( 'name' => 'http://example.org/download.zip', 'type' => Piwik_Tracker_Action::TYPE_DOWNLOAD),
......
......@@ -80,7 +80,7 @@ class Piwik_Live_Controller extends Piwik_Controller
$view->setReportDocumentation(Piwik_Translate('Live_VisitorLogDocumentation', array('<br />', '<br />')));
$view->setCustomParameter('pageUrlNotDefined', Zend_Registry::get('config')->General->action_default_url_when_not_defined);
$view->setCustomParameter('pageUrlNotDefined', Piwik_Translate('General_NotDefined', Piwik_Translate('Actions_ColumnPageURL')));
return $this->renderView($view, $fetch);
}
......
......@@ -22,7 +22,7 @@
</result>
<result date="2010-01-04">
<row>
<label>page title not defined</label>
<label>Page Name not defined</label>
<nb_visits>1</nb_visits>
<nb_uniq_visitors>1</nb_uniq_visitors>
<nb_hits>1</nb_hits>
......
......@@ -75,7 +75,7 @@
</subtable>
</row>
<row>
<label>page title not defined</label>
<label>Page Name not defined</label>
<nb_visits>1</nb_visits>
<nb_hits>1</nb_hits>
<sum_time_spent>0</sum_time_spent>
......
......@@ -77,7 +77,7 @@
</subtable>
</row>
<row>
<label>page title not defined</label>
<label>Page Name not defined</label>
<nb_visits>1</nb_visits>
<nb_hits>1</nb_hits>
<sum_time_spent>0</sum_time_spent>
......
......@@ -75,7 +75,7 @@
</subtable>
</row>
<row>
<label>page title not defined</label>
<label>Page Name not defined</label>
<nb_visits>1</nb_visits>
<nb_hits>1</nb_hits>
<sum_time_spent>0</sum_time_spent>
......
......@@ -34,7 +34,7 @@
</result>
<result date="2010-01-04">
<row>
<label>page url not defined</label>
<label>Page URL not defined</label>
<nb_visits>1</nb_visits>
<nb_uniq_visitors>1</nb_uniq_visitors>
<nb_hits>1</nb_hits>
......
......@@ -48,7 +48,7 @@
<url>http://example.org/thankyou</url>
</row>
<row>
<label>page url not defined</label>
<label>Page URL not defined</label>
<nb_visits>1</nb_visits>
<nb_hits>1</nb_hits>
<sum_time_spent>0</sum_time_spent>
......
......@@ -61,7 +61,7 @@
<url>http://example.org/thankyou</url>
</row>
<row>
<label>page url not defined</label>
<label>Page URL not defined</label>
<nb_visits>1</nb_visits>
<nb_hits>1</nb_hits>
<sum_time_spent>0</sum_time_spent>
......
......@@ -48,7 +48,7 @@
<url>http://example.org/thankyou</url>
</row>
<row>
<label>page url not defined</label>
<label>Page URL not defined</label>
<nb_visits>1</nb_visits>
<nb_hits>1</nb_hits>
<sum_time_spent>0</sum_time_spent>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter