Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix this error? #8675

Closed
triffic-tang opened this issue Aug 31, 2015 · 1 comment
Closed

How to fix this error? #8675

triffic-tang opened this issue Aug 31, 2015 · 1 comment
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it.
Milestone

Comments

@triffic-tang
Copy link

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 tsteur added the answered For when a question was asked and we referred to forum or answered it. label Aug 31, 2015
@tsteur tsteur added this to the 2.15.0 milestone Aug 31, 2015
@tsteur tsteur self-assigned this Aug 31, 2015
@tsteur
Copy link
Member

tsteur commented Aug 31, 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 :)

@tsteur tsteur closed this as completed Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants