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

Added permission setting and added missing translations #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/GoogleAnalyticsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ protected function registerMenuEntries()

$menu = (new MenuEntry('google', 'google-analytics'))
->setLabel(Trans::__('Statistics'))
->setPermission('googleanalytics')
->setIcon('fa:area-chart');

return [$menu];
Expand Down
2 changes: 1 addition & 1 deletion templates/widget.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p><span id="active-users-container"></span></p>
</div>
{% if statisticspage %}
<a class="btn btn-secondary" href="{{ path('displayStatistics') }}">More statistics</a>
<a class="btn btn-secondary" href="{{ path('displayStatistics') }}">{{__("More statistics")}}</a>
{% endif %}
</div>
</div>
Expand Down
7 changes: 7 additions & 0 deletions translations/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ City: City
"New visitors": "New visitors"
"Returning visitors": "Returning visitors"
"Computer": "Computer"
"Pageviews last week": "Pageviews last week"
"Pageviews this week": "Pageviews this week"
"Visits last week": "Visits last week"
"Visits this week": "Visits this week"
"More statistics": "More statistics"
"Visitors/Pageviews in the last 7 days.": "Visitors/Pageviews in the last 7 days."
"Visitors in the last 7 days, compared to the previous week": "Visitors in the last 7 days, compared to the previous week"
"Tablet": "Tablet"
"Phone": "Phone"
"No data": "No data"
Expand Down
37 changes: 37 additions & 0 deletions translations/nl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Statistics: Statistieken
"Unique visitors this month compared to last month": "Unieke bezoekers deze maand vergeleken met vorige maand"
"Unique visitors this year compared to last year": "Unieke bezoekers dit jaar in vergelijking met vorig jaar"
City: Plaats
"Visitor type": "Soort bezoekers"
"Device type": "Apparaat type"
"Active visitors right now": "Actieve bezoekers"
"Last month": "Vorige maand"
"This month": "Deze maand"
"Last year": "Vorig jaar"
"This year": "Dit jaar"
"New visitors": "Nieuwe bezoekers "
"Returning visitors": "Terugkerende bezoekers"
"Computer": "Computer"
"Pageviews last week": "Paginaweergaven vorige week"
"Pageviews this week": "Paginaweergaven deze week"
"Visits last week": "Bezoekers vorige week"
"Visits this week": "Bezoekers deze week"
"More statistics": "Meer statistieken"
"Visitors/Pageviews in the last 7 days.": "Bezoekers/Paginaweergaven"
"Visitors in the last 7 days, compared to the previous week": "Bezoekers in de afgelopen 7 dagen, vergeleken met vorige week"
"Tablet": "Tablet"
"Phone": "Mobiel"
"No data": "No data"
"Months":
"Jan": "Jan"
"Feb": "Feb"
"Mar": "Mrt"
"Apr": "Apr"
"May": "Mei"
"Jun": "Jun"
"Jul": "Jul"
"Aug": "Aug"
"Sep": "Sep"
"Oct": "Okt"
"Nov": "Nov"
"Dec": "Dec"