@tsteur opened this Issue on April 20th 2018 Member

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.

@diosmosis commented on May 18th 2018 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 commented on May 21st 2018 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 commented on May 21st 2018 Member

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 👍

Powered by GitHub Issue Mirror