diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-02-11 11:38:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 11:38:47 +0300 |
commit | 5d2dab75e3654126ed95ea72b58b4c225ac59492 (patch) | |
tree | 7886dcc7c8593906fbebbca49c7946405bcfa2cc /plugins/UserCountry | |
parent | ab1e70016dde3ef93498bca99d0aa8b38e6d7f38 (diff) |
Merge branch 3.x-dev into 4.x-dev (#15543)
* Updates search engine and social definitions (#15384)
* updates device detector to latest release (#15388)
* updates device detector to latest release
* updates tests
* translation update (#15389)
* Fix Could not get the lock for ID, when creating a site (#15401)
* Lock key start
* do not empty key lock
Co-authored-by: Thomas Steur <tsteur@users.noreply.github.com>
* 3.13.1
* submodule updates
* Use correct name in update available message (#15423)
* Fix removing user capabilities (#15422)
* Order of implode() args, avoid E_NOTICE in PHP7.4 (#15428)
* Fixes possible php warning in visitor log (#15442)
* silence is_executable call (#15446)
* Make sure geolocation admin experience is consistent if user is not using GeoIp2 plugin. (#15447)
* Fix referrers test. (#15448)
* Ensure to close visitor popover correctly (#15443)
* Fixes possible warning (#15453)
* Forward instance_id from local config when reseting config during tests. (#15445)
* Add event that allows plugins to disable archiving for certain periods/sites if they want. (#15457)
* Add event that allows plugins to disable archiving for certain periods/sites if they want.
* apply review feedback
* Fix possible warning for columns without index (#15467)
* Day range archiving issue (#15462)
* Improve lock ID check for max length (#15407)
Better patch for https://github.com/matomo-org/matomo/pull/15401 which was merged last minute...
This way it always works even when someone calls `acquireLock` directly instead of `execute`
Pushing this for now into 3.x-dev but can also put it into 4.x-dev directly but then there might be merge conflicts when merging 3.x-dev into 4.x-dev
* Use SameSite none for session token when embedded into iframe (#15439)
* Make sure tracking works in IE9 and lower (#15480)
* Mention Joomla install FAQ (#15481)
* Make sparklines work when mbstring extension is not installed (#15489)
1) Too few arguments to function mb_strtolower(), 1 passed in matomo/vendor/davaxi/sparkline/src/Sparkline/StyleTrait.php on line 129 and exactly 2 expected
2) mb_strlen is not defined
* update screenshots (#15488)
* 3.13.2-rc1
* Use safemode when running CLI commands (#15472)
* update icons submodule (#15490)
* update icons submodule
* update UI tests
* Fix possible undefined index notice (#15502)
* Use latest davaxi/sparkline release (#15464)
* translation update
* submodule updates
* Fix deprecation notice (#15530)
see https://github.com/matomo-org/matomo/pull/15467#issuecomment-583283444
* 3.13.2-rc2
* update cache component (#15536)
* fixes copy dashboard to user for more than 100 users (#15538)
cherry picking #15424 to fix #15420 in 3.x-dev
* Add missing return statement. (#15539)
* 3.13.2
* update tests
* update tests
Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com>
Co-authored-by: Thomas Steur <tsteur@users.noreply.github.com>
Co-authored-by: Peter Upfold <pgithub@upfold.org.uk>
Co-authored-by: diosmosis <diosmosis@users.noreply.github.com>
Co-authored-by: Lukas Winkler <github@lw1.at>
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r-- | plugins/UserCountry/Controller.php | 6 | ||||
-rw-r--r-- | plugins/UserCountry/lang/el.json | 3 | ||||
-rw-r--r-- | plugins/UserCountry/lang/en.json | 3 | ||||
-rw-r--r-- | plugins/UserCountry/lang/es-ar.json | 3 | ||||
-rw-r--r-- | plugins/UserCountry/lang/pt-br.json | 3 | ||||
-rw-r--r-- | plugins/UserCountry/lang/sq.json | 3 | ||||
-rw-r--r-- | plugins/UserCountry/lang/tr.json | 3 | ||||
-rw-r--r-- | plugins/UserCountry/templates/adminIndex.twig | 13 |
8 files changed, 29 insertions, 8 deletions
diff --git a/plugins/UserCountry/Controller.php b/plugins/UserCountry/Controller.php index 84e7fd2376..97b5eadf92 100644 --- a/plugins/UserCountry/Controller.php +++ b/plugins/UserCountry/Controller.php @@ -70,6 +70,9 @@ class Controller extends \Piwik\Plugin\ControllerAdmin } $view->isThereWorkingProvider = $isThereWorkingProvider; + $view->notUsingGeoIpPlugin = !Manager::getInstance()->isPluginActivated('GeoIp2') + && !Manager::getInstance()->isPluginActivated('GeoIp'); + // if using either the Apache, Nginx or PECL module, they are working and there are no databases // in misc, then the databases are located outside of Piwik, so we cannot update them $view->showGeoIPUpdateSection = true; @@ -80,6 +83,9 @@ class Controller extends \Piwik\Plugin\ControllerAdmin ) { $view->showGeoIPUpdateSection = false; } + if ($view->notUsingGeoIpPlugin) { + $view->showGeoIPUpdateSection = false; + } $view->isInternetEnabled = SettingsPiwik::isInternetEnabled(); diff --git a/plugins/UserCountry/lang/el.json b/plugins/UserCountry/lang/el.json index b282ebbdd7..e23f0f9a9d 100644 --- a/plugins/UserCountry/lang/el.json +++ b/plugins/UserCountry/lang/el.json @@ -98,6 +98,7 @@ "UpdaterScheduledForNextRun": "Είναι προγραμματισμένο για εκτέλεση κατά την εκτέλεση του επόμενου archive.php από το cron.", "UpdaterWasLastRun": "Το πρόγραμμα ενημέρωσης εκτελέστηκε τελευταία στις %s.", "UpdaterWillRunNext": "Είναι προγραμματισμένο για εκτέλεση στις %s.", - "WidgetLocation": "Τοποθεσία Επισκέπτη" + "WidgetLocation": "Τοποθεσία Επισκέπτη", + "InstallGeoIp2": "Το Matomo προτείνει τη χρήση των βάσεων %1$sdbip%2$s, αλλά αυτό απαιτεί τη χρήση του πρόσθετου GeoIp2. Αν το εγκαταστήσετε και το ενεργοποιήσετε (που ενδεχομένως να χρειαστεί μια μακρόχρονη διαδικασία), θα μπορέσετε να ξεκινήσετε τη χρήση των βάσεων %1$sdbip%2$s. (Αγνοήστε το παρόν αν χρησιμοποιείτε ήδη τρίτο πρόσθετο που παρέχει τη δική του λειτουργικότητα για γεωτοποθεσία.)" } }
\ No newline at end of file diff --git a/plugins/UserCountry/lang/en.json b/plugins/UserCountry/lang/en.json index a707f363e8..852293b84d 100644 --- a/plugins/UserCountry/lang/en.json +++ b/plugins/UserCountry/lang/en.json @@ -98,6 +98,7 @@ "UpdaterScheduledForNextRun": "It is scheduled to run during the next cron core:archive command execution.", "UpdaterWasLastRun": "The updater was last run on %s.", "UpdaterWillRunNext": "It is next scheduled to run on %s.", - "WidgetLocation": "Visitor Location" + "WidgetLocation": "Visitor Location", + "InstallGeoIp2": "Matomo recommends using the %1$sdbip%2$s databases, but this requires using the GeoIp2 plugin. If you install and activate it (which will require a possibly long running update), you will be able to get started using %1$sdbip%2$s databases. (Ignore this if you are using a third party plugin that provides it's own geolocation functionality.)" } }
\ No newline at end of file diff --git a/plugins/UserCountry/lang/es-ar.json b/plugins/UserCountry/lang/es-ar.json index 40cc3a2f78..d2f268ea3b 100644 --- a/plugins/UserCountry/lang/es-ar.json +++ b/plugins/UserCountry/lang/es-ar.json @@ -98,6 +98,7 @@ "UpdaterScheduledForNextRun": "Está programado para ejecutarse durante la próxima ejecución de comando cron \"core:archive\".", "UpdaterWasLastRun": "El actualizador se ejecutó por última vez: %s.", "UpdaterWillRunNext": "Está programado para ejecutarse: %s.", - "WidgetLocation": "Ubicación del visitante" + "WidgetLocation": "Ubicación del visitante", + "InstallGeoIp2": "Matomo recomienda usar las bases de datos de %1$sdbip%2$s, pero requiere usar el plugin GeoIP2. Si lo instalás y activás (el cual probablemente requiera una larga actualización), vas a poder usar las bases de datos de %1$sdbip%2$s (ignorá esto si ya estás usando un plugin de terceros que ofrece su propia función de geolocalización)." } }
\ No newline at end of file diff --git a/plugins/UserCountry/lang/pt-br.json b/plugins/UserCountry/lang/pt-br.json index 5f44beee1b..3927a68629 100644 --- a/plugins/UserCountry/lang/pt-br.json +++ b/plugins/UserCountry/lang/pt-br.json @@ -98,6 +98,7 @@ "UpdaterScheduledForNextRun": "Está programado para ser executado durante a próxima execução do cron job archive.php", "UpdaterWasLastRun": "O atualizador foi executado pela última vez em %s.", "UpdaterWillRunNext": "A próxima execução está programada para ser executada em %s.", - "WidgetLocation": "Localização dos visitantes" + "WidgetLocation": "Localização dos visitantes", + "InstallGeoIp2": "O Matomo recomenda usar as bases de dados %1$sdbip%2$s, mas isto requer usar o plugin GeoIp2. Se você instalá-lo e ativá-lo (o que deve possivelmente exigir uma atualização de longa duração), você poderá começar a usar bases de dados %1$sdbip%2$s. (Ignore isto se você estiver usando um plugin de terceiro que fornece sua própria funcionalidade de geolocalização.)" } }
\ No newline at end of file diff --git a/plugins/UserCountry/lang/sq.json b/plugins/UserCountry/lang/sq.json index 779a1d6bd9..80ea3839f4 100644 --- a/plugins/UserCountry/lang/sq.json +++ b/plugins/UserCountry/lang/sq.json @@ -98,6 +98,7 @@ "UpdaterScheduledForNextRun": "Është vënë në plan të xhirojë gjatë përmbushjes së ardhshme të urdhrit cron core:archive.", "UpdaterWasLastRun": "Përditësuesi u xhirua së fundi më %s.", "UpdaterWillRunNext": "Është planifikuar të xhirojë sërish më %s.", - "WidgetLocation": "Vend Vizitori" + "WidgetLocation": "Vend Vizitori", + "InstallGeoIp2": "Matomo rekomandon përdorimin e bazave të të dhënave %1$sdbip%2$s, por kjo lyp përdorimin e shtojcës GeoIp2. Nëse e instaloni dhe e aktivizoni (çka ka shumë mundësi se do të kërkojë një përditësim që zgjat ca), do të jeni në gjendje të filloni të përdorni baza të dhënash %1$sdbip%2$s. (Shpërfilleni këtë , nëse përdorni një shtojcë pale të tretë që për gjeovendëzim sjell funksione të vetat.)" } }
\ No newline at end of file diff --git a/plugins/UserCountry/lang/tr.json b/plugins/UserCountry/lang/tr.json index 5c5e6fb0cf..ef27d981dc 100644 --- a/plugins/UserCountry/lang/tr.json +++ b/plugins/UserCountry/lang/tr.json @@ -98,6 +98,7 @@ "UpdaterScheduledForNextRun": "core:archive komutunun yürütüleceği zamanlanmış görevin bir sonraki çalışmasında güncellenecek.", "UpdaterWasLastRun": "Güncelleyici en son %s zamanında çalıştı.", "UpdaterWillRunNext": "Zamanlanmış görev %s zamanında çalışacak.", - "WidgetLocation": "Ziyaretçi Konumu" + "WidgetLocation": "Ziyaretçi Konumu", + "InstallGeoIp2": "Matomo %1$sdbip%2$s veritabanlarının kullanılmasını önerir. Ancak bunun için GeoIp2 uygulama eki gereklidir. Bu uygulama ekini kurup etkinleştirdiyseniz (büyük olasılıkla uzun sürecek bir güncelleme yapılır), %1$sdbip%2$s veritabanlarını kullanmaya başlayabilirsiniz (kendi coğrafi konum özelliğini sunan bir üçüncü taraf uygulama eki kullanıyorsanız bunu yok sayabilirsiniz)." } }
\ No newline at end of file diff --git a/plugins/UserCountry/templates/adminIndex.twig b/plugins/UserCountry/templates/adminIndex.twig index ac9e2c1f59..f0a32da588 100644 --- a/plugins/UserCountry/templates/adminIndex.twig +++ b/plugins/UserCountry/templates/adminIndex.twig @@ -16,6 +16,7 @@ {% if not isThereWorkingProvider %} <h3 style="margin-top:0;">{{ 'UserCountry_HowToSetupGeoIP'|translate }}</h3> + {% if dbipLiteUrl|default is not empty %} <p>{{ 'UserCountry_HowToSetupGeoIPIntro'|translate }}</p> <ul style="list-style:disc !important;margin-left:2em;"> <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step1'|translate('<a rel="noreferrer noopener" href="'~dbipLiteUrl~'">','</a>','<a rel="noreferrer noopener" target="_blank" href="http://db-ip.com/?refid=mtm">','</a>')|raw }}</li> @@ -23,6 +24,9 @@ <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step3'|translate('<strong>','</strong>','<span style="color:green"><strong>','</strong></span>')|raw }}</li> <li style="list-style-type: disc !important;">{{ 'UserCountry_HowToSetupGeoIP_Step4'|translate }}</li> </ul> + {% else %} + <p>{{ 'UserCountry_InstallGeoIp2'|translate('<a rel="noreferrer noopener" target="_blank" href="http://db-ip.com/?refid=mtm">','</a>')|raw }}</p> + {% endif %} <p> </p> {% endif %} @@ -127,7 +131,7 @@ </div> {% endif %} -{% if isInternetEnabled %} +{% if isInternetEnabled and not notUsingGeoIpPlugin %} <div piwik-content-block content-title="{% if not geoIPDatabasesInstalled %}{{ 'UserCountry_GeoIPDatabases'|translate|e('html_attr') }}{% else %}{{ 'UserCountry_SetupAutomaticUpdatesOfGeoIP'|translate|e('html_attr') }}{% endif %}" id="geoip-db-mangement"> @@ -161,9 +165,14 @@ </div> </div> </div> + {% if dbipLiteUrl|default is not empty %} + {% set downloadingDbLink %}<a href="{{ dbipLiteUrl|e('html_attr') }}">{{ dbipLiteFilename }}</a>{% endset %} + {% else %} + {% set downloadingDbLink = '' %} + {% endif %} <div id="geoipdb-screen2-download" ng-show="locationUpdater.showFreeDownload"> <div piwik-progressbar - label="{{ ('UserCountry_DownloadingDb'|translate('<a href="'~dbipLiteUrl~'">'~dbipLiteFilename~'</a>') ~ '...')|json_encode }}" + label="{{ ('UserCountry_DownloadingDb'|translate(downloadingDbLink) ~ '...')|json_encode }}" progress="locationUpdater.progressFreeDownload"> </div> </div> |