Skip to content

Conversation

AltamashShaikh
Copy link
Contributor

Description:

Merged multiple notifications under tracking code into one.
Fixes: #PG-2827

Review

@AltamashShaikh AltamashShaikh requested review from sgiehl and bx80 May 30, 2023 03:18
@AltamashShaikh AltamashShaikh marked this pull request as ready for review May 30, 2023 03:18
@michalkleiner
Copy link
Contributor

I have concerns here around translations, I think composing the strings dynamically like we do here in the PR and only translating the word 'guide' could cause problems in other languages where the word guide could e.g. be in front of the subject of the guide.

@AltamashShaikh
Copy link
Contributor Author

I have concerns here around translations, I think composing the strings dynamically like we do here in the PR and only translating the word 'guide' could cause problems in other languages where the word guide could e.g. be in front of the subject of the guide.

So what should we do here ?

@sgiehl
Copy link
Member

sgiehl commented May 31, 2023

We shouldn't put together translations that way. Using a placeholder would be better then, or simply only displaying the name without appending guide

Note: It actually even isn't correct to place names like Google or Osana within a translation, as depending on the usage some languages might append certain characters if e.g. the name ends with a certain character. But that is something we can ignore I think.

@AltamashShaikh
Copy link
Contributor Author

@sgiehl @michalkleiner I have changed the translation for "guide", please check if this would work or not

@michalkleiner
Copy link
Contributor

I have changed the translation for "guide", please check if this would work or not

I think the updated approach still has the same problem, it adds the untranslated name of the service and translated word guide together, which still doesn't allow for word order change or adding special characters if needed etc.

We can just leave it as Stefan suggested, i.e. remove the word guide from the actual guide link and let it just read as
"Learn more about configuring Matomo to work with these by following these guides: GA 3, GA 4, Osano".
It says those are guides before the colon, so should be fine from accessibility perspective.

@AltamashShaikh AltamashShaikh requested a review from sgiehl June 5, 2023 10:45
@AltamashShaikh
Copy link
Contributor Author

@sgiehl Can we get this reviewed and merged if all okay as I need to port it back to 4.x also, for #20818 change I can create a different PR after it is merged

@michalkleiner
Copy link
Contributor

@AltamashShaikh #20818 has been merged so it'd be great if we can update this PR to use that and keep the old way for 4.x

@AltamashShaikh
Copy link
Contributor Author

@AltamashShaikh #20818 has been merged so it'd be great if we can update this PR to use that and keep the old way for 4.x

@michalkleiner Updated as per #20818, please check.

"VueDetectedEmail": "Vue.js was detected on your website. Did you know you can use the \"%1$s\" npm package to track the website data? Learn more here: %2$s",
"MergedNotificationLine1": "%1$s were detected on your website.",
"MergedNotificationLine2": "Learn more about configuring Matomo to work with these by following these guides: %1$s",
"ConsentManagerConnected": "We’ve detected that %1$s is correctly configured to work with Matomo on your site."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was formerly PrivacyManager_ConsentManagerConnected in the template, should it stay in the PrivacyManager space?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would change the PrivacyManager AskingConsent code too, so preferred not to touch that

Copy link
Contributor

@bx80 bx80 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all looking good to me, all the previous feedback has been implemented and relevant tests are passing. I did some additional manual checks with a few test sites setup with ga3/ga4 and various consent managers in different states of setup, the merged notifications handled them all correctly 👍

@AltamashShaikh
Copy link
Contributor Author

@bx80 / @michalkleiner can you merge this?

@bx80 bx80 merged commit cfe2ef1 into 5.x-dev Jun 9, 2023
@bx80 bx80 deleted the PG-2827-merge-notifications branch June 9, 2023 04:59
@sgiehl sgiehl added this to the 5.0.0 milestone Jun 9, 2023
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Jun 9, 2023
AltamashShaikh added a commit that referenced this pull request Jun 9, 2023
* Merged multiple notifications under tracking code into one, #PG-2827

* Updated UI screenshot

* design changes for notification bar

* Updated UI screenshot

* Improvements around translatio for guides

* PR changes

* Updated UI tests

* Changes to incoprate consentManager connected

* UI tests updated

* Updated site_Type for test

* Updated UI screenshot

* Ampersand translated

* Notifications logic updated

* typo fixed

* Twig varibale not defined fixed

* UI tests fixed

* UI screenshot updated

* Started using createAndListing() instead of General_And

* PR changes
bx80 pushed a commit that referenced this pull request Jun 12, 2023
* Merged multiple notifications under tracking code into one (#20802)

* Merged multiple notifications under tracking code into one, #PG-2827

* Updated UI screenshot

* design changes for notification bar

* Updated UI screenshot

* Improvements around translatio for guides

* PR changes

* Updated UI tests

* Changes to incoprate consentManager connected

* UI tests updated

* Updated site_Type for test

* Updated UI screenshot

* Ampersand translated

* Notifications logic updated

* typo fixed

* Twig varibale not defined fixed

* UI tests fixed

* UI screenshot updated

* Started using createAndListing() instead of General_And

* PR changes

* Merged multiple notifications under tracking code into one, #PG-2827

* Update Controller.php removed unwanted use statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Development

Successfully merging this pull request may close these issues.

4 participants