diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-02-15 09:18:48 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-02-15 09:18:48 +0400 |
commit | 5bc25e86603fedae9c1a3ab46c4087ec4bf36be3 (patch) | |
tree | def7feb61f2620113c492b2988fc04e4d51d4ac3 /plugins | |
parent | a01dd6211be7d1cca918e220e74b1ddb69aa6619 (diff) | |
parent | 19a0aba9f83b546c57fa52f53a7864f2cd550dfd (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins')
35 files changed, 70 insertions, 17 deletions
diff --git a/plugins/DBStats/lang/da.json b/plugins/DBStats/lang/da.json index 76bad23bde..3c5e6e1315 100644 --- a/plugins/DBStats/lang/da.json +++ b/plugins/DBStats/lang/da.json @@ -7,8 +7,8 @@ "IndexSize": "Indeks", "LearnMore": "Hvis du vil vide mere om, hvordan Piwik behandler data, og hvordan man kan få Piwik til arbejde godt på mellem til stærkt trafikerede hjemmesider, se dokumentationen på %s.", "MainDescription": "Piwik gemmer al statistik i MySQL-databasen. Lige nu bruger Piwik-tabellerne %s.", - "MetricDataByYear": "Målings tabeller fordelt på år", - "MetricTables": "Målings tabeller", + "MetricDataByYear": "Målingstabeller fordelt på år", + "MetricTables": "Målingstabeller", "OtherTables": "Andre tabeller", "PluginDescription": "Programudvidelsen viser MySQL-database brugen af Piwik tabeller.", "ReportDataByYear": "Rapport tabeller fordelt på år", diff --git a/plugins/DBStats/lang/et.json b/plugins/DBStats/lang/et.json index b043c14a50..fabc763358 100644 --- a/plugins/DBStats/lang/et.json +++ b/plugins/DBStats/lang/et.json @@ -5,6 +5,7 @@ "DBSize": "Andmebaasi suurus", "EstimatedSize": "Ennustatud maht", "IndexSize": "Indeksi maht", + "LearnMore": "Et saada rohkem infot, kuidas Piwik töötleb andmeid ja kuidas optimeerida Piwikut tööks keskmise ja kõrge külastatavusega veebilehtedele, vaata seda dokumentatsiooni: %s.", "MainDescription": "Piwik salvestab kõik veebianalüütika andmed MySQL andmebaasi. Piwiku tabelid kasutavad hetkel %s.", "MetricDataByYear": "Mõõttabelid aasta järgi", "MetricTables": "Mõõttabelid", diff --git a/plugins/DevicesDetection/DevicesDetection.php b/plugins/DevicesDetection/DevicesDetection.php index 4a558b4be4..8808ff87ae 100644 --- a/plugins/DevicesDetection/DevicesDetection.php +++ b/plugins/DevicesDetection/DevicesDetection.php @@ -260,7 +260,7 @@ class DevicesDetection extends \Piwik\Plugin $userAgent = $request->getUserAgent(); $UAParser = new UserAgentParserEnhanced($userAgent); - $UAParser->setCache(new CacheFile('useragentparser', 86400)); + $UAParser->setCache(new CacheFile('tracker', 86400)); $UAParser->parse(); $deviceInfo['config_browser_name'] = $UAParser->getBrowser("short_name"); $deviceInfo['config_browser_version'] = $UAParser->getBrowser("version"); diff --git a/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php b/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php index 8c1e01e304..856d8c8dc9 100644 --- a/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php +++ b/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php @@ -19,7 +19,8 @@ class UserAgentParserEnhanced 'console', // 4 'tv', // 5 'car browser', // 6 - 'smart display' // 7 + 'smart display', // 7 + 'camera' // 8 ); public static $deviceBrands = array( @@ -61,6 +62,7 @@ class UserAgentParserEnhanced 'FL' => 'Fly', 'GD' => 'Gemini', 'GI' => 'Gionee', + 'GG' => 'Gigabyte', 'GO' => 'Google', 'GR' => 'Gradiente', 'GU' => 'Grundig', @@ -106,12 +108,14 @@ class UserAgentParserEnhanced 'NG' => 'NGM', 'NI' => 'Nintendo', 'NK' => 'Nokia', + 'NN' => 'Nikon', 'NW' => 'Newgen', 'NX' => 'Nexian', 'OD' => 'Onda', 'OP' => 'OPPO', 'OR' => 'Orange', 'OT' => 'O2', + 'OU' => 'OUYA', 'PA' => 'Panasonic', 'PE' => 'PEAQ', 'PH' => 'Philips', @@ -274,7 +278,7 @@ class UserAgentParserEnhanced 'Symbian' => array('SYM', 'SYS', 'SY3', 'S60', 'S40'), 'Unix' => array('SOS', 'AIX', 'HPX', 'BSD', 'NBS', 'OBS', 'DFB', 'SYL', 'IRI', 'T64'), 'WebTV' => array('WTV'), - 'Windows' => array('WI8', 'WI7', 'WVI', 'WS3', 'WXP', 'W2K', 'WNT', 'WME', 'W98', 'W95', 'WRT', 'W31', 'WIN'), + 'Windows' => array('WI7', 'WI8', 'WVI', 'WS3', 'WXP', 'W2K', 'WNT', 'WME', 'W98', 'W95', 'WRT', 'W31', 'WIN'), 'Windows Mobile' => array('WPH', 'WMO', 'WCE') ); public static $browserFamilies = array( @@ -507,6 +511,23 @@ class UserAgentParserEnhanced } else if (empty($this->device) && $this->isDesktop()) { $this->device = array_search('desktop', self::$deviceTypes); } + + /** + * Android up to 3.0 was designed for smartphones only. But as 3.0, which was tablet only, was published + * too late, there were a bunch of tablets running with 2.x + * With 4.0 the two trees were merged and it is for smartphones and tablets + * + * So were are expecting that all devices running Android < 2 are smartphones + * Devices running Android 3.X are tablets. Device type of Android 2.X and 4.X+ are unknown + */ + if (empty($this->device) && $this->getOs('short_name') == 'AND' && $this->getOs('version') != '') { + if (version_compare($this->getOs('version'), '2.0') == -1) { + $this->device = array_search('smartphone', self::$deviceTypes); + } else if (version_compare($this->getOs('version'), '3.0') >= 0 AND version_compare($this->getOs('version'), '4.0') == -1) { + $this->device = array_search('tablet', self::$deviceTypes); + } + } + if ($this->debug) { var_export($this->brand, $this->model, $this->device); } diff --git a/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/mobiles.yml b/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/mobiles.yml index e8e987462e..f39a948d2d 100644 --- a/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/mobiles.yml +++ b/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/mobiles.yml @@ -415,6 +415,17 @@ Gemini: device: 'tablet' model: '$1' +#Gigabyte +Gigabyte: + regex: 'GSmart [a-z0-9 ]+ Build|Gigabyte-[a-z0-9]+' + device: 'smartphone' + models: + - regex: '(GSmart [a-z0-9 ]+) Build' + model: '$1' + - regex: 'Gigabyte-([a-z0-9]+)' + model: '$1' + + # Gionee Gionee: regex: 'GIONEE-([a-z0-9]+)' @@ -761,7 +772,13 @@ Nexian: model: '$1' - regex: 'S?Nexian-([a-z0-9]+)' model: '$1' - + +#Nikon +Nikon: + regex: 'Coolpix S800c' + device: 'camera' + model: 'Coolpix S800c' + # o2 O2: regex: 'Xda|O2[ \-]|COCOON' @@ -798,6 +815,12 @@ Orange: device: 'smartphone' model: 'SPV $1' +#OUYA +OUYA: + regex: 'OUYA' + device: 'console' + model: 'OUYA' + # panasonic Panasonic: regex: 'Panasonic' @@ -851,7 +874,7 @@ Siemens: # Samsung Samsung: - regex: 'SAMSUNG|S(?:CH|GH|PH|EC|AM|HV|HW)-|SMART-TV|GT-|Galaxy|(?:portalmmm|o2imode)/2\.0 [SZ]|sam[rua]' + regex: 'SAMSUNG|S(?:CH|GH|PH|EC|AM|HV|HW)-|SMART-TV|GT-|Galaxy|(?:portalmmm|o2imode)/2\.0 [SZ]|sam[rua]|EK-GC[0-9]{3}' device: 'smartphone' models: - regex: '(GT-(P|N8|N5)[0-9]+[a-z]?)' @@ -867,6 +890,9 @@ Samsung: model: '$1' - regex: '((?:SCH|SGH|SPH|SHV|SHW|GT)-[a-z0-9]+)' model: '$1' + - regex: 'EK-GC([0-9]{3})' + device: 'camera' + model: 'Galaxy Camera $1' - regex: 'SEC-([a-z0-9]+)' model: '$1' - regex: 'SAM-([a-z0-9]+)' diff --git a/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml b/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml index a42f74c941..5c950d50af 100644 --- a/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml +++ b/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml @@ -47,7 +47,7 @@ ########## # Android ########## -- regex: 'Android[ /](\d+\.\d+)' +- regex: 'Android[ /](?:[a-z]+ )?(\d+\.\d+)' name: 'Android' version: '$1' diff --git a/plugins/DevicesDetection/functions.php b/plugins/DevicesDetection/functions.php index 37b5ec3ea2..21cfa8ae33 100644 --- a/plugins/DevicesDetection/functions.php +++ b/plugins/DevicesDetection/functions.php @@ -107,7 +107,8 @@ function getDeviceTypeLabel($label) 'console' => 'DevicesDetection_Console', 'tv' => 'DevicesDetection_TV', 'car browser' => 'DevicesDetection_CarBbrowser', - 'smart display' => 'DevicesDetection_SmartDisplay' + 'smart display' => 'DevicesDetection_SmartDisplay', + 'camera' => 'DevicesDetection_Camera' ); if (isset(UserAgentParserEnhanced::$deviceTypes[$label]) && isset($translations[UserAgentParserEnhanced::$deviceTypes[$label]])) { return Piwik::translate($translations[UserAgentParserEnhanced::$deviceTypes[$label]]); @@ -133,7 +134,8 @@ function getDeviceTypeLogo($label) "tv" => "tv.png", "feature phone" => "mobile.gif", "console" => "console.gif", - "car browser" => "carbrowser.png"); + "car browser" => "carbrowser.png", + "camera" => "camera.png"); if (!array_key_exists($label, $deviceTypeLogos) || $label == "Unknown") { $label = 'unknown.gif'; diff --git a/plugins/DevicesDetection/images/screens/camera.png b/plugins/DevicesDetection/images/screens/camera.png Binary files differnew file mode 100644 index 0000000000..bd9deed867 --- /dev/null +++ b/plugins/DevicesDetection/images/screens/camera.png diff --git a/plugins/DevicesDetection/lang/da.json b/plugins/DevicesDetection/lang/da.json index 85b3fe6f4d..6655d75b00 100644 --- a/plugins/DevicesDetection/lang/da.json +++ b/plugins/DevicesDetection/lang/da.json @@ -17,6 +17,7 @@ "FeaturePhone": "Telefonfunktioner", "OperatingSystemFamilies": "Operativsystem familier", "OperatingSystemVersions": "Operativsystem-versioner", + "PluginDescription": "Udvidelsen indeholderudvidet information om mobile enheder, såsom mærke (producent), model (enhed version) og bedre enhedstype detektion (tv, konsoller, smartphones, desktop, osv). Programudvidelsen tilføjer en ny rapport i 'Besøgende > Enheder'.", "SmartDisplay": "Smart skærm", "Smartphone": "Smartphone", "submenu": "Enheder", diff --git a/plugins/DevicesDetection/lang/de.json b/plugins/DevicesDetection/lang/de.json index 871387bed9..3babc168c1 100644 --- a/plugins/DevicesDetection/lang/de.json +++ b/plugins/DevicesDetection/lang/de.json @@ -1,6 +1,7 @@ { "DevicesDetection": { "BrowserVersions": "Browser Versionen", + "Camera": "Digitalcamera", "Console": "Konsole", "dataTableLabelBrands": "Marke", "dataTableLabelBrowserFamily": "Browser Familie", diff --git a/plugins/DevicesDetection/lang/en.json b/plugins/DevicesDetection/lang/en.json index d364dfb21c..c10124efef 100644 --- a/plugins/DevicesDetection/lang/en.json +++ b/plugins/DevicesDetection/lang/en.json @@ -19,6 +19,7 @@ "UserAgent": "User-Agent", "Smartphone": "Smartphone", "CarBrowser": "Car browser", + "Camera": "Camera", "Tablet": "Tablet", "SmartDisplay": "Smart display", "FeaturePhone": "Feature phone", diff --git a/plugins/DevicesDetection/lang/fr.json b/plugins/DevicesDetection/lang/fr.json index 59b47cf50f..42c740ab3d 100644 --- a/plugins/DevicesDetection/lang/fr.json +++ b/plugins/DevicesDetection/lang/fr.json @@ -14,8 +14,10 @@ "DeviceModel": "Modèle du périphérique", "DevicesDetection": "Périphériques du visiteur", "DeviceType": "Type du périphérique", + "FeaturePhone": "Fonctionnalité téléphone", "OperatingSystemFamilies": "Familles de système d'exploitation", "OperatingSystemVersions": "Versions de système d'exploitation", + "PluginDescription": "Ce composant additionnel fournit des informations détaillées à propos des périphériques mobiles, telles que la marque (constructeur), le modèle (version du périphérique), une meilleure détection du type de périphérique (tv, consoles, smart phones, pc, etc) et autres. Ce composant additionnel ajoute un nouveau rapport dans Visiteur > Périphériques.", "SmartDisplay": "Affichage intelligent", "Smartphone": "Téléphone intelligent (smartphone)", "submenu": "Périphériques", diff --git a/plugins/LanguagesManager/Commands/CreatePull.php b/plugins/LanguagesManager/Commands/CreatePull.php index b613c49c56..0aede4ece7 100644 --- a/plugins/LanguagesManager/Commands/CreatePull.php +++ b/plugins/LanguagesManager/Commands/CreatePull.php @@ -111,7 +111,6 @@ class CreatePull extends ConsoleCommand return; } - $fileCount = 0; API::unsetInstance(); // reset languagemanager api (to force refresh of data) $stats = shell_exec('git diff --numstat HEAD'); @@ -136,7 +135,6 @@ class CreatePull extends ConsoleCommand $languageCodesTouched = array(); if (!empty($addedFiles[1])) { foreach ($addedFiles[1] AS $addedFile) { - $fileCount++; $languageInfo = $this->getLanguageInfoByIsoCode($addedFile); $messages[$addedFile] = sprintf('- Added %s (%s changes / %s translated)\n', $languageInfo['english_name'], $linesSumByLang[$addedFile], $languageInfo['percentage_complete']); } @@ -145,7 +143,6 @@ class CreatePull extends ConsoleCommand if (!empty($modifiedFiles[1])) { foreach ($modifiedFiles[1] AS $modifiedFile) { - $fileCount++; $languageInfo = $this->getLanguageInfoByIsoCode($modifiedFile); $messages[$modifiedFile] = sprintf('- Updated %s (%s changes / %s translated)\n', $languageInfo['english_name'], $linesSumByLang[$modifiedFile], $languageInfo['percentage_complete']); } @@ -154,11 +151,13 @@ class CreatePull extends ConsoleCommand $message = implode('', $messages); + $languageCodesTouched = array_unique($languageCodesTouched, SORT_REGULAR); + $title = sprintf( 'Updated %s strings in %u languages (%s)', $addedLinesSum, - $fileCount, - implode(', ', array_unique($languageCodesTouched, SORT_REGULAR)) + count($languageCodesTouched), + implode(', ', $languageCodesTouched) ); shell_exec('git commit -m "language update ${pluginName} refs #3430"'); diff --git a/plugins/UserSettings/images/os/ARL.gif b/plugins/UserSettings/images/os/ARL.gif Binary files differnew file mode 100644 index 0000000000..ac92b2de6b --- /dev/null +++ b/plugins/UserSettings/images/os/ARL.gif diff --git a/plugins/UserSettings/images/os/BTR.gif b/plugins/UserSettings/images/os/BTR.gif Binary files differnew file mode 100644 index 0000000000..bdba9fad3f --- /dev/null +++ b/plugins/UserSettings/images/os/BTR.gif diff --git a/plugins/UserSettings/images/os/CES.gif b/plugins/UserSettings/images/os/CES.gif Binary files differnew file mode 100644 index 0000000000..028958c94a --- /dev/null +++ b/plugins/UserSettings/images/os/CES.gif diff --git a/plugins/UserSettings/images/os/FED.gif b/plugins/UserSettings/images/os/FED.gif Binary files differnew file mode 100644 index 0000000000..2e49af9d7c --- /dev/null +++ b/plugins/UserSettings/images/os/FED.gif diff --git a/plugins/UserSettings/images/os/GNT.gif b/plugins/UserSettings/images/os/GNT.gif Binary files differnew file mode 100644 index 0000000000..47558caf9a --- /dev/null +++ b/plugins/UserSettings/images/os/GNT.gif diff --git a/plugins/UserSettings/images/os/KBT.gif b/plugins/UserSettings/images/os/KBT.gif Binary files differnew file mode 100644 index 0000000000..28ba33292f --- /dev/null +++ b/plugins/UserSettings/images/os/KBT.gif diff --git a/plugins/UserSettings/images/os/KNO.gif b/plugins/UserSettings/images/os/KNO.gif Binary files differnew file mode 100644 index 0000000000..3433a71a5f --- /dev/null +++ b/plugins/UserSettings/images/os/KNO.gif diff --git a/plugins/UserSettings/images/os/LBT.gif b/plugins/UserSettings/images/os/LBT.gif Binary files differnew file mode 100644 index 0000000000..47fad1402a --- /dev/null +++ b/plugins/UserSettings/images/os/LBT.gif diff --git a/plugins/UserSettings/images/os/MDR.gif b/plugins/UserSettings/images/os/MDR.gif Binary files differnew file mode 100644 index 0000000000..b4d8d5e348 --- /dev/null +++ b/plugins/UserSettings/images/os/MDR.gif diff --git a/plugins/UserSettings/images/os/MIN.gif b/plugins/UserSettings/images/os/MIN.gif Binary files differnew file mode 100644 index 0000000000..71ce560b25 --- /dev/null +++ b/plugins/UserSettings/images/os/MIN.gif diff --git a/plugins/UserSettings/images/os/PPY.gif b/plugins/UserSettings/images/os/PPY.gif Binary files differnew file mode 100644 index 0000000000..20e8ef3291 --- /dev/null +++ b/plugins/UserSettings/images/os/PPY.gif diff --git a/plugins/UserSettings/images/os/RHT.gif b/plugins/UserSettings/images/os/RHT.gif Binary files differnew file mode 100644 index 0000000000..043947cecb --- /dev/null +++ b/plugins/UserSettings/images/os/RHT.gif diff --git a/plugins/UserSettings/images/os/SLW.gif b/plugins/UserSettings/images/os/SLW.gif Binary files differnew file mode 100644 index 0000000000..cf6f2be297 --- /dev/null +++ b/plugins/UserSettings/images/os/SLW.gif diff --git a/plugins/UserSettings/images/os/SSE.gif b/plugins/UserSettings/images/os/SSE.gif Binary files differnew file mode 100644 index 0000000000..3253aa2a75 --- /dev/null +++ b/plugins/UserSettings/images/os/SSE.gif diff --git a/plugins/UserSettings/images/os/TIZ.gif b/plugins/UserSettings/images/os/TIZ.gif Binary files differnew file mode 100644 index 0000000000..7563a5e31d --- /dev/null +++ b/plugins/UserSettings/images/os/TIZ.gif diff --git a/plugins/UserSettings/images/os/UBT.gif b/plugins/UserSettings/images/os/UBT.gif Binary files differnew file mode 100644 index 0000000000..c4789e0456 --- /dev/null +++ b/plugins/UserSettings/images/os/UBT.gif diff --git a/plugins/UserSettings/images/os/WI8.gif b/plugins/UserSettings/images/os/WI8.gif Binary files differindex 486f78064a..76ffe21587 100644 --- a/plugins/UserSettings/images/os/WI8.gif +++ b/plugins/UserSettings/images/os/WI8.gif diff --git a/plugins/UserSettings/images/os/WME.gif b/plugins/UserSettings/images/os/WME.gif Binary files differindex db610368b9..1ba0336426 100644 --- a/plugins/UserSettings/images/os/WME.gif +++ b/plugins/UserSettings/images/os/WME.gif diff --git a/plugins/UserSettings/images/os/WRT.gif b/plugins/UserSettings/images/os/WRT.gif Binary files differnew file mode 100644 index 0000000000..76ffe21587 --- /dev/null +++ b/plugins/UserSettings/images/os/WRT.gif diff --git a/plugins/UserSettings/images/os/XBT.gif b/plugins/UserSettings/images/os/XBT.gif Binary files differnew file mode 100644 index 0000000000..a80d2291cc --- /dev/null +++ b/plugins/UserSettings/images/os/XBT.gif diff --git a/plugins/UserSettings/images/os/YNS.gif b/plugins/UserSettings/images/os/YNS.gif Binary files differnew file mode 100644 index 0000000000..15f4c78e8f --- /dev/null +++ b/plugins/UserSettings/images/os/YNS.gif diff --git a/plugins/Widgetize/Controller.php b/plugins/Widgetize/Controller.php index 2b4facfd46..0061ee95f5 100644 --- a/plugins/Widgetize/Controller.php +++ b/plugins/Widgetize/Controller.php @@ -50,8 +50,7 @@ class Controller extends \Piwik\Plugin\Controller $this->init(); $controllerName = Common::getRequestVar('moduleToWidgetize'); $actionName = Common::getRequestVar('actionToWidgetize'); - $parameters = array($fetch = true); - $outputDataTable = FrontController::getInstance()->fetchDispatch($controllerName, $actionName, $parameters); + $outputDataTable = FrontController::getInstance()->fetchDispatch($controllerName, $actionName); if ($controllerName == 'Dashboard' && $actionName == 'index') { $view = new View('@Widgetize/iframe_empty'); } else { |