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

Rename Actions and Referrers in reporting menu #12750

Closed
tsteur opened this issue Apr 20, 2018 · 3 comments
Closed

Rename Actions and Referrers in reporting menu #12750

tsteur opened this issue Apr 20, 2018 · 3 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Apr 20, 2018

Referrers becomes Acquisition, Actions becomes Content or maybe better Behaviour.

For this to work we will need to change the translation key for the menu which means if people used this translation key in the past to hide a menu entry or category, this will no longer work. Renaming the existing entry won't work I presume as the text wouldn't be translated etc.

We will also need to see which guides etc we need to update, and maybe some other wordings in the UI.

@tsteur tsteur added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Apr 20, 2018
@tsteur tsteur added this to the 3.5.0 milestone Apr 20, 2018
@mattab mattab modified the milestones: 3.5.0, 3.6.0 May 4, 2018
@mattab mattab modified the milestones: 3.6.0, 3.5.1 May 16, 2018
@diosmosis
Copy link
Member

👍 for Behaviour, since shows what the users are doing. Might conflict w/ plugins like heatmap/session recording? I suppose it's not a big deal. I think Contents would definitely conflict w/ the Content subcategory.

@diosmosis diosmosis self-assigned this May 21, 2018
@diosmosis
Copy link
Member

@tsteur, if we add another property for $displayName here: https://github.com/matomo-org/matomo/blob/3.x-dev/core/Category/Category.php would that solve BC issue?

Eg,

class ReferrersCategory extends Category
{
    protected $id = 'Referrers_Referrers';
    protected $displayName = 'Referrers_Acquisition';
    protected $order = 15;
    protected $icon = 'icon-reporting-referer';
}

@tsteur
Copy link
Member Author

tsteur commented May 21, 2018

I'm not quite sure, it may work but wondering if it could break something else or has other downsides. Or it may be confusing that some menu translation key has suddenly a totally different name. On the other side it sounds like it could be a good solution that makes sense, gives flexibility and should have been there from the beginning. For example in Custom Reports we use Piwik::translate($category->getId()) as well so it is kind of breaking there unless we implement a version check and depending on the current Matomo version perform old behaviour or new behaviour with $category->getDisplayName(). I guess it is a sign that this method should have existed from the beginning and we wouldn't have had this problem...

So maybe we would add a method getDisplayName() which returns by default: return Piwik::translate($this->getId()) like here: https://github.com/matomo-org/matomo/blob/3.5.0/plugins/API/WidgetMetadata.php#L181

and then in those places we call that method instead $category->getDisplayName(). In each category it can be overwritten then.

So from what I can say so far it sounds like a great idea 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants