@triffic-tang opened this issue on August 31st 2015

I want to add actions metrics in the All Websites Dashboard, but exception occurs:

The string General_ColumnNbActions was not loaded in javascript. 
Make sure it is added in the Translate.getClientSideTranslationKeys hook. 
@tsteur commented on August 31st 2015

In your plugin PHP file $YOURPLUGINNAME.php

add the following code and it should work:

    public function getListHooksRegistered()
    {
        return array(
            'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
        );
    }

    public function getClientSideTranslationKeys(&$translations)
    {
        $translations[] = 'General_ColumnNbActions';
    }

The method getListHooksRegistered might already exists.

Please ask questions regarding development in our Plugins & Platform forum: http://forum.piwik.org/list.php?9 that'd would be great :)

This issue was closed on August 31st 2015
Powered by GitHub Issue Mirror