Ticket #1351: core.DataTable.Renderer.patch

File core.DataTable.Renderer.patch, 3.4 KB (added by JulienM, 5 years ago)
  • lang/en.php

     
    152152        'General_ExceptionFilesizeMismatch' => 'File size mismatch: %1$s (expected length: %2$s, found: %3$s)', 
    153153        'General_ExceptionFileIntegrity' => 'Integrity check failed: %s', 
    154154        'General_ExceptionNonceMismatch' => 'Could not verify the security token on this form.', 
     155        'General_ExceptionVariableNotFound' => 'The required variable \'%s\' is not correct or has not been found in the API Request.', 
     156        'General_ExceptionModuleNotFound' => 'API module %s not found.', 
     157        'General_ExceptionMethodNotFound' => 'The method \'%s\' does not exist or is not available in the module \'%s\'.', 
     158        'General_ExceptionInvalidAPI' => 'Objects that provide an API must be Singleton and have a \'static public function getInstance()\' method.', 
     159        'General_ExceptionPluginNotActivated' => 'The plugin \'%s\' is not activated. You can activate the plugin on the \'Plugins admin\' page.', 
     160        'General_ExceptionInvalidMethodName' => 'The method name is invalid. Expected \'module.methodName\'', 
     161        'General_ExceptionIDArchiveNull' => 'idArchive is null', 
     162        'General_ExceptionSubtableNotFoundInArchive' => 'You are requesting a precise subTable but there is not such data in the Archive.', 
     163        'General_ExceptionInvalidPeriodOperation' => 'Operation not applicable.', 
     164        'General_ExceptionRSSFeedInvalidDataTable' => 'RSS Feed only used on Piwik_DataTable_Array with keyName = \'date\'', 
     165        'General_ExceptionXMLIllegalState' => 'Illegal state, what xml shall we return?', 
     166        'General_ExceptionFilterInvalidDataTable' => 'The filter accepts only a Piwik_DataTable object.', 
     167        'General_ExceptionTableNotFound' => 'The requested table (id = %d) couldn\'t be found in the DataTable Manager', 
     168        'General_ExceptionInvalidRendererFormat' => 'Renderer format \'%s\' not valid. Try \'xml\' or \'json\' or \'csv\' or \'html\' or \'php\' or \'original\' instead.', 
     169        'General_ExceptionRendererInvalidDataTable' => 'The renderer accepts only a Piwik_DataTable or an array of DataTable (Piwik_DataTable_Array) object.', 
    155170        'General_WarningFileIntegritySkipped' => 'Development environment detected. File integrity check skipped.', 
    156171        'General_WarningFileIntegrityNoManifest' => 'File integrity check could not be performed due to missing manifest.inc.php.', 
    157172        'General_WarningFileIntegrityNoMd5file' => 'File integrity check could not be completed due to missing md5_file() function.', 
  • core/DataTable/Renderer.php

     
    6565                if(!($table instanceof Piwik_DataTable) 
    6666                        && !($table instanceof Piwik_DataTable_Array)) 
    6767                { 
    68                         throw new Exception("The renderer accepts only a Piwik_DataTable or an array of DataTable (Piwik_DataTable_Array) object."); 
     68                        throw new Exception(Piwik_TranslateException('General_ExceptionRendererInvalidDataTable')); 
    6969                } 
    7070                $this->table = $table; 
    7171        } 
     
    8585                        Piwik_Loader::autoload($className); 
    8686                        return new $className;                   
    8787                } catch(Exception $e) { 
    88                         throw new Exception("Renderer format '$name' not valid. Try 'xml' or 'json' or 'csv' or 'html' or 'php' or 'original' instead."); 
     88                        throw new Exception(Piwik_TranslateException('General_ExceptionInvalidRendererFormat', array($name))); 
    8989                }                
    9090        }        
    9191}