diff options
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r-- | plugins/UserCountry/UserCountry.php | 7 | ||||
-rwxr-xr-x | plugins/UserCountry/javascripts/userCountry.js | 4 | ||||
-rwxr-xr-x | plugins/UserCountry/templates/adminIndex.twig | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php index a6a850542c..2e071cdd02 100644 --- a/plugins/UserCountry/UserCountry.php +++ b/plugins/UserCountry/UserCountry.php @@ -51,6 +51,7 @@ class UserCountry extends \Piwik\Plugin 'Tracker.getVisitorLocation' => 'getVisitorLocation', 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks', 'ViewDataTable.getReportDisplayProperties' => 'getReportDisplayProperties', + 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys', ); return $hooks; } @@ -404,4 +405,10 @@ class UserCountry extends \Piwik\Plugin && $provider->isAvailable() === true && $provider->isWorking() === true; } + + public function getClientSideTranslationKeys(&$translationKeys) + { + $translationKeys[] = "UserCountry_FatalErrorDuringDownload"; + $translationKeys[] = "UserCountry_SetupAutomaticUpdatesOfGeoIP"; + } } diff --git a/plugins/UserCountry/javascripts/userCountry.js b/plugins/UserCountry/javascripts/userCountry.js index 572dd51aa6..cbafd5bd8e 100755 --- a/plugins/UserCountry/javascripts/userCountry.js +++ b/plugins/UserCountry/javascripts/userCountry.js @@ -96,7 +96,7 @@ $(document).ready(function () { } }); ajaxRequest.setErrorCallback(function () { - callback({error: _pk_translate('UserCountry_FatalErrorDuringDownload_js')}); + callback({error: _pk_translate('UserCountry_FatalErrorDuringDownload')}); }); ajaxRequest.send(false); }; @@ -132,7 +132,7 @@ $(document).ready(function () { $('body') .on('click', '#start-automatic-update-geoip', function () { $('#geoipdb-screen1').hide("slide", {direction: "left"}, 800, function () { - $('#geoip-db-mangement').text(_pk_translate('UserCountry_SetupAutomaticUpdatesOfGeoIP_js')); + $('#geoip-db-mangement').text(_pk_translate('UserCountry_SetupAutomaticUpdatesOfGeoIP')); $('#geoipdb-update-info').fadeIn(1000); }); }) diff --git a/plugins/UserCountry/templates/adminIndex.twig b/plugins/UserCountry/templates/adminIndex.twig index fd9d0cbe35..d3f93db18a 100755 --- a/plugins/UserCountry/templates/adminIndex.twig +++ b/plugins/UserCountry/templates/adminIndex.twig @@ -98,7 +98,7 @@ {% if not geoIPDatabasesInstalled %} <h2 id="geoip-db-mangement">{{ 'UserCountry_GeoIPDatabases'|translate }}</h2> {% else %} - <h2 id="geoip-db-mangement">{{ 'UserCountry_SetupAutomaticUpdatesOfGeoIP_js'|translate }}</h2> + <h2 id="geoip-db-mangement">{{ 'UserCountry_SetupAutomaticUpdatesOfGeoIP'|translate }}</h2> {% endif %} {% if showGeoIPUpdateSection %} |