update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -13,6 +13,7 @@ use Piwik\Common;
|
|||
use Piwik\Date;
|
||||
use Piwik\Db;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Config;
|
||||
use Piwik\Segment;
|
||||
|
||||
/**
|
||||
|
|
@ -22,7 +23,15 @@ use Piwik\Segment;
|
|||
*/
|
||||
class API extends \Piwik\Plugin\API
|
||||
{
|
||||
const DEACTIVATE_SEGMENT_EVENT = 'SegmentEditor.deactivate';
|
||||
/**
|
||||
* @var Model
|
||||
*/
|
||||
private $model;
|
||||
|
||||
public function __construct(Model $model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
|
||||
protected function checkSegmentValue($definition, $idSite)
|
||||
{
|
||||
|
|
@ -78,18 +87,38 @@ class API extends \Piwik\Plugin\API
|
|||
protected function checkAutoArchive($autoArchive, $idSite)
|
||||
{
|
||||
$autoArchive = (int)$autoArchive;
|
||||
if ($autoArchive) {
|
||||
$exception = new Exception("To prevent abuse, autoArchive=1 requires Super User or ControllerAdmin access.");
|
||||
if (empty($idSite)) {
|
||||
if (!Piwik::hasUserSuperUserAccess()) {
|
||||
throw $exception;
|
||||
}
|
||||
} else {
|
||||
if (!Piwik::isUserHasAdminAccess($idSite)) {
|
||||
throw $exception;
|
||||
}
|
||||
}
|
||||
if (!$autoArchive) {
|
||||
return $autoArchive;
|
||||
}
|
||||
|
||||
$exception = new Exception(
|
||||
"Please contact Support to make these changes on your behalf. ".
|
||||
" To modify a pre-processed segment, a user must have admin access or super user access. "
|
||||
);
|
||||
|
||||
// Segment 'All websites' and pre-processed requires Super User
|
||||
if (empty($idSite)) {
|
||||
if (!Piwik::hasUserSuperUserAccess()) {
|
||||
throw $exception;
|
||||
}
|
||||
return $autoArchive;
|
||||
}
|
||||
|
||||
// if real-time segments are disabled, then allow user to create pre-processed report
|
||||
$realTimeSegmentsDisabled = !Config::getInstance()->General['enable_create_realtime_segments'];
|
||||
if($realTimeSegmentsDisabled) {
|
||||
// User is at least view
|
||||
if(!Piwik::isUserHasViewAccess($idSite)) {
|
||||
throw $exception;
|
||||
}
|
||||
return $autoArchive;
|
||||
}
|
||||
|
||||
// pre-processed segment for a given website requires admin access
|
||||
if(!Piwik::isUserHasAdminAccess($idSite)) {
|
||||
throw $exception;
|
||||
}
|
||||
|
||||
return $autoArchive;
|
||||
}
|
||||
|
||||
|
|
@ -100,6 +129,7 @@ class API extends \Piwik\Plugin\API
|
|||
if (empty($segment)) {
|
||||
throw new Exception("Requested segment not found");
|
||||
}
|
||||
|
||||
return $segment;
|
||||
}
|
||||
|
||||
|
|
@ -110,12 +140,45 @@ class API extends \Piwik\Plugin\API
|
|||
}
|
||||
}
|
||||
|
||||
protected function checkUserCanModifySegment($segment)
|
||||
protected function checkUserCanAddNewSegment($idSite)
|
||||
{
|
||||
if(Piwik::hasUserSuperUserAccess()) {
|
||||
if (empty($idSite)
|
||||
&& !SegmentEditor::isAddingSegmentsForAllWebsitesEnabled()
|
||||
) {
|
||||
throw new Exception(Piwik::translate('SegmentEditor_AddingSegmentForAllWebsitesDisabled'));
|
||||
}
|
||||
|
||||
if (!$this->isUserCanAddNewSegment($idSite)) {
|
||||
throw new Exception(Piwik::translate('SegmentEditor_YouDontHaveAccessToCreateSegments'));
|
||||
}
|
||||
}
|
||||
|
||||
public function isUserCanAddNewSegment($idSite)
|
||||
{
|
||||
if (Piwik::isUserIsAnonymous()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$requiredAccess = Config::getInstance()->General['adding_segment_requires_access'];
|
||||
|
||||
$authorized =
|
||||
($requiredAccess == 'view' && Piwik::isUserHasViewAccess($idSite)) ||
|
||||
($requiredAccess == 'admin' && Piwik::isUserHasAdminAccess($idSite)) ||
|
||||
($requiredAccess == 'superuser' && Piwik::hasUserSuperUserAccess())
|
||||
;
|
||||
|
||||
return $authorized;
|
||||
}
|
||||
|
||||
protected function checkUserCanEditOrDeleteSegment($segment)
|
||||
{
|
||||
if (Piwik::hasUserSuperUserAccess()) {
|
||||
return;
|
||||
}
|
||||
if($segment['login'] != Piwik::getCurrentUserLogin()) {
|
||||
|
||||
$this->checkUserIsNotAnonymous();
|
||||
|
||||
if ($segment['login'] != Piwik::getCurrentUserLogin()) {
|
||||
throw new Exception($this->getMessageCannotEditSegmentCreatedBySuperUser());
|
||||
}
|
||||
}
|
||||
|
|
@ -128,19 +191,29 @@ class API extends \Piwik\Plugin\API
|
|||
*/
|
||||
public function delete($idSegment)
|
||||
{
|
||||
$this->checkUserIsNotAnonymous();
|
||||
|
||||
$segment = $this->getSegmentOrFail($idSegment);
|
||||
$this->checkUserCanEditOrDeleteSegment($segment);
|
||||
|
||||
$this->checkUserCanModifySegment($segment);
|
||||
/**
|
||||
* Triggered before a segment is deleted or made invisible.
|
||||
*
|
||||
* This event can be used by plugins to throw an exception
|
||||
* or do something else.
|
||||
*
|
||||
* @param int $idSegment The ID of the segment being deleted.
|
||||
*/
|
||||
Piwik::postEvent('SegmentEditor.deactivate', array($idSegment));
|
||||
|
||||
$this->sendSegmentDeactivationEvent($idSegment);
|
||||
$this->getModel()->deleteSegment($idSegment);
|
||||
|
||||
$db = Db::get();
|
||||
$db->delete(Common::prefixTable('segment'), 'idsegment = ' . $idSegment);
|
||||
return true;
|
||||
}
|
||||
|
||||
private function getModel()
|
||||
{
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Modifies an existing stored segment.
|
||||
*
|
||||
|
|
@ -155,20 +228,14 @@ class API extends \Piwik\Plugin\API
|
|||
*/
|
||||
public function update($idSegment, $name, $definition, $idSite = false, $autoArchive = false, $enabledAllUsers = false)
|
||||
{
|
||||
$this->checkUserIsNotAnonymous();
|
||||
$segment = $this->getSegmentOrFail($idSegment);
|
||||
|
||||
$this->checkUserCanModifySegment($segment);
|
||||
$this->checkUserCanEditOrDeleteSegment($segment);
|
||||
|
||||
$idSite = $this->checkIdSite($idSite);
|
||||
$this->checkSegmentName($name);
|
||||
$definition = $this->checkSegmentValue($definition, $idSite);
|
||||
$definition = $this->checkSegmentValue($definition, $idSite);
|
||||
$enabledAllUsers = $this->checkEnabledAllUsers($enabledAllUsers);
|
||||
$autoArchive = $this->checkAutoArchive($autoArchive, $idSite);
|
||||
|
||||
if ($this->segmentVisibilityIsReduced($idSite, $enabledAllUsers, $segment)) {
|
||||
$this->sendSegmentDeactivationEvent($idSegment);
|
||||
}
|
||||
$autoArchive = $this->checkAutoArchive($autoArchive, $idSite);
|
||||
|
||||
$bind = array(
|
||||
'name' => $name,
|
||||
|
|
@ -179,11 +246,18 @@ class API extends \Piwik\Plugin\API
|
|||
'ts_last_edit' => Date::now()->getDatetime(),
|
||||
);
|
||||
|
||||
$db = Db::get();
|
||||
$db->update(Common::prefixTable("segment"),
|
||||
$bind,
|
||||
"idsegment = $idSegment"
|
||||
);
|
||||
/**
|
||||
* Triggered before a segment is modified.
|
||||
*
|
||||
* This event can be used by plugins to throw an exception
|
||||
* or do something else.
|
||||
*
|
||||
* @param int $idSegment The ID of the segment which visibility is reduced.
|
||||
*/
|
||||
Piwik::postEvent('SegmentEditor.update', array($idSegment, $bind));
|
||||
|
||||
$this->getModel()->updateSegment($idSegment, $bind);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -200,14 +274,13 @@ class API extends \Piwik\Plugin\API
|
|||
*/
|
||||
public function add($name, $definition, $idSite = false, $autoArchive = false, $enabledAllUsers = false)
|
||||
{
|
||||
$this->checkUserIsNotAnonymous();
|
||||
$this->checkUserCanAddNewSegment($idSite);
|
||||
$idSite = $this->checkIdSite($idSite);
|
||||
$this->checkSegmentName($name);
|
||||
$definition = $this->checkSegmentValue($definition, $idSite);
|
||||
$enabledAllUsers = $this->checkEnabledAllUsers($enabledAllUsers);
|
||||
$autoArchive = $this->checkAutoArchive($autoArchive, $idSite);
|
||||
|
||||
$db = Db::get();
|
||||
$bind = array(
|
||||
'name' => $name,
|
||||
'definition' => $definition,
|
||||
|
|
@ -218,8 +291,10 @@ class API extends \Piwik\Plugin\API
|
|||
'ts_created' => Date::now()->getDatetime(),
|
||||
'deleted' => 0,
|
||||
);
|
||||
$db->insert(Common::prefixTable("segment"), $bind);
|
||||
return $db->lastInsertId();
|
||||
|
||||
$id = $this->getModel()->createSegment($bind);
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -232,12 +307,12 @@ class API extends \Piwik\Plugin\API
|
|||
public function get($idSegment)
|
||||
{
|
||||
Piwik::checkUserHasSomeViewAccess();
|
||||
|
||||
if (!is_numeric($idSegment)) {
|
||||
throw new Exception("idSegment should be numeric.");
|
||||
}
|
||||
$segment = Db::get()->fetchRow("SELECT * " .
|
||||
" FROM " . Common::prefixTable("segment") .
|
||||
" WHERE idsegment = ?", $idSegment);
|
||||
|
||||
$segment = $this->getModel()->getSegment($idSegment);
|
||||
|
||||
if (empty($segment)) {
|
||||
return false;
|
||||
|
|
@ -255,6 +330,7 @@ class API extends \Piwik\Plugin\API
|
|||
if ($segment['deleted']) {
|
||||
throw new Exception("This segment is marked as deleted. ");
|
||||
}
|
||||
|
||||
return $segment;
|
||||
}
|
||||
|
||||
|
|
@ -274,46 +350,51 @@ class API extends \Piwik\Plugin\API
|
|||
|
||||
$userLogin = Piwik::getCurrentUserLogin();
|
||||
|
||||
$model = new Model();
|
||||
if (empty($idSite)) {
|
||||
$segments = $model->getAllSegments($userLogin);
|
||||
$model = $this->getModel();
|
||||
if(Piwik::hasUserSuperUserAccess()) {
|
||||
$segments = $model->getAllSegmentsForAllUsers($idSite);
|
||||
} else {
|
||||
$segments = $model->getAllSegmentsForSite($idSite, $userLogin);
|
||||
if (empty($idSite)) {
|
||||
$segments = $model->getAllSegments($userLogin);
|
||||
} else {
|
||||
$segments = $model->getAllSegmentsForSite($idSite, $userLogin);
|
||||
}
|
||||
}
|
||||
|
||||
$segments = $this->sortSegmentsCreatedByUserFirst($segments);
|
||||
|
||||
return $segments;
|
||||
}
|
||||
|
||||
/**
|
||||
* When deleting or making a segment invisible, allow plugins to throw an exception or propagate the action
|
||||
* Sorts segment in a particular order:
|
||||
*
|
||||
* @param $idSegment
|
||||
* 1) my segments
|
||||
* 2) segments created by the super user that were shared with all users
|
||||
* 3) segments created by other users (which are visible to all super users)
|
||||
*
|
||||
* @param $segments
|
||||
* @return array
|
||||
*/
|
||||
private function sendSegmentDeactivationEvent($idSegment)
|
||||
private function sortSegmentsCreatedByUserFirst($segments)
|
||||
{
|
||||
/**
|
||||
* Triggered before a segment is deleted or made invisible.
|
||||
*
|
||||
* This event can be used by plugins to throw an exception
|
||||
* or do something else.
|
||||
*
|
||||
* @param int $idSegment The ID of the segment being deleted.
|
||||
*/
|
||||
Piwik::postEvent(self::DEACTIVATE_SEGMENT_EVENT, array($idSegment));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $idSiteNewValue
|
||||
* @param $enableAllUserNewValue
|
||||
* @param $segment
|
||||
* @return bool
|
||||
*/
|
||||
private function segmentVisibilityIsReduced($idSiteNewValue, $enableAllUserNewValue, $segment)
|
||||
{
|
||||
$allUserVisibilityIsDropped = $segment['enable_all_users'] && !$enableAllUserNewValue;
|
||||
$allWebsiteVisibilityIsDropped = !isset($segment['idSite']) && $idSiteNewValue;
|
||||
|
||||
return $allUserVisibilityIsDropped || $allWebsiteVisibilityIsDropped;
|
||||
$orderedSegments = array();
|
||||
foreach($segments as $id => &$segment) {
|
||||
if($segment['login'] == Piwik::getCurrentUserLogin()) {
|
||||
$orderedSegments[] = $segment;
|
||||
unset($segments[$id]);
|
||||
}
|
||||
}
|
||||
foreach($segments as $id => &$segment) {
|
||||
if($segment['enable_all_users'] == 1) {
|
||||
$orderedSegments[] = $segment;
|
||||
unset($segments[$id]);
|
||||
}
|
||||
}
|
||||
foreach($segments as $id => &$segment) {
|
||||
$orderedSegments[] = $segment;
|
||||
}
|
||||
return $orderedSegments;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\SegmentEditor;
|
||||
|
||||
/**
|
||||
*/
|
||||
class Controller extends \Piwik\Plugin\Controller
|
||||
{
|
||||
public function getSelector()
|
||||
{
|
||||
$selector = new SegmentSelectorControl();
|
||||
return $selector->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,18 +8,37 @@
|
|||
*/
|
||||
namespace Piwik\Plugins\SegmentEditor;
|
||||
|
||||
use Exception;
|
||||
use Piwik\Common;
|
||||
use Piwik\Date;
|
||||
use Piwik\Db;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Segment;
|
||||
use Piwik\DbHelper;
|
||||
|
||||
/**
|
||||
* The SegmentEditor Model lets you persist and read custom Segments from the backend without handling any logic.
|
||||
*/
|
||||
class Model
|
||||
{
|
||||
private static $rawPrefix = 'segment';
|
||||
|
||||
protected function getTable()
|
||||
{
|
||||
return Common::prefixTable(self::$rawPrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all stored segments that haven't been deleted. Ignores the site the segments are enabled
|
||||
* for and whether to auto archive or not.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllSegmentsAndIgnoreVisibility()
|
||||
{
|
||||
$sql = "SELECT * FROM " . $this->getTable() . " WHERE deleted = 0";
|
||||
|
||||
$segments = $this->getDb()->fetchAll($sql);
|
||||
|
||||
return $segments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all stored segments.
|
||||
*
|
||||
|
|
@ -40,7 +59,7 @@ class Model
|
|||
$sql = $this->buildQuerySortedByName("($whereIdSite enable_only_idsite = 0)
|
||||
AND deleted = 0 AND auto_archive = 1");
|
||||
|
||||
$segments = Db::get()->fetchAll($sql, $bind);
|
||||
$segments = $this->getDb()->fetchAll($sql, $bind);
|
||||
|
||||
return $segments;
|
||||
}
|
||||
|
|
@ -56,7 +75,7 @@ class Model
|
|||
$bind = array($userLogin);
|
||||
$sql = $this->buildQuerySortedByName('deleted = 0 AND (enable_all_users = 1 OR login = ?)');
|
||||
|
||||
$segments = Db::get()->fetchAll($sql, $bind);
|
||||
$segments = $this->getDb()->fetchAll($sql, $bind);
|
||||
|
||||
return $segments;
|
||||
}
|
||||
|
|
@ -74,16 +93,90 @@ class Model
|
|||
$sql = $this->buildQuerySortedByName('(enable_only_idsite = ? OR enable_only_idsite = 0)
|
||||
AND deleted = 0
|
||||
AND (enable_all_users = 1 OR login = ?)');
|
||||
$segments = Db::get()->fetchAll($sql, $bind);
|
||||
$segments = $this->getDb()->fetchAll($sql, $bind);
|
||||
|
||||
return $segments;
|
||||
}
|
||||
|
||||
/**
|
||||
* This should be used _only_ by Super Users
|
||||
* @param $idSite
|
||||
* @return array
|
||||
*/
|
||||
public function getAllSegmentsForAllUsers($idSite = false)
|
||||
{
|
||||
$bind = array();
|
||||
$sqlWhereCondition = '';
|
||||
|
||||
if(!empty($idSite)) {
|
||||
$bind = array($idSite);
|
||||
$sqlWhereCondition = '(enable_only_idsite = ? OR enable_only_idsite = 0) AND';
|
||||
}
|
||||
|
||||
$sqlWhereCondition = $this->buildQuerySortedByName($sqlWhereCondition . ' deleted = 0');
|
||||
$segments = $this->getDb()->fetchAll($sqlWhereCondition, $bind);
|
||||
|
||||
return $segments;
|
||||
}
|
||||
|
||||
public function deleteSegment($idSegment)
|
||||
{
|
||||
$db = $this->getDb();
|
||||
$db->delete($this->getTable(), 'idsegment = ' . (int) $idSegment);
|
||||
}
|
||||
|
||||
public function updateSegment($idSegment, $segment)
|
||||
{
|
||||
$idSegment = (int) $idSegment;
|
||||
|
||||
$db = $this->getDb();
|
||||
$db->update($this->getTable(), $segment, "idsegment = $idSegment");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function createSegment($segment)
|
||||
{
|
||||
$db = $this->getDb();
|
||||
$db->insert($this->getTable(), $segment);
|
||||
$id = $db->lastInsertId();
|
||||
|
||||
return $id;
|
||||
}
|
||||
|
||||
public function getSegment($idSegment)
|
||||
{
|
||||
$db = $this->getDb();
|
||||
$segment = $db->fetchRow("SELECT * FROM " . $this->getTable() . " WHERE idsegment = ?", $idSegment);
|
||||
|
||||
return $segment;
|
||||
}
|
||||
|
||||
private function getDb()
|
||||
{
|
||||
return Db::get();
|
||||
}
|
||||
|
||||
private function buildQuerySortedByName($where)
|
||||
{
|
||||
$sql = "SELECT * FROM " . Common::prefixTable("segment") .
|
||||
" WHERE $where ORDER BY name ASC";
|
||||
|
||||
return $sql;
|
||||
return "SELECT * FROM " . $this->getTable() . " WHERE $where ORDER BY name ASC";
|
||||
}
|
||||
|
||||
public static function install()
|
||||
{
|
||||
$segmentTable = "`idsegment` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`definition` TEXT NOT NULL,
|
||||
`login` VARCHAR(100) NOT NULL,
|
||||
`enable_all_users` tinyint(4) NOT NULL default 0,
|
||||
`enable_only_idsite` INTEGER(11) NULL,
|
||||
`auto_archive` tinyint(4) NOT NULL default 0,
|
||||
`ts_created` TIMESTAMP NULL,
|
||||
`ts_last_edit` TIMESTAMP NULL,
|
||||
`deleted` tinyint(4) NOT NULL default 0,
|
||||
PRIMARY KEY (`idsegment`)";
|
||||
|
||||
DbHelper::createTable(self::$rawPrefix, $segmentTable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,35 +8,17 @@
|
|||
*/
|
||||
namespace Piwik\Plugins\SegmentEditor;
|
||||
|
||||
use Exception;
|
||||
use Piwik\Common;
|
||||
use Piwik\Config;
|
||||
use Piwik\Db;
|
||||
use Piwik\DbHelper;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Version;
|
||||
|
||||
/**
|
||||
*/
|
||||
class SegmentEditor extends \Piwik\Plugin
|
||||
{
|
||||
/**
|
||||
* @see Piwik\Plugin::getInformation
|
||||
* @see Piwik\Plugin::registerEvents
|
||||
*/
|
||||
public function getInformation()
|
||||
{
|
||||
return array(
|
||||
'description' => 'Create and reuse custom visitor Segments with the Segment Editor.',
|
||||
'authors' => array(array('name' => 'Piwik', 'homepage' => 'http://piwik.org/')),
|
||||
'version' => Version::VERSION,
|
||||
'license' => 'GPL v3+',
|
||||
'license_homepage' => 'http://www.gnu.org/licenses/gpl.html'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Piwik\Plugin::getListHooksRegistered
|
||||
*/
|
||||
public function getListHooksRegistered()
|
||||
public function registerEvents()
|
||||
{
|
||||
return array(
|
||||
'Segments.getKnownSegmentsToArchiveForSite' => 'getKnownSegmentsToArchiveForSite',
|
||||
|
|
@ -44,13 +26,14 @@ class SegmentEditor extends \Piwik\Plugin
|
|||
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
|
||||
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
|
||||
'Template.nextToCalendar' => 'getSegmentEditorHtml',
|
||||
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
|
||||
);
|
||||
}
|
||||
|
||||
function getSegmentEditorHtml(&$out)
|
||||
{
|
||||
$controller = new Controller();
|
||||
$out .= $controller->getSelector();
|
||||
$selector = new SegmentSelectorControl();
|
||||
$out .= $selector->render();
|
||||
}
|
||||
|
||||
public function getKnownSegmentsToArchiveAllSites(&$segments)
|
||||
|
|
@ -69,27 +52,17 @@ class SegmentEditor extends \Piwik\Plugin
|
|||
{
|
||||
$model = new Model();
|
||||
$segmentToAutoArchive = $model->getSegmentsToAutoArchive($idSite);
|
||||
|
||||
foreach ($segmentToAutoArchive as $segmentInfo) {
|
||||
$segments[] = $segmentInfo['definition'];
|
||||
}
|
||||
|
||||
$segments = array_unique($segments);
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
$segmentTable = "`idsegment` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`definition` TEXT NOT NULL,
|
||||
`login` VARCHAR(100) NOT NULL,
|
||||
`enable_all_users` tinyint(4) NOT NULL default 0,
|
||||
`enable_only_idsite` INTEGER(11) NULL,
|
||||
`auto_archive` tinyint(4) NOT NULL default 0,
|
||||
`ts_created` TIMESTAMP NULL,
|
||||
`ts_last_edit` TIMESTAMP NULL,
|
||||
`deleted` tinyint(4) NOT NULL default 0,
|
||||
PRIMARY KEY (`idsegment`)";
|
||||
|
||||
DbHelper::createTable('segment', $segmentTable);
|
||||
Model::install();
|
||||
}
|
||||
|
||||
public function getJsFiles(&$jsFiles)
|
||||
|
|
@ -101,4 +74,21 @@ class SegmentEditor extends \Piwik\Plugin
|
|||
{
|
||||
$stylesheets[] = "plugins/SegmentEditor/stylesheets/segmentation.less";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether adding segments for all websites is enabled or not.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isAddingSegmentsForAllWebsitesEnabled()
|
||||
{
|
||||
return Config::getInstance()->General['allow_adding_segments_for_all_websites'] == 1;
|
||||
}
|
||||
|
||||
public function getClientSideTranslationKeys(&$translationKeys)
|
||||
{
|
||||
$translationKeys[] = 'SegmentEditor_CustomSegment';
|
||||
$translationKeys[] = 'SegmentEditor_VisibleToSuperUser';
|
||||
$translationKeys[] = 'SegmentEditor_SharedWithYou';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
147
www/analytics/plugins/SegmentEditor/SegmentFormatter.php
Normal file
147
www/analytics/plugins/SegmentEditor/SegmentFormatter.php
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\SegmentEditor;
|
||||
|
||||
use Exception;
|
||||
use Piwik\Config;
|
||||
use Piwik\Db;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Segment;
|
||||
use Piwik\Segment\SegmentExpression;
|
||||
|
||||
/**
|
||||
*/
|
||||
class SegmentFormatter
|
||||
{
|
||||
/**
|
||||
* @var SegmentList
|
||||
*/
|
||||
private $segmentList;
|
||||
|
||||
private $matchesMetric = array(
|
||||
SegmentExpression::MATCH_EQUAL => 'General_OperationEquals',
|
||||
SegmentExpression::MATCH_NOT_EQUAL => 'General_OperationNotEquals',
|
||||
SegmentExpression::MATCH_LESS_OR_EQUAL => 'General_OperationAtMost',
|
||||
SegmentExpression::MATCH_GREATER_OR_EQUAL => 'General_OperationAtLeast',
|
||||
SegmentExpression::MATCH_LESS => 'General_OperationLessThan',
|
||||
SegmentExpression::MATCH_GREATER => 'General_OperationGreaterThan',
|
||||
);
|
||||
|
||||
private $matchesDimension = array(
|
||||
SegmentExpression::MATCH_EQUAL => 'General_OperationIs',
|
||||
SegmentExpression::MATCH_NOT_EQUAL => 'General_OperationIsNot',
|
||||
SegmentExpression::MATCH_CONTAINS => 'General_OperationContains',
|
||||
SegmentExpression::MATCH_DOES_NOT_CONTAIN => 'General_OperationDoesNotContain',
|
||||
SegmentExpression::MATCH_STARTS_WITH => 'General_OperationStartsWith',
|
||||
SegmentExpression::MATCH_ENDS_WITH => 'General_OperationEndsWith'
|
||||
);
|
||||
|
||||
private $operators = array(
|
||||
SegmentExpression::BOOL_OPERATOR_AND => 'General_And',
|
||||
SegmentExpression::BOOL_OPERATOR_OR => 'General_Or',
|
||||
SegmentExpression::BOOL_OPERATOR_END => '',
|
||||
);
|
||||
|
||||
public function __construct(SegmentList $segmentList)
|
||||
{
|
||||
$this->segmentList = $segmentList;
|
||||
}
|
||||
|
||||
public function getHumanReadable($segmentString, $idSite)
|
||||
{
|
||||
if (empty($segmentString)) {
|
||||
return Piwik::translate('SegmentEditor_DefaultAllVisits');
|
||||
}
|
||||
|
||||
try {
|
||||
$segment = new SegmentExpression(urldecode($segmentString));
|
||||
$expressions = $segment->parseSubExpressions();
|
||||
} catch (Exception $e) {
|
||||
$segment = new SegmentExpression($segmentString);
|
||||
$expressions = $segment->parseSubExpressions();
|
||||
}
|
||||
|
||||
$readable = '';
|
||||
foreach ($expressions as $expression) {
|
||||
$operator = $expression[SegmentExpression::INDEX_BOOL_OPERATOR];
|
||||
$operand = $expression[SegmentExpression::INDEX_OPERAND];
|
||||
$name = $operand[SegmentExpression::INDEX_OPERAND_NAME];
|
||||
|
||||
$segment = $this->segmentList->findSegment($name, $idSite);
|
||||
|
||||
if (empty($segment)) {
|
||||
throw new Exception(sprintf("The segment '%s' does not exist.", $name));
|
||||
}
|
||||
|
||||
$readable .= $segment['name'] . ' ';
|
||||
$readable .= $this->getTranslationForComparison($operand, $segment['type']) . ' ';
|
||||
$readable .= $this->getFormattedValue($operand);
|
||||
$readable .= $this->getTranslationForBoolOperator($operator) . ' ';
|
||||
}
|
||||
|
||||
$readable = trim($readable);
|
||||
|
||||
return $readable;
|
||||
}
|
||||
|
||||
private function getTranslationForComparison($operand, $segmentType)
|
||||
{
|
||||
$operator = $operand[SegmentExpression::INDEX_OPERAND_OPERATOR];
|
||||
|
||||
$translation = $operator;
|
||||
|
||||
if ($operator === SegmentExpression::MATCH_IS_NULL_OR_EMPTY) {
|
||||
return Piwik::translate('SegmentEditor_SegmentOperatorIsNullOrEmpty');
|
||||
}
|
||||
|
||||
if ($operator === SegmentExpression::MATCH_IS_NOT_NULL_NOR_EMPTY) {
|
||||
return Piwik::translate('SegmentEditor_SegmentOperatorIsNotNullNorEmpty');
|
||||
}
|
||||
|
||||
if ($segmentType === 'dimension' && !empty($this->matchesDimension[$operator])) {
|
||||
$translation = Piwik::translate($this->matchesDimension[$operator]);
|
||||
}
|
||||
if ($segmentType === 'metric' && !empty($this->matchesMetric[$operator])) {
|
||||
$translation = Piwik::translate($this->matchesMetric[$operator]);
|
||||
}
|
||||
|
||||
return strtolower($translation);
|
||||
}
|
||||
|
||||
private function getFormattedValue($operand)
|
||||
{
|
||||
$operator = $operand[SegmentExpression::INDEX_OPERAND_OPERATOR];
|
||||
|
||||
if ($operator === SegmentExpression::MATCH_IS_NULL_OR_EMPTY
|
||||
|| $operator === SegmentExpression::MATCH_IS_NOT_NULL_NOR_EMPTY) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$value = $operand[SegmentExpression::INDEX_OPERAND_VALUE];
|
||||
|
||||
if (empty($value)) {
|
||||
$value = '';
|
||||
}
|
||||
|
||||
return '"' . $value . '" ';
|
||||
}
|
||||
|
||||
private function getTranslationForBoolOperator($operator)
|
||||
{
|
||||
$translation = '';
|
||||
|
||||
if (!empty($this->operators[$operator])) {
|
||||
$translation = Piwik::translate($this->operators[$operator]);
|
||||
} elseif (!empty($operator)) {
|
||||
$translation = $operator;
|
||||
}
|
||||
|
||||
return $translation;
|
||||
}
|
||||
}
|
||||
32
www/analytics/plugins/SegmentEditor/SegmentList.php
Normal file
32
www/analytics/plugins/SegmentEditor/SegmentList.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\SegmentEditor;
|
||||
|
||||
use Piwik\API\Request;
|
||||
use Piwik\Config;
|
||||
use Piwik\Db;
|
||||
|
||||
/**
|
||||
*/
|
||||
class SegmentList
|
||||
{
|
||||
public function findSegment($segmentName, $idSite)
|
||||
{
|
||||
$segments = Request::processRequest('API.getSegmentsMetadata', array(
|
||||
'idSites' => array($idSite),
|
||||
));
|
||||
|
||||
foreach ($segments as $segment) {
|
||||
if ($segment['segment'] == $segmentName && !empty($segmentName)) {
|
||||
return $segment;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace Piwik\Plugins\SegmentEditor;
|
||||
|
||||
use Piwik\DataAccess\LogQueryBuilder;
|
||||
use Piwik\Plugins\SegmentEditor\Services\StoredSegmentService;
|
||||
use Piwik\Segment\SegmentExpression;
|
||||
use Piwik\SettingsServer;
|
||||
|
||||
/**
|
||||
* Decorates segment sub-queries in archiving queries w/ the idSegment of the segment, if
|
||||
* a stored segment exists.
|
||||
*
|
||||
* This class is configured for use in SegmentEditor's DI config.
|
||||
*/
|
||||
class SegmentQueryDecorator extends LogQueryBuilder
|
||||
{
|
||||
/**
|
||||
* @var StoredSegmentService
|
||||
*/
|
||||
private $storedSegmentService;
|
||||
|
||||
public function __construct(StoredSegmentService $storedSegmentService)
|
||||
{
|
||||
$this->storedSegmentService = $storedSegmentService;
|
||||
}
|
||||
|
||||
public function getSelectQueryString(SegmentExpression $segmentExpression, $select, $from, $where, $bind, $groupBy,
|
||||
$orderBy, $limit)
|
||||
{
|
||||
$result = parent::getSelectQueryString($segmentExpression, $select, $from, $where, $bind, $groupBy, $orderBy,
|
||||
$limit);
|
||||
|
||||
$prefixParts = array();
|
||||
|
||||
if (SettingsServer::isArchivePhpTriggered()) {
|
||||
$prefixParts[] = 'trigger = CronArchive';
|
||||
}
|
||||
|
||||
$idSegments = $this->getSegmentIdOfExpression($segmentExpression);
|
||||
if (!empty($idSegments)) {
|
||||
$prefixParts[] = "idSegments = [" . implode(', ', $idSegments) . "]";
|
||||
}
|
||||
|
||||
if (!empty($prefixParts)) {
|
||||
$result['sql'] = "/* " . implode(', ', $prefixParts) . " */\n" . $result['sql'];
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function getSegmentIdOfExpression(SegmentExpression $segmentExpression)
|
||||
{
|
||||
$allSegments = $this->storedSegmentService->getAllSegmentsAndIgnoreVisibility();
|
||||
|
||||
$idSegments = array();
|
||||
foreach ($allSegments as $segment) {
|
||||
if ($segmentExpression->getSegmentDefinition() == $segment['definition']) {
|
||||
$idSegments[] = $segment['idsegment'];
|
||||
}
|
||||
}
|
||||
return $idSegments;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -8,11 +8,14 @@
|
|||
*/
|
||||
namespace Piwik\Plugins\SegmentEditor;
|
||||
|
||||
use Piwik\API\Request;
|
||||
use Piwik\Common;
|
||||
use Piwik\Config;
|
||||
use Piwik\Container\StaticContainer;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\API\API as APIMetadata;
|
||||
use Piwik\View\UIControl;
|
||||
use Piwik\Plugins\SegmentEditor\API as SegmentEditorAPI;
|
||||
|
||||
/**
|
||||
* Generates the HTML for the segment selector control (which includes the segment editor).
|
||||
|
|
@ -30,17 +33,23 @@ class SegmentSelectorControl extends UIControl
|
|||
|
||||
$this->jsClass = "SegmentSelectorControl";
|
||||
$this->cssIdentifier = "segmentEditorPanel";
|
||||
$this->cssClass = "piwikTopControl";
|
||||
$this->cssClass = "piwikTopControl borderedControl piwikSelector";
|
||||
|
||||
$this->idSite = $idSite ?: Common::getRequestVar('idSite', false, 'int');
|
||||
|
||||
$this->selectedSegment = Common::getRequestVar('segment', false, 'string');
|
||||
|
||||
$formatter = StaticContainer::get('Piwik\Plugins\SegmentEditor\SegmentFormatter');
|
||||
$this->segmentDescription = $formatter->getHumanReadable(Request::getRawSegmentFromRequest(), $this->idSite);
|
||||
|
||||
$this->isAddingSegmentsForAllWebsitesEnabled = SegmentEditor::isAddingSegmentsForAllWebsitesEnabled();
|
||||
|
||||
$segments = APIMetadata::getInstance()->getSegmentsMetadata($this->idSite);
|
||||
|
||||
$segmentsByCategory = $customVariablesSegments = array();
|
||||
$visitTitle = Piwik::translate('General_Visit');
|
||||
$segmentsByCategory = array();
|
||||
foreach ($segments as $segment) {
|
||||
if ($segment['category'] == Piwik::translate('General_Visit')
|
||||
if ($segment['category'] == $visitTitle
|
||||
&& ($segment['type'] == 'metric' && $segment['segment'] != 'visitIp')
|
||||
) {
|
||||
$metricsLabel = Piwik::translate('General_Metrics');
|
||||
|
|
@ -49,7 +58,6 @@ class SegmentSelectorControl extends UIControl
|
|||
}
|
||||
$segmentsByCategory[$segment['category']][] = $segment;
|
||||
}
|
||||
uksort($segmentsByCategory, array($this, 'sortSegmentCategories'));
|
||||
|
||||
$this->createRealTimeSegmentsIsEnabled = Config::getInstance()->General['enable_create_realtime_segments'];
|
||||
$this->segmentsByCategory = $segmentsByCategory;
|
||||
|
|
@ -67,7 +75,8 @@ class SegmentSelectorControl extends UIControl
|
|||
}
|
||||
}
|
||||
|
||||
$this->authorizedToCreateSegments = !Piwik::isUserIsAnonymous();
|
||||
$this->authorizedToCreateSegments = SegmentEditorAPI::getInstance()->isUserCanAddNewSegment($this->idSite);
|
||||
$this->isUserAnonymous = Piwik::isUserIsAnonymous();
|
||||
$this->segmentTranslations = $this->getTranslations();
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +85,8 @@ class SegmentSelectorControl extends UIControl
|
|||
return array('availableSegments',
|
||||
'segmentTranslations',
|
||||
'isSegmentNotAppliedBecauseBrowserArchivingIsDisabled',
|
||||
'selectedSegment');
|
||||
'selectedSegment',
|
||||
'authorizedToCreateSegments');
|
||||
}
|
||||
|
||||
private function wouldApplySegment($savedSegment)
|
||||
|
|
@ -90,15 +100,6 @@ class SegmentSelectorControl extends UIControl
|
|||
return (bool) $savedSegment['auto_archive'];
|
||||
}
|
||||
|
||||
public function sortSegmentCategories($a, $b)
|
||||
{
|
||||
// Custom Variables last
|
||||
if ($a == Piwik::translate('CustomVariables_CustomVariables')) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private function getTranslations()
|
||||
{
|
||||
$translationKeys = array(
|
||||
|
|
@ -110,6 +111,8 @@ class SegmentSelectorControl extends UIControl
|
|||
'General_OperationGreaterThan',
|
||||
'General_OperationContains',
|
||||
'General_OperationDoesNotContain',
|
||||
'General_OperationStartsWith',
|
||||
'General_OperationEndsWith',
|
||||
'General_OperationIs',
|
||||
'General_OperationIsNot',
|
||||
'General_OperationContains',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace Piwik\Plugins\SegmentEditor\Services;
|
||||
|
||||
use Piwik\Plugins\SegmentEditor\Model;
|
||||
use Piwik\Cache\Transient as TransientCache;
|
||||
|
||||
|
||||
/**
|
||||
* Service layer class for stored segments.
|
||||
*/
|
||||
class StoredSegmentService
|
||||
{
|
||||
/**
|
||||
* @var Model
|
||||
*/
|
||||
private $model;
|
||||
|
||||
/**
|
||||
* @var TransientCache
|
||||
*/
|
||||
private $transientCache;
|
||||
|
||||
public function __construct(Model $model, TransientCache $transientCache)
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->transientCache = $transientCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all stored segments that haven't been deleted.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllSegmentsAndIgnoreVisibility()
|
||||
{
|
||||
$cacheKey = 'SegmentEditor.getAllSegmentsAndIgnoreVisibility';
|
||||
if (!$this->transientCache->contains($cacheKey)) {
|
||||
$result = $this->model->getAllSegmentsAndIgnoreVisibility();
|
||||
|
||||
$this->transientCache->save($cacheKey, $result);
|
||||
}
|
||||
return $this->transientCache->fetch($cacheKey);
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/SegmentEditor/config/config.php
Normal file
7
www/analytics/plugins/SegmentEditor/config/config.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'Piwik\DataAccess\LogQueryBuilder' => DI\get('Piwik\Plugins\SegmentEditor\SegmentQueryDecorator'),
|
||||
|
||||
);
|
||||
BIN
www/analytics/plugins/SegmentEditor/images/edit_segment.png
Normal file
BIN
www/analytics/plugins/SegmentEditor/images/edit_segment.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Piwik - Web Analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -7,6 +7,12 @@
|
|||
|
||||
Segmentation = (function($) {
|
||||
|
||||
function preselectFirstMetricMatch(rowNode)
|
||||
{
|
||||
var matchValue = $(rowNode).find('.metricMatchBlock option:first').attr('value');
|
||||
$(rowNode).find('.metricMatchBlock select').val(matchValue);
|
||||
}
|
||||
|
||||
var segmentation = function segmentation(config) {
|
||||
if (!config.target) {
|
||||
throw new Error("target property must be set in config to segment editor control element");
|
||||
|
|
@ -26,6 +32,8 @@ Segmentation = (function($) {
|
|||
|
||||
self.timer = ""; // variable for further use in timing events
|
||||
self.searchAllowed = true;
|
||||
self.filterTimer = "";
|
||||
self.filterAllowed = true;
|
||||
|
||||
self.availableMatches = [];
|
||||
self.availableMatches["metric"] = [];
|
||||
|
|
@ -35,12 +43,14 @@ Segmentation = (function($) {
|
|||
self.availableMatches["metric"][">="] = self.translations['General_OperationAtLeast'];
|
||||
self.availableMatches["metric"]["<"] = self.translations['General_OperationLessThan'];
|
||||
self.availableMatches["metric"][">"] = self.translations['General_OperationGreaterThan'];
|
||||
|
||||
|
||||
self.availableMatches["dimension"] = [];
|
||||
self.availableMatches["dimension"]["=="] = self.translations['General_OperationIs'];
|
||||
self.availableMatches["dimension"]["!="] = self.translations['General_OperationIsNot'];
|
||||
self.availableMatches["dimension"]["=@"] = self.translations['General_OperationContains'];
|
||||
self.availableMatches["dimension"]["!@"] = self.translations['General_OperationDoesNotContain'];
|
||||
self.availableMatches["dimension"]["=^"] = self.translations['General_OperationStartsWith'];
|
||||
self.availableMatches["dimension"]["=$"] = self.translations['General_OperationEndsWith'];
|
||||
|
||||
segmentation.prototype.setAvailableSegments = function (segments) {
|
||||
this.availableSegments = segments;
|
||||
|
|
@ -61,44 +71,23 @@ Segmentation = (function($) {
|
|||
this.currentSegmentStr = segmentStr;
|
||||
};
|
||||
|
||||
segmentation.prototype.shortenSegmentName = function(name, length){
|
||||
|
||||
if(typeof length === "undefined") length = 16;
|
||||
if(typeof name === "undefined") name = "";
|
||||
var i;
|
||||
|
||||
if(name.length > length)
|
||||
{
|
||||
for(i = length; i > 0; i--){
|
||||
if(name[i] === " "){
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(i == 0){
|
||||
i = length-3;
|
||||
}
|
||||
|
||||
return name.slice(0,i)+"...";
|
||||
}
|
||||
return name;
|
||||
};
|
||||
|
||||
segmentation.prototype.markCurrentSegment = function(){
|
||||
var current = this.getSegment();
|
||||
|
||||
var segmentationTitle = $(this.content).find(".segmentationTitle");
|
||||
if( current != "")
|
||||
{
|
||||
var selector = 'div.segmentList ul li[data-definition="'+current+'"]';
|
||||
var currentDecoded = piwikHelper.htmlDecode(current);
|
||||
var selector = 'div.segmentList ul li[data-definition="'+currentDecoded+'"]';
|
||||
var foundItems = $(selector, this.target);
|
||||
var title = $('<strong></strong>');
|
||||
|
||||
if( foundItems.length > 0) {
|
||||
var name = $(foundItems).first().find("span.segname").text();
|
||||
title.text(name);
|
||||
var idSegment = $(foundItems).first().attr('data-idsegment');
|
||||
var title = getSegmentName( getSegmentFromId(idSegment));
|
||||
} else {
|
||||
title.text("Custom Segment");
|
||||
title = _pk_translate('SegmentEditor_CustomSegment');
|
||||
}
|
||||
segmentationTitle.html(title);
|
||||
segmentationTitle.addClass('segment-clicked').html( title );
|
||||
}
|
||||
else {
|
||||
$(this.content).find(".segmentationTitle").text(this.translations['SegmentEditor_DefaultAllVisits']);
|
||||
|
|
@ -120,26 +109,25 @@ Segmentation = (function($) {
|
|||
};
|
||||
|
||||
var getMockedInputSet = function(){
|
||||
if(typeof mockedInputSet === "undefined"){
|
||||
var mockedInputSet = self.editorTemplate.find("div.segment-row-inputs").clone();
|
||||
}
|
||||
return mockedInputSet.clone();
|
||||
var mockedInputSet = self.editorTemplate.find("div.segment-row-inputs").clone();
|
||||
var clonedInput = mockedInputSet.clone();
|
||||
preselectFirstMetricMatch(clonedInput);
|
||||
|
||||
return clonedInput;
|
||||
};
|
||||
|
||||
var getMockedInputRowHtml = function(){
|
||||
if(typeof mockedInputRow === "undefined"){
|
||||
var mockedInputRow = '<div class="segment-row"><a class="segment-close" href="#"></a><div class="segment-row-inputs">'+getMockedInputSet().html()+'</div></div>';
|
||||
}
|
||||
var mockedInputRow = '<div class="segment-row"><a class="segment-close" href="#"></a><div class="segment-row-inputs">'+getMockedInputSet().html()+'</div></div>';
|
||||
return mockedInputRow;
|
||||
};
|
||||
|
||||
var getMockedFormRow = function(){
|
||||
if(typeof mockedFormRow === "undefined")
|
||||
{
|
||||
var mockedFormRow = self.editorTemplate.find("div.segment-rows").clone();
|
||||
$(mockedFormRow).find(".segment-row").append(getMockedInputSet()).after(getAddOrBlockButtonHtml).after(getOrDiv());
|
||||
}
|
||||
return mockedFormRow.clone();
|
||||
var mockedFormRow = self.editorTemplate.find("div.segment-rows").clone();
|
||||
$(mockedFormRow).find(".segment-row").append(getMockedInputSet()).after(getAddOrBlockButtonHtml).after(getOrDiv());
|
||||
var clonedRow = mockedFormRow.clone();
|
||||
preselectFirstMetricMatch(clonedRow);
|
||||
|
||||
return clonedRow;
|
||||
};
|
||||
|
||||
var getInitialStateRowsHtml = function(){
|
||||
|
|
@ -156,11 +144,13 @@ Segmentation = (function($) {
|
|||
};
|
||||
|
||||
var appendSpecifiedRowHtml= function(metric) {
|
||||
$(self.form).find(".segment-content > h3").after(getMockedFormRow());
|
||||
var mockedRow = getMockedFormRow();
|
||||
$(self.form).find(".segment-content > h3").after(mockedRow);
|
||||
$(self.form).find(".segment-content").append(getAndDiv());
|
||||
$(self.form).find(".segment-content").append(getAddNewBlockButtonHtml());
|
||||
doDragDropBindings();
|
||||
$(self.form).find(".metricList").val(metric).trigger("change");
|
||||
preselectFirstMetricMatch(mockedRow);
|
||||
};
|
||||
|
||||
var appendComplexRowHtml = function(block){
|
||||
|
|
@ -208,28 +198,68 @@ Segmentation = (function($) {
|
|||
var getListHtml = function() {
|
||||
var html = self.editorTemplate.find("> .listHtml").clone();
|
||||
var segment, injClass;
|
||||
|
||||
var listHtml = '<li data-idsegment="" ' +
|
||||
(self.currentSegmentStr == "" ? " class='segmentSelected' " : "")
|
||||
+ ' data-definition=""><span class="segname">' + self.translations['SegmentEditor_DefaultAllVisits']
|
||||
+ ' ' + self.translations['General_DefaultAppended']
|
||||
+ '</span></li> ';
|
||||
(self.currentSegmentStr == "" ? " class='segmentSelected' " : "")
|
||||
+ ' data-definition=""><span class="segname">' + self.translations['SegmentEditor_DefaultAllVisits']
|
||||
+ ' ' + self.translations['General_DefaultAppended']
|
||||
+ '</span></li> ';
|
||||
|
||||
var isVisibleToSuperUserNoticeAlreadyDisplayedOnce = false;
|
||||
var isVisibleToSuperUserNoticeShouldBeClosed = false;
|
||||
|
||||
var isSharedWithMeBySuperUserNoticeAlreadyDisplayedOnce = false;
|
||||
var isSharedWithMeBySuperUserNoticeShouldBeClosed = false;
|
||||
|
||||
if(self.availableSegments.length > 0) {
|
||||
|
||||
for(var i = 0; i < self.availableSegments.length; i++)
|
||||
{
|
||||
segment = self.availableSegments[i];
|
||||
|
||||
if(isSegmentSharedWithMeBySuperUser(segment) && !isSharedWithMeBySuperUserNoticeAlreadyDisplayedOnce) {
|
||||
isSharedWithMeBySuperUserNoticeAlreadyDisplayedOnce = true;
|
||||
isSharedWithMeBySuperUserNoticeShouldBeClosed = true;
|
||||
listHtml += '<span class="segmentsSharedWithMeBySuperUser"><hr> ' + _pk_translate('SegmentEditor_SharedWithYou') + ':<br/><br/>';
|
||||
}
|
||||
|
||||
if(isSegmentVisibleToSuperUserOnly(segment) && !isVisibleToSuperUserNoticeAlreadyDisplayedOnce) {
|
||||
// close <span class="segmentsSharedWithMeBySuperUser">
|
||||
if(isSharedWithMeBySuperUserNoticeShouldBeClosed) {
|
||||
isSharedWithMeBySuperUserNoticeShouldBeClosed = false;
|
||||
listHtml += '</span>';
|
||||
}
|
||||
|
||||
isVisibleToSuperUserNoticeAlreadyDisplayedOnce = true;
|
||||
isVisibleToSuperUserNoticeShouldBeClosed = true;
|
||||
listHtml += '<span class="segmentsVisibleToSuperUser"><hr> ' + _pk_translate('SegmentEditor_VisibleToSuperUser') + ':<br/><br/>';
|
||||
}
|
||||
|
||||
|
||||
injClass = "";
|
||||
if( segment.definition == self.currentSegmentStr){
|
||||
var checkSelected = segment.definition;
|
||||
if(!$.browser.mozilla) {
|
||||
checkSelected = encodeURIComponent(checkSelected);
|
||||
}
|
||||
|
||||
if( checkSelected == self.currentSegmentStr){
|
||||
injClass = 'class="segmentSelected"';
|
||||
}
|
||||
listHtml += '<li data-idsegment="'+segment.idsegment+'" data-definition="'+ (segment.definition).replace(/"/g, '"') +'" '
|
||||
+ injClass +' title="'+segment.name+'"><span class="segname">'
|
||||
+ self.shortenSegmentName(segment.name)+'</span>';
|
||||
+injClass+' title="'+ getSegmentTooltipEnrichedWithUsername(segment) +'"><span class="segname">'+getSegmentName(segment)+'</span>';
|
||||
if(self.segmentAccess == "write") {
|
||||
listHtml += '<span class="editSegment">['+ self.translations['General_Edit'].toLocaleLowerCase() +']</span>';
|
||||
listHtml += '<span class="editSegment" title="'+ self.translations['General_Edit'].toLocaleLowerCase() +'"></span>';
|
||||
}
|
||||
listHtml += '</li>';
|
||||
}
|
||||
|
||||
if(isVisibleToSuperUserNoticeShouldBeClosed) {
|
||||
listHtml += '</span>';
|
||||
}
|
||||
|
||||
if(isSharedWithMeBySuperUserNoticeShouldBeClosed) {
|
||||
listHtml += '</span>';
|
||||
}
|
||||
|
||||
$(html).find(".segmentList > ul").append(listHtml);
|
||||
if(self.segmentAccess === "write"){
|
||||
$(html).find(".add_new_segment").html(self.translations['SegmentEditor_AddNewSegment']);
|
||||
|
|
@ -245,20 +275,58 @@ Segmentation = (function($) {
|
|||
return html;
|
||||
};
|
||||
|
||||
var isSegmentVisibleToSuperUserOnly = function(segment) {
|
||||
return hasSuperUserAccessAndSegmentCreatedByAnotherUser(segment)
|
||||
&& segment.enable_all_users == 0;
|
||||
};
|
||||
|
||||
var isSegmentSharedWithMeBySuperUser = function(segment) {
|
||||
return segment.login != piwik.userLogin
|
||||
&& segment.enable_all_users == 1;
|
||||
};
|
||||
|
||||
var hasSuperUserAccessAndSegmentCreatedByAnotherUser = function(segment) {
|
||||
return piwik.hasSuperUserAccess && segment.login != piwik.userLogin;
|
||||
};
|
||||
|
||||
var getSegmentTooltipEnrichedWithUsername = function(segment) {
|
||||
var segmentName = segment.name;
|
||||
if(hasSuperUserAccessAndSegmentCreatedByAnotherUser(segment)) {
|
||||
segmentName += ' (';
|
||||
segmentName += _pk_translate('General_CreatedByUser', [segment.login]);
|
||||
|
||||
if(segment.enable_all_users == 0) {
|
||||
segmentName += ', ' + _pk_translate('SegmentEditor_VisibleToSuperUser');
|
||||
}
|
||||
|
||||
segmentName += ')';
|
||||
}
|
||||
return sanitiseSegmentName(segmentName);
|
||||
};
|
||||
|
||||
var getSegmentName = function(segment) {
|
||||
return sanitiseSegmentName(segment.name);
|
||||
};
|
||||
|
||||
var sanitiseSegmentName = function(segment) {
|
||||
segment = piwikHelper.escape(segment);
|
||||
return segment;
|
||||
}
|
||||
|
||||
var getFormHtml = function() {
|
||||
var html = self.editorTemplate.find("> .segment-element").clone();
|
||||
// set left margin to center form
|
||||
var segmentsDropdown = $(html).find(".available_segments_select");
|
||||
var segment, newOption;
|
||||
newOption = '<option data-idsegment="" data-definition="" title="'
|
||||
+ self.translations['SegmentEditor_AddNewSegment']
|
||||
+ '">' + self.translations['SegmentEditor_AddNewSegment']
|
||||
+ '</option>';
|
||||
+ self.translations['SegmentEditor_AddNewSegment']
|
||||
+ '">' + self.translations['SegmentEditor_AddNewSegment']
|
||||
+ '</option>';
|
||||
segmentsDropdown.append(newOption);
|
||||
for(var i = 0; i < self.availableSegments.length; i++)
|
||||
{
|
||||
segment = self.availableSegments[i];
|
||||
newOption = '<option data-idsegment="'+segment.idsegment+'" data-definition="'+(segment.definition).replace(/"/g, '"')+'" title="'+segment.name+'">'+self.shortenSegmentName(segment.name)+'</option>';
|
||||
newOption = '<option data-idsegment="'+segment.idsegment+'" data-definition="'+(segment.definition).replace(/"/g, '"')+'" title="'+getSegmentTooltipEnrichedWithUsername(segment)+'">'+getSegmentName(segment)+'</option>';
|
||||
segmentsDropdown.append(newOption);
|
||||
}
|
||||
$(html).find(".segment-content > h3").after(getInitialStateRowsHtml()).show();
|
||||
|
|
@ -267,14 +335,13 @@ Segmentation = (function($) {
|
|||
|
||||
var closeAllOpenLists = function() {
|
||||
$(".segmentationContainer", self.target).each(function() {
|
||||
if($(this).closest('.segmentEditorPanel').hasClass("visible"))
|
||||
if($(this).closest('.segmentEditorPanel').hasClass("expanded"))
|
||||
$(this).trigger("click");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
var findAndExplodeByMatch = function(metric){
|
||||
var matches = ["==" , "!=" , "<=", ">=", "=@" , "!@","<",">"];
|
||||
var matches = ["==" , "!=" , "<=", ">=", "=@" , "!@","<",">", "=^", "=$"];
|
||||
var newMetric = {};
|
||||
var minPos = metric.length;
|
||||
var match, index;
|
||||
|
|
@ -332,10 +399,15 @@ Segmentation = (function($) {
|
|||
var openEditForm = function(segment){
|
||||
addForm("edit", segment);
|
||||
|
||||
$(self.form).find(".segment-content > h3 > span").text(segment.name);
|
||||
$(self.form).find(".segment-content > h3 > span")
|
||||
.html( getSegmentName(segment) )
|
||||
.prop('title', getSegmentTooltipEnrichedWithUsername(segment));
|
||||
|
||||
$(self.form).find('.available_segments_select > option[data-idsegment="'+segment.idsegment+'"]').prop("selected",true);
|
||||
|
||||
$(self.form).find('.available_segments a.dropList').text(self.shortenSegmentName(segment.name, 16));
|
||||
$(self.form).find('.available_segments a.dropList')
|
||||
.html( getSegmentName(segment) )
|
||||
.prop( 'title', getSegmentTooltipEnrichedWithUsername(segment));
|
||||
|
||||
if(segment.definition != ""){
|
||||
revokeInitialStateRows();
|
||||
|
|
@ -351,21 +423,67 @@ Segmentation = (function($) {
|
|||
doDragDropBindings();
|
||||
};
|
||||
|
||||
var bindEvents = function() {
|
||||
var displayFormAddNewSegment = function (e) {
|
||||
closeAllOpenLists();
|
||||
addForm("new");
|
||||
doDragDropBindings();
|
||||
};
|
||||
|
||||
var filterSegmentList = function (keyword) {
|
||||
var curTitle;
|
||||
clearFilterSegmentList();
|
||||
$(self.target).find(" .filterNoResults").remove();
|
||||
|
||||
$(self.target).find(".segmentList li").each(function () {
|
||||
curTitle = $(this).prop('title');
|
||||
$(this).hide();
|
||||
if (curTitle.toLowerCase().indexOf(keyword.toLowerCase()) !== -1) {
|
||||
$(this).show();
|
||||
}
|
||||
});
|
||||
|
||||
if ($(self.target).find(".segmentList li:visible").length == 0) {
|
||||
$(self.target).find(".segmentList li:first")
|
||||
.before("<li class=\"filterNoResults grayed\">" + self.translations['General_SearchNoResults'] + "</li>");
|
||||
}
|
||||
|
||||
if ($(self.target).find(".segmentList .segmentsVisibleToSuperUser li:visible").length == 0) {
|
||||
$(self.target).find(".segmentList .segmentsVisibleToSuperUser").hide();
|
||||
}
|
||||
if ($(self.target).find(".segmentList .segmentsSharedWithMeBySuperUser li:visible").length == 0) {
|
||||
$(self.target).find(".segmentList .segmentsSharedWithMeBySuperUser").hide();
|
||||
}
|
||||
}
|
||||
|
||||
var clearFilterSegmentList = function () {
|
||||
$(self.target).find(" .filterNoResults").remove();
|
||||
$(self.target).find(".segmentList li").each(function () {
|
||||
$(this).show();
|
||||
});
|
||||
$(self.target).find(".segmentList .segmentsVisibleToSuperUser").show();
|
||||
$(self.target).find(".segmentList .segmentsSharedWithMeBySuperUser").show();
|
||||
}
|
||||
|
||||
var bindEvents = function () {
|
||||
self.target.on('click', '.segmentationContainer', function (e) {
|
||||
// hide all other modals connected with this widget
|
||||
if (self.content.closest('.segmentEditorPanel').hasClass("visible")) {
|
||||
if ($(e.target).hasClass("jspDrag") === true) {
|
||||
if (self.content.closest('.segmentEditorPanel').hasClass("expanded")) {
|
||||
if ($(e.target).hasClass("jspDrag") === true
|
||||
|| $(e.target).hasClass("segmentFilterContainer") === true
|
||||
|| $(e.target).parents().hasClass("segmentFilterContainer") === true
|
||||
|| $(e.target).hasClass("filterNoResults")) {
|
||||
e.stopPropagation();
|
||||
} else {
|
||||
self.jscroll.destroy();
|
||||
self.target.closest('.segmentEditorPanel').removeClass('visible');
|
||||
if (self.jscroll) {
|
||||
self.jscroll.destroy();
|
||||
}
|
||||
self.target.closest('.segmentEditorPanel').removeClass('expanded');
|
||||
}
|
||||
} else {
|
||||
// for each visible segmentationContainer -> trigger click event to close and kill scrollpane - very important !
|
||||
closeAllOpenLists();
|
||||
self.target.closest('.segmentEditorPanel').addClass('visible');
|
||||
|
||||
self.target.closest('.segmentEditorPanel').addClass('expanded');
|
||||
self.target.find('.segmentFilter').val(self.translations['General_Search']).trigger('keyup');
|
||||
self.jscroll = self.target.find(".segmentList").jScrollPane({
|
||||
autoReinitialise: true,
|
||||
showArrows:true
|
||||
|
|
@ -384,36 +502,68 @@ Segmentation = (function($) {
|
|||
|
||||
self.target.on("click", ".segmentList li", function (e) {
|
||||
if ($(e.currentTarget).hasClass("grayed") !== true) {
|
||||
var segment = {};
|
||||
segment.idsegment = $(this).attr("data-idsegment");
|
||||
segment.definition = $(this).data("definition");
|
||||
segment.name = $(this).attr("title");
|
||||
var idsegment = $(this).attr("data-idsegment");
|
||||
segmentDefinition = $(this).data("definition");
|
||||
|
||||
self.setSegment(segment.definition);
|
||||
self.setSegment(segmentDefinition);
|
||||
self.markCurrentSegment();
|
||||
self.segmentSelectMethod( segment.definition );
|
||||
toggleLoadingMessage(segment.definition.length);
|
||||
self.segmentSelectMethod( segmentDefinition );
|
||||
toggleLoadingMessage(segmentDefinition.length);
|
||||
}
|
||||
});
|
||||
|
||||
self.target.on('click', '.add_new_segment', function (e) {
|
||||
e.stopPropagation();
|
||||
closeAllOpenLists();
|
||||
addForm("new");
|
||||
doDragDropBindings();
|
||||
displayFormAddNewSegment(e);
|
||||
});
|
||||
|
||||
self.target.on('change', "select.metricList", function (e, persist) {
|
||||
if (typeof persist === "undefined") {
|
||||
persist = false;
|
||||
}
|
||||
alterMatchesList(this, persist);
|
||||
alterMatchesList(this, true);
|
||||
|
||||
doDragDropBindings();
|
||||
|
||||
autoSuggestValues(this, persist);
|
||||
});
|
||||
|
||||
// attach event that will clear segment list filtering input after clicking x
|
||||
self.target.on('click', ".segmentFilterContainer span", function (e) {
|
||||
$(e.target).parent().find(".segmentFilter").val(self.translations['General_Search']).trigger('keyup');
|
||||
});
|
||||
|
||||
self.target.on('blur', ".segmentFilter", function (e) {
|
||||
if ($(e.target).parent().find(".segmentFilter").val() == "") {
|
||||
$(e.target).parent().find(".segmentFilter").val(self.translations['General_Search'])
|
||||
}
|
||||
});
|
||||
|
||||
self.target.on('click', ".segmentFilter", function (e) {
|
||||
if ($(e.target).val() == self.translations['General_Search']) {
|
||||
$(e.target).val("");
|
||||
}
|
||||
});
|
||||
|
||||
self.target.on('keyup', ".segmentFilter", function (e) {
|
||||
var search = $(e.currentTarget).val();
|
||||
if (search == self.translations['General_Search']) {
|
||||
search = "";
|
||||
}
|
||||
|
||||
if (search.length >= 2) {
|
||||
clearTimeout(self.filterTimer);
|
||||
self.filterAllowed = true;
|
||||
self.filterTimer = setTimeout(function () {
|
||||
filterSegmentList(search);
|
||||
}, 500);
|
||||
}
|
||||
else {
|
||||
self.filterTimer = false;
|
||||
clearFilterSegmentList();
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// segment editor form events
|
||||
//
|
||||
|
|
@ -436,10 +586,12 @@ Segmentation = (function($) {
|
|||
|
||||
self.target.on('blur', "input.edit_segment_name", function (e) {
|
||||
var newName = $(this).val();
|
||||
if(newName.trim() != '') {
|
||||
$(e.currentTarget).parents("h3").find("span").text(newName).show();
|
||||
$(self.form).find("a.editSegmentName").show();
|
||||
$(this).remove();
|
||||
var segmentNameNode = $(e.currentTarget).parents("h3").find("span");
|
||||
|
||||
if(newName.trim()) {
|
||||
segmentNameNode.text(newName);
|
||||
} else {
|
||||
$(this).val(segmentNameNode.text());
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -529,29 +681,38 @@ Segmentation = (function($) {
|
|||
|
||||
// upon clicking - add new segment block, then bind 'x' action to newly added row
|
||||
self.target.on('click', ".segment-add-row a", function(event, data){
|
||||
$(self.form).find(".segment-and:last").after(getAndDiv()).after(getMockedFormRow());
|
||||
var mockedRow = getMockedFormRow();
|
||||
$(self.form).find(".segment-and:last").after(getAndDiv()).after(mockedRow);
|
||||
if(typeof data !== "undefined"){
|
||||
$(self.form).find(".metricList:last").val(data);
|
||||
}
|
||||
$(self.form).find(".metricList:last").trigger('change');
|
||||
preselectFirstMetricMatch(mockedRow);
|
||||
doDragDropBindings();
|
||||
});
|
||||
|
||||
self.target.on("click", ".segment-add-row span", function(event, data){
|
||||
if(typeof data !== "undefined") {
|
||||
$(self.form).find(".segment-and:last").after(getAndDiv()).after(getMockedFormRow());
|
||||
var mockedRow = getMockedFormRow();
|
||||
$(self.form).find(".segment-and:last").after(getAndDiv()).after(mockedRow);
|
||||
preselectFirstMetricMatch(mockedRow);
|
||||
$(self.form).find(".metricList:last").val(data).trigger('change');
|
||||
doDragDropBindings();
|
||||
}
|
||||
});
|
||||
|
||||
// add new OR block
|
||||
self.target.on("click", ".segment-add-or a", function(event, data){
|
||||
$(event.currentTarget).parents(".segment-rows").find(".segment-or:last").after(getOrDiv()).after(getMockedInputRowHtml());
|
||||
self.target.on("click", ".segment-add-or a", function(event, data){
|
||||
var parentRows = $(event.currentTarget).parents(".segment-rows");
|
||||
|
||||
parentRows.find(".segment-or:last").after(getOrDiv()).after(getMockedInputRowHtml());
|
||||
if(typeof data !== "undefined"){
|
||||
$(event.currentTarget).parents(".segment-rows").find(".metricList:last").val(data);
|
||||
parentRows.find(".metricList:last").val(data);
|
||||
}
|
||||
$(event.currentTarget).parents(".segment-rows").find(".metricList:last").trigger('change');
|
||||
parentRows.find(".metricList:last").trigger('change');
|
||||
|
||||
var addedRow = parentRows.find('.segment-row:last');
|
||||
preselectFirstMetricMatch(addedRow);
|
||||
doDragDropBindings();
|
||||
});
|
||||
|
||||
|
|
@ -591,6 +752,15 @@ Segmentation = (function($) {
|
|||
segmentName: segmentName
|
||||
}, 'GET');
|
||||
ajaxHandler.useRegularCallbackInCaseOfError = true;
|
||||
ajaxHandler.setTimeout(20000);
|
||||
ajaxHandler.setErrorCallback(function(response) {
|
||||
loadingElement.hide();
|
||||
inputElement.autocomplete({
|
||||
source: [],
|
||||
minLength: 0
|
||||
});
|
||||
$(inputElement).autocomplete('search', $(inputElement).val());
|
||||
});
|
||||
ajaxHandler.setCallback(function(response) {
|
||||
loadingElement.hide();
|
||||
|
||||
|
|
@ -633,7 +803,12 @@ Segmentation = (function($) {
|
|||
}
|
||||
|
||||
matchSelector.append(optionsHtml);
|
||||
matchSelector.val(oldMatch);
|
||||
|
||||
if (matchSelector.find('option[value="' + oldMatch + '"]').length) {
|
||||
matchSelector.val(oldMatch);
|
||||
} else {
|
||||
preselectFirstMetricMatch(matchSelector.parent());
|
||||
}
|
||||
};
|
||||
|
||||
var getAddNewBlockButtonHtml = function()
|
||||
|
|
@ -664,20 +839,15 @@ Segmentation = (function($) {
|
|||
};
|
||||
|
||||
function openEditFormGivenSegment(option) {
|
||||
var segment = {};
|
||||
segment.idsegment = option.attr("data-idsegment");
|
||||
var idsegment = option.attr("data-idsegment");
|
||||
|
||||
var segmentExtra = getSegmentFromId(segment.idsegment);
|
||||
for(var item in segmentExtra)
|
||||
{
|
||||
segment[item] = segmentExtra[item];
|
||||
if(idsegment.length == 0) {
|
||||
displayFormAddNewSegment();
|
||||
} else {
|
||||
var segment = getSegmentFromId(idsegment);
|
||||
segment.definition = option.data("definition");
|
||||
openEditForm(segment);
|
||||
}
|
||||
|
||||
segment.name = option.attr("title");
|
||||
|
||||
segment.definition = option.data("definition");
|
||||
|
||||
openEditForm(segment);
|
||||
}
|
||||
|
||||
var doDragDropBindings = function(){
|
||||
|
|
@ -731,7 +901,7 @@ Segmentation = (function($) {
|
|||
// 1 - do most obvious selection -> mark whole categories matching search string
|
||||
// also expand whole category
|
||||
$(self.form).find('.segment-nav div > ul > li').each( function(){
|
||||
curStr = normalizeSearchString($(this).find("a.metric_category").text());
|
||||
curStr = normalizeSearchString($(this).find("a.metric_category").text());
|
||||
if(curStr.indexOf(search) > -1) {
|
||||
$(this).addClass("searchFound");
|
||||
$(this).find("ul").show();
|
||||
|
|
@ -739,7 +909,7 @@ Segmentation = (function($) {
|
|||
$(this).show();
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
// 2 - among all unselected categories find metrics which match and mark parent as search result
|
||||
$(self.form).find(".segment-nav div > ul > li:not(.searchFound)").each(function(){
|
||||
|
|
@ -788,8 +958,8 @@ Segmentation = (function($) {
|
|||
}
|
||||
|
||||
search = search.replace(/[^a-z0-9 -]/g, '') // remove invalid chars
|
||||
.replace(/\s+/g, '_') // collapse whitespace and replace by underscore
|
||||
.replace(/-+/g, '-'); // collapse dashes
|
||||
.replace(/\s+/g, '_') // collapse whitespace and replace by underscore
|
||||
.replace(/-+/g, '-'); // collapse dashes
|
||||
return search;
|
||||
};
|
||||
|
||||
|
|
@ -816,7 +986,12 @@ Segmentation = (function($) {
|
|||
placeSegmentationFormControls();
|
||||
|
||||
if(mode == "edit") {
|
||||
$(self.form).find('.enable_all_users_select > option[value="'+segment.enable_all_users+'"]').prop("selected",true);
|
||||
var userSelector = $(self.form).find('.enable_all_users_select > option[value="' + segment.enable_all_users + '"]').prop("selected",true);
|
||||
|
||||
// Replace "Visible to me" by "Visible to $login" when user is super user
|
||||
if(hasSuperUserAccessAndSegmentCreatedByAnotherUser(segment)) {
|
||||
$(self.form).find('.enable_all_users_select > option[value="' + 0 + '"]').text(segment.login);
|
||||
}
|
||||
$(self.form).find('.visible_to_website_select > option[value="'+segment.enable_only_idsite+'"]').prop("selected",true);
|
||||
$(self.form).find('.auto_archive_select > option[value="'+segment.auto_archive+'"]').prop("selected",true);
|
||||
|
||||
|
|
@ -849,7 +1024,7 @@ Segmentation = (function($) {
|
|||
};
|
||||
|
||||
var closeForm = function () {
|
||||
self.form.unbind().remove();
|
||||
$(self.form).unbind().remove();
|
||||
self.target.closest('.segmentEditorPanel').removeClass('editing');
|
||||
};
|
||||
|
||||
|
|
@ -907,43 +1082,43 @@ Segmentation = (function($) {
|
|||
var makeDropList = function(spanId, selectId){
|
||||
var select = $(self.form).find(selectId).hide();
|
||||
var dropList = $( '<a class="dropList dropdown">' )
|
||||
.insertAfter( select )
|
||||
.text( select.children(':selected').text() )
|
||||
.autocomplete({
|
||||
delay: 0,
|
||||
minLength: 0,
|
||||
appendTo: "body",
|
||||
source: function( request, response ) {
|
||||
response( select.children( "option" ).map(function() {
|
||||
var text = $( this ).text();
|
||||
return {
|
||||
label: text,
|
||||
value: this.value,
|
||||
option: this
|
||||
};
|
||||
}) );
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
event.preventDefault();
|
||||
ui.item.option.selected = true;
|
||||
// Mark original select>option
|
||||
$(spanId + ' option[value="' + ui.item.value + '"]', self.editorTemplate).prop('selected', true);
|
||||
dropList.text(ui.item.label);
|
||||
$(self.form).find(selectId).trigger("change");
|
||||
}
|
||||
})
|
||||
.click(function() {
|
||||
// close all other droplists made by this form
|
||||
$("a.dropList").autocomplete("close");
|
||||
// close if already visible
|
||||
if ( $(this).autocomplete( "widget" ).is(":visible") ) {
|
||||
$(this).autocomplete("close");
|
||||
return;
|
||||
}
|
||||
// pass empty string as value to search for, displaying all results
|
||||
$(this).autocomplete( "search", "" );
|
||||
.insertAfter( select )
|
||||
.text( select.children(':selected').text() )
|
||||
.autocomplete({
|
||||
delay: 0,
|
||||
minLength: 0,
|
||||
appendTo: "body",
|
||||
source: function( request, response ) {
|
||||
response( select.children( "option" ).map(function() {
|
||||
var text = $( this ).text();
|
||||
return {
|
||||
label: text,
|
||||
value: this.value,
|
||||
option: this
|
||||
};
|
||||
}) );
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
event.preventDefault();
|
||||
ui.item.option.selected = true;
|
||||
// Mark original select>option
|
||||
$(spanId + ' option[value="' + ui.item.value + '"]', self.editorTemplate).prop('selected', true);
|
||||
dropList.text(ui.item.label);
|
||||
$(self.form).find(selectId).trigger("change");
|
||||
}
|
||||
})
|
||||
.click(function() {
|
||||
// close all other droplists made by this form
|
||||
$("a.dropList").autocomplete("close");
|
||||
// close if already visible
|
||||
if ( $(this).autocomplete( "widget" ).is(":visible") ) {
|
||||
$(this).autocomplete("close");
|
||||
return;
|
||||
}
|
||||
// pass empty string as value to search for, displaying all results
|
||||
$(this).autocomplete( "search", "" );
|
||||
|
||||
});
|
||||
});
|
||||
$('body').on('mouseup',function (e) {
|
||||
if (!$(e.target).parents(spanId).length
|
||||
&& !$(e.target).is(spanId)
|
||||
|
|
@ -990,14 +1165,13 @@ Segmentation = (function($) {
|
|||
return segmentation;
|
||||
})(jQuery);
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var exports = require('piwik/UI');
|
||||
var UIControl = exports.UIControl;
|
||||
|
||||
/**
|
||||
* Sets up and handles events for the segment selector & editor control.
|
||||
*
|
||||
*
|
||||
* @param {Element} element The HTML element generated by the SegmentSelectorControl PHP class. Should
|
||||
* have the CSS class 'segmentEditorPanel'.
|
||||
* @constructor
|
||||
|
|
@ -1023,7 +1197,7 @@ $(document).ready(function() {
|
|||
this.changeSegmentList = function () {};
|
||||
|
||||
var cleanupSegmentDefinition = function(definition) {
|
||||
definition = definition.replace("'", "%29");
|
||||
definition = definition.replace("'", "%27");
|
||||
definition = definition.replace("&", "%26");
|
||||
return definition;
|
||||
};
|
||||
|
|
@ -1083,7 +1257,7 @@ $(document).ready(function() {
|
|||
}
|
||||
}
|
||||
|
||||
self.props.availableSegments[idx] = params;
|
||||
$.extend( self.props.availableSegments[idx], params);
|
||||
self.rebuild();
|
||||
|
||||
self.impl.setSegment(params.definition);
|
||||
|
|
@ -1098,7 +1272,6 @@ $(document).ready(function() {
|
|||
ajaxHandler.send(true);
|
||||
};
|
||||
|
||||
|
||||
var deleteSegment = function(params){
|
||||
var ajaxHandler = new ajaxHelper();
|
||||
ajaxHandler.addParams({
|
||||
|
|
@ -1140,16 +1313,18 @@ $(document).ready(function() {
|
|||
};
|
||||
|
||||
var segmentFromRequest = encodeURIComponent(self.props.selectedSegment)
|
||||
|| broadcast.getValueFromHash('segment')
|
||||
|| broadcast.getValueFromUrl('segment');
|
||||
|| broadcast.getValueFromHash('segment')
|
||||
|| broadcast.getValueFromUrl('segment');
|
||||
if($.browser.mozilla) {
|
||||
segmentFromRequest = decodeURIComponent(segmentFromRequest);
|
||||
}
|
||||
|
||||
var userSegmentAccess = (this.props.authorizedToCreateSegments) ? "write" : "read";
|
||||
|
||||
this.impl = new Segmentation({
|
||||
"target" : this.$element.find(".segmentListContainer"),
|
||||
"editorTemplate": $('.SegmentEditor', self.$element),
|
||||
"segmentAccess" : "write",
|
||||
"segmentAccess" : userSegmentAccess,
|
||||
"availableSegments" : this.props.availableSegments,
|
||||
"addMethod": addSegment,
|
||||
"updateMethod": updateSegment,
|
||||
|
|
@ -1170,7 +1345,7 @@ $(document).ready(function() {
|
|||
}
|
||||
|
||||
if ($(e.target).closest('.segmentListContainer').length === 0
|
||||
&& self.$element.hasClass("visible")
|
||||
&& self.$element.hasClass("expanded")
|
||||
) {
|
||||
$(".segmentationContainer", self.$element).trigger("click");
|
||||
}
|
||||
|
|
@ -1178,8 +1353,6 @@ $(document).ready(function() {
|
|||
|
||||
$('body').on('mouseup', this.onMouseUp);
|
||||
|
||||
// re-initialize top controls since the size of the control is not the same after it's
|
||||
// initialized.
|
||||
initTopControls();
|
||||
};
|
||||
|
||||
|
|
@ -1213,4 +1386,4 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
exports.SegmentSelectorControl = SegmentSelectorControl;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
25
www/analytics/plugins/SegmentEditor/lang/bg.json
Normal file
25
www/analytics/plugins/SegmentEditor/lang/bg.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Добавяне на %s условие",
|
||||
"AddNewSegment": "Добави нов сегмент",
|
||||
"AreYouSureDeleteSegment": "Сигурни ли сте, че искате да изтриете този сегмент?",
|
||||
"AutoArchivePreProcessed": "Сегментираните отчети са предварително обработени (за по-голяма бързина се изисква archive.php cron)",
|
||||
"AutoArchiveRealTime": "Сегментираните отчети са обработени в реално време",
|
||||
"ChooseASegment": "Избери сегмент",
|
||||
"DefaultAllVisits": "Всички посещения",
|
||||
"DragDropCondition": "Състояние „Плъзгане & Пускане“",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Обработката на сегментирани данни за посетителите може да отнеме няколко минути…",
|
||||
"OperatorAND": "И",
|
||||
"OperatorOR": "ИЛИ",
|
||||
"SaveAndApply": "Запази & Приложи",
|
||||
"SegmentDisplayedAllWebsites": "всички сайтове",
|
||||
"SegmentDisplayedThisWebsiteOnly": "само този уебсайт",
|
||||
"SegmentIsDisplayedForWebsite": "и се показва за",
|
||||
"SegmentNotApplied": "Сегмент '%s' не е приложен",
|
||||
"SelectSegmentOfVisitors": "Изберете сегмент на посетителите:",
|
||||
"ThisSegmentIsVisibleTo": "Този сегмент е видим за:",
|
||||
"VisibleToAllUsers": "всички потребители",
|
||||
"VisibleToMe": "аз",
|
||||
"YouMustBeLoggedInToCreateSegments": "Трябва да сте вписани, за да създавате и редактирате персонализираните посетителски сегменти."
|
||||
}
|
||||
}
|
||||
36
www/analytics/plugins/SegmentEditor/lang/cs.json
Normal file
36
www/analytics/plugins/SegmentEditor/lang/cs.json
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Vytvářejte a znovu použijte vlastní segmenty návštěvníků za použití editoru segmentů.",
|
||||
"AddANDorORCondition": "Přidat podmínku %s",
|
||||
"AddNewSegment": "Přidat nový segment",
|
||||
"AreYouSureDeleteSegment": "Opravdu chcete odstranit tento segment?",
|
||||
"AutoArchivePreProcessed": "Segmentovaná hlášení jsou předzpracována rychleji (vyžadují cron)",
|
||||
"AutoArchiveRealTime": "Segmentovaná hlášení jsou zpracována v reálném čase",
|
||||
"ChooseASegment": "Zvolte segment",
|
||||
"CurrentlySelectedSegment": "Aktuálně vybraný segment: %s",
|
||||
"DataAvailableAtLaterDate": "Vaše segmentovaná analytická hlášení budou dostupná později. Omlouváme se za tuto nepříjemnost.",
|
||||
"DefaultAllVisits": "Všechny návštěvy",
|
||||
"DragDropCondition": "Přetáhněte podmínku",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Zpracování segmentovaných dat návštěvníků může pár minut trvat...",
|
||||
"OperatorAND": "AND",
|
||||
"OperatorOR": "OR",
|
||||
"SaveAndApply": "Uložit a použít",
|
||||
"SegmentDisplayedAllWebsites": "Všechny webové stránky",
|
||||
"SegmentDisplayedThisWebsiteOnly": "Pouze tyto webové stránky",
|
||||
"SegmentIsDisplayedForWebsite": "A zobrazený po",
|
||||
"SegmentNotApplied": "Segment %s není aplikován",
|
||||
"SegmentNotAppliedMessage": "Požadujete data pro vlastní segment %s, ale konfigurace Piwiku aktuálně nedovoluje z důvodů výkonu zpracování hlášení v reálném čase.",
|
||||
"SelectSegmentOfVisitors": "Vyberte segment návštěvníků",
|
||||
"ThisSegmentIsVisibleTo": "Tento segment je viditelný",
|
||||
"VisibleToAllUsers": "Všem uživatelům",
|
||||
"VisibleToMe": "Mně",
|
||||
"YouMayChangeSetting": "Jinak můžete nastavení změnit v souboru %1$s, nebo můžete upravit tento segment a zvolit %2$s.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Pro vytváření a úpravu vlastních segmentů návštěvníků musíte být přihlášen.",
|
||||
"YouDontHaveAccessToCreateSegments": "Pro vytváření a úpravu segmentů nemáte požadovanou přístupovou úroveň.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Přidávání segmentů pro všechny stránky bylo zakázáno.",
|
||||
"SegmentXIsAUnionOf": "%s je propojení těchto segmentů:",
|
||||
"CustomSegment": "Vlastní segment",
|
||||
"SegmentOperatorIsNullOrEmpty": "je nulový nebo prázdný",
|
||||
"SegmentOperatorIsNotNullNorEmpty": "není nulový nebo prázdný"
|
||||
}
|
||||
}
|
||||
30
www/analytics/plugins/SegmentEditor/lang/da.json
Normal file
30
www/analytics/plugins/SegmentEditor/lang/da.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Tilføj %s betingelse",
|
||||
"AddNewSegment": "Tilføj nyt segment",
|
||||
"AreYouSureDeleteSegment": "Er du sikker på, at du vil slette dette segment?",
|
||||
"AutoArchivePreProcessed": "Segmenterede rapporter behandles på forhånd (er hurtigere, kræver archive.php cron)",
|
||||
"AutoArchiveRealTime": "Segmenterede rapporter behandles tidstro",
|
||||
"ChooseASegment": "Vælg et segment",
|
||||
"DataAvailableAtLaterDate": "Dine segmenterede analyserapporter vil være tilgængelig senere. Vi undskylder ulejligheden.",
|
||||
"DefaultAllVisits": "Alle besøg",
|
||||
"DragDropCondition": "Træk og slip betingelse",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Behandling af segmenterede besøgsdata kan tage et par minutter...",
|
||||
"OperatorAND": "OG",
|
||||
"OperatorOR": "ELLER",
|
||||
"SaveAndApply": "Gem og anvend",
|
||||
"SegmentDisplayedAllWebsites": "alle websteder",
|
||||
"SegmentDisplayedThisWebsiteOnly": "kun dette websted",
|
||||
"SegmentIsDisplayedForWebsite": "og vises for",
|
||||
"SegmentNotApplied": "Segment '%s' anvendes ikke",
|
||||
"SegmentNotAppliedMessage": "Du beder om data til brugerdefineret segment '%s', Piwik konfigurationen forhindrer tidstro behandling af rapporter pga ydeevne grunde.",
|
||||
"SelectSegmentOfVisitors": "Vælg et segment af besøgende:",
|
||||
"ThisSegmentIsVisibleTo": "Segmentet er synligt for:",
|
||||
"VisibleToAllUsers": "Alle brugere",
|
||||
"VisibleToMe": "mig",
|
||||
"YouMayChangeSetting": "Alternativt kan du ændre indstillingen i konfigurationsfilen (%1$s), eller redigere dette segment og vælg '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Du skal være logget ind for at oprette og anvende brugerdefinerede besøgssegmenter.",
|
||||
"YouDontHaveAccessToCreateSegments": "Du har ikke det nødvendige adgangsniveau til at oprette og redigere segmenter.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Tilføjelse af segmenter for alle websteder er blevet deaktiveret."
|
||||
}
|
||||
}
|
||||
35
www/analytics/plugins/SegmentEditor/lang/de.json
Normal file
35
www/analytics/plugins/SegmentEditor/lang/de.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Erstellen und verwenden sie eigene Besucher-Segmente mit dem Segment-Editor",
|
||||
"AddANDorORCondition": "%s Bedingung hinzufügen",
|
||||
"AddNewSegment": "Neues Segment hinzufügen",
|
||||
"AreYouSureDeleteSegment": "Möchten Sie dieses Segment wirklich löschen?",
|
||||
"AutoArchivePreProcessed": "Segmentierte Berichte werden im Voraus verarbeitet (schneller, benötigt archive.php Cron)",
|
||||
"AutoArchiveRealTime": "Segmentierte Berichte werden in Echtzeit verarbeitet.",
|
||||
"ChooseASegment": "Segment auswählen",
|
||||
"CurrentlySelectedSegment": "Aktuell ausgewähltes Segment: %s",
|
||||
"DataAvailableAtLaterDate": "Ihre segmentierten Analytik-Berichte stehen später zur Verfügung. Wir entschuldigen uns für die Unannehmlichkeit.",
|
||||
"DefaultAllVisits": "Alle Besuche",
|
||||
"DragDropCondition": "Bedingung durch Drag & Drop hinzufügen",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Die Verarbeitung der segmentierten Besucherdaten kann einige Minuten dauern...",
|
||||
"OperatorAND": "UND",
|
||||
"OperatorOR": "ODER",
|
||||
"SaveAndApply": "Speichern & Übernehmen",
|
||||
"SegmentDisplayedAllWebsites": "alle Websites",
|
||||
"SegmentDisplayedThisWebsiteOnly": "nur diese Website",
|
||||
"SegmentIsDisplayedForWebsite": "und wird angezeigt für",
|
||||
"SegmentNotApplied": "Segment '%s' nicht angewendet",
|
||||
"SegmentNotAppliedMessage": "Sie fragen Daten für das benutzerdefinierte Segment '%s' an, die Piwik-Konfiguration verhindert jedoch aktuell Echtzeit-Verarbeitung von Berichten aus Performance-Gründen.",
|
||||
"SelectSegmentOfVisitors": "Wählen Sie ein Segment an Besuchern aus:",
|
||||
"ThisSegmentIsVisibleTo": "Dieses Segment ist sichtbar für:",
|
||||
"VisibleToAllUsers": "alle Benutzer",
|
||||
"VisibleToMe": "mich",
|
||||
"YouMayChangeSetting": "Alternativ können Sie die Einstellung in der Konfigurationsdatei (%1$s) ändern, oder ändern Sie dieses Segment und wählen '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Sie müssen sich anmelden um eigene Besuchersegmente anzulegen oder zu bearbeiten.",
|
||||
"YouDontHaveAccessToCreateSegments": "Sie haben nicht die benötigten Berechtigungen um Segmente anzulegen und zu bearbeiten.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Das Hinzufügen von Segmenten wurde für alle Websites deaktiviert.",
|
||||
"CustomSegment": "Benutzerdefiniertes Segment",
|
||||
"SegmentOperatorIsNullOrEmpty": "Ist NULL oder leer",
|
||||
"SegmentOperatorIsNotNullNorEmpty": "Ist weder NULL noch leer"
|
||||
}
|
||||
}
|
||||
36
www/analytics/plugins/SegmentEditor/lang/el.json
Normal file
36
www/analytics/plugins/SegmentEditor/lang/el.json
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Δημιουργήστε και επαναχρησιμοποιήστε τα προσαρμοσμένα Τμήματα επισκεπτών με τον Επεξεργαστή Τμημάτων.",
|
||||
"AddANDorORCondition": "Προσθήκη της %s συνθήκης",
|
||||
"AddNewSegment": "Προσθήκη νέου τμήματος",
|
||||
"AreYouSureDeleteSegment": "Είστε σίγουροι για τη διαγραφή του τμήματος;",
|
||||
"AutoArchivePreProcessed": "οι αναφορές τμημάτων προεπεξεργάζονται (γρηγορότερα, απαιτείται το archive.php με cron)",
|
||||
"AutoArchiveRealTime": "οι αναφορές τμημάτων επεξεργάζονται σε πραγματικό χρόνο",
|
||||
"ChooseASegment": "Επιλέξτε ένα τμήμα",
|
||||
"CurrentlySelectedSegment": "Επιλεγμένο τμήμα αυτή τη στιγμή: %s",
|
||||
"DataAvailableAtLaterDate": "Οι τμηματικές αναφορές αναλυτικών θα είναι αργότερα διαθέσιμες. Ζητούμε συγγνώμη για την ταλαιπωρία.",
|
||||
"DefaultAllVisits": "Όλες οι επισκέψεις",
|
||||
"DragDropCondition": "Συνθήκη με Σύρε & Άσε",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Η επεξεργασία των δεδομένων των τμημάτων επισκεπτών μπορεί να διαρκέσει κάποια λεπτά...",
|
||||
"OperatorAND": "ΚΑΙ",
|
||||
"OperatorOR": "Ή",
|
||||
"SaveAndApply": "Αποθήκευση και εφαρμογή",
|
||||
"SegmentDisplayedAllWebsites": "όλους τους ιστοτόπους",
|
||||
"SegmentDisplayedThisWebsiteOnly": "μόνο αυτόν τον ιστοτόπο",
|
||||
"SegmentIsDisplayedForWebsite": "και εμφανίζεται για",
|
||||
"SegmentNotApplied": "Το τμήμα '%s' δεν εφαρμόζεται",
|
||||
"SegmentNotAppliedMessage": "Ζητάτε δεδομένα για το Προσαρμοσμένο Τμήμα '%s', ωστόσο η τρέχουσα παραμετροποίηση του Piwik εμποδίζει την σε πραγματικό χρόνο επεξεργασία των αναφορών για λόγους απόδοσης.",
|
||||
"SelectSegmentOfVisitors": "Επιλέξτε ένα τμήμα επισκεπτών:",
|
||||
"ThisSegmentIsVisibleTo": "Το τμήμα αυτό είναι ορατό σε:",
|
||||
"VisibleToAllUsers": "όλους τους χρήστες",
|
||||
"VisibleToMe": "εμένα",
|
||||
"YouMayChangeSetting": "Εναλλακτικά, μπορείτε να αλλάξετε τη ρύθμιση στο αρχείο ρυθμίσεων (%1$s), ή να τροποποιήσετε το Τμήμα αυτό και να επιλέξετε '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Θα πρέπει να έχετε κάνει είσοδο για να δημιουργήσετε και να επεξεργαστείτε προσαρμοσμένα τμήματα επισκεπτών.",
|
||||
"YouDontHaveAccessToCreateSegments": "Δεν διαθέτετε την απαιτούμενη πρόσβαση ασφαλείας για να δημιουργείτε και να τροποποιείτε τμήματα.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Η προσθήκη τμημάτων έχει απενεργοποιηθεί για όλους τους ιστοτόπους.",
|
||||
"SegmentXIsAUnionOf": "Το %s είναι η ένωση αυτών των τμημάτων:",
|
||||
"CustomSegment": "Προσαρμοσμένο τμήμα",
|
||||
"SegmentOperatorIsNullOrEmpty": "είναι άκυρο (null) ή κενό",
|
||||
"SegmentOperatorIsNotNullNorEmpty": "δεν είναι άκυρο (null) ή άδειο"
|
||||
}
|
||||
}
|
||||
38
www/analytics/plugins/SegmentEditor/lang/en.json
Normal file
38
www/analytics/plugins/SegmentEditor/lang/en.json
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Create and reuse custom visitor Segments with the Segment Editor.",
|
||||
"AddANDorORCondition": "Add %s condition",
|
||||
"AddNewSegment": "Add new segment",
|
||||
"AreYouSureDeleteSegment": "Are you sure you want to delete this segment?",
|
||||
"AutoArchivePreProcessed": "segmented reports are pre-processed (faster, requires cron)",
|
||||
"AutoArchiveRealTime": "segmented reports are processed in real time",
|
||||
"ChooseASegment": "Choose a segment",
|
||||
"CurrentlySelectedSegment": "Currently selected segment: %s",
|
||||
"DataAvailableAtLaterDate": "Your segmented analytics reports will be available later. We apologize for the inconvenience.",
|
||||
"DefaultAllVisits": "All visits",
|
||||
"DragDropCondition": "Drag & Drop condition",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Processing segmented visitor data may take a few minutes...",
|
||||
"OperatorAND": "AND",
|
||||
"OperatorOR": "OR",
|
||||
"SaveAndApply": "Save & Apply",
|
||||
"SegmentDisplayedAllWebsites": "all websites",
|
||||
"SegmentDisplayedThisWebsiteOnly": "this website only",
|
||||
"SegmentIsDisplayedForWebsite": "and displayed for",
|
||||
"SegmentNotApplied": "Segment '%s' not applied",
|
||||
"SegmentNotAppliedMessage": "You are requesting data for the Custom Segment '%s', this Piwik configuration currently prevents real time processing of reports for performance reasons.",
|
||||
"SelectSegmentOfVisits": "Select a segment of visits:",
|
||||
"ThisSegmentIsVisibleTo": "This segment is visible to:",
|
||||
"VisibleToAllUsers": "all users",
|
||||
"VisibleToMe": "me",
|
||||
"YouMayChangeSetting": "Alternatively you may change the setting in the config file (%1$s), or edit this Segment and choose '%2$s'.",
|
||||
"VisibleToSuperUser": "Visible to you because you have Super User access",
|
||||
"SharedWithYou": "Shared with you",
|
||||
"YouMustBeLoggedInToCreateSegments": "You must be logged in to create and edit custom visitor segments.",
|
||||
"YouDontHaveAccessToCreateSegments": "You don't have the required access level to create and edit segments.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Adding segments for all websites has been disabled.",
|
||||
"SegmentXIsAUnionOf": "%s is a union of these segments:",
|
||||
"CustomSegment": "Custom Segment",
|
||||
"SegmentOperatorIsNullOrEmpty": "is null or empty",
|
||||
"SegmentOperatorIsNotNullNorEmpty": "is not null nor empty"
|
||||
}
|
||||
}
|
||||
31
www/analytics/plugins/SegmentEditor/lang/es.json
Normal file
31
www/analytics/plugins/SegmentEditor/lang/es.json
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Cree y reutilize Segmentos de visitante personalizados con el Editor de Segmento.",
|
||||
"AddANDorORCondition": "Agregar condición %s",
|
||||
"AddNewSegment": "Agregar nuevo segmento",
|
||||
"AreYouSureDeleteSegment": "¿Está seguro que desea eliminar este segmento?",
|
||||
"AutoArchivePreProcessed": "los informes segmentados son pre-procesados (rápidamente, requiere cron)",
|
||||
"AutoArchiveRealTime": "los informes segmentados son procesados en tiempo real",
|
||||
"ChooseASegment": "Elegir un segmento",
|
||||
"DataAvailableAtLaterDate": "Sus informes analíticos segmentados estarán disponibles más tarde. Lamentamos la inconveniencia.",
|
||||
"DefaultAllVisits": "Todas las visitas",
|
||||
"DragDropCondition": "Arrastrar & soltar condición",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Procesando los datos de visitante segmentados pueden tomar unos minutos…",
|
||||
"OperatorAND": "Y",
|
||||
"OperatorOR": "O",
|
||||
"SaveAndApply": "Guardar & aplicar",
|
||||
"SegmentDisplayedAllWebsites": "todos los sitios de internet",
|
||||
"SegmentDisplayedThisWebsiteOnly": "este sitio de internet únicamente",
|
||||
"SegmentIsDisplayedForWebsite": "y mostrado para",
|
||||
"SegmentNotApplied": "Segmento '%s' no aplicado",
|
||||
"SegmentNotAppliedMessage": "Está solicitando datos para el segmento personalizado '%s', esta configuración de Piwik actualmente impide el proceso en tiempo real de informes por razones de rendimiento.",
|
||||
"SelectSegmentOfVisitors": "Seleccione un segmento de visitantes:",
|
||||
"ThisSegmentIsVisibleTo": "Este segmento es visible para:",
|
||||
"VisibleToAllUsers": "todos los usuarios",
|
||||
"VisibleToMe": "yo",
|
||||
"YouMayChangeSetting": "Alternativamente puede cambiar la configuración en el archivo config (%1$s) o modificar este segmento y elegir '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Debe estar conectado para crear y editar segmentos de usuario personalizados.",
|
||||
"YouDontHaveAccessToCreateSegments": "No posee el nivel de acceso requerido para crear y editar segmentos.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Añadir segmentos para todos los sitios de internet se ha deshabilitado."
|
||||
}
|
||||
}
|
||||
21
www/analytics/plugins/SegmentEditor/lang/et.json
Normal file
21
www/analytics/plugins/SegmentEditor/lang/et.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Lisa %s tingimus",
|
||||
"AddNewSegment": "Lisa uus segment",
|
||||
"AutoArchivePreProcessed": "segmentide raportid protsessitakse ette (kiirem, aga vajab archive.php cron seadistust)",
|
||||
"AutoArchiveRealTime": "segmentide raportid protsessitakse reaalajas",
|
||||
"ChooseASegment": "Vali segment",
|
||||
"DefaultAllVisits": "Kõik külastused",
|
||||
"DragDropCondition": "Lohista hiirega tingimused siia",
|
||||
"OperatorAND": "JA",
|
||||
"OperatorOR": "VÕI",
|
||||
"SaveAndApply": "Salvesta ja rakenda",
|
||||
"SegmentDisplayedAllWebsites": "kõik veebilehed",
|
||||
"SegmentDisplayedThisWebsiteOnly": "ainult see veebileht",
|
||||
"SegmentIsDisplayedForWebsite": "ja kuvatakse veebilehele",
|
||||
"SelectSegmentOfVisitors": "Vali külastajate segment:",
|
||||
"ThisSegmentIsVisibleTo": "Antud segment on nähtav:",
|
||||
"VisibleToAllUsers": "kõik kasutajad",
|
||||
"VisibleToMe": "mina"
|
||||
}
|
||||
}
|
||||
24
www/analytics/plugins/SegmentEditor/lang/fa.json
Normal file
24
www/analytics/plugins/SegmentEditor/lang/fa.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "اضافه کردن وضعیت از%s",
|
||||
"AddNewSegment": "اضافه کردن سگمنت جدید",
|
||||
"AreYouSureDeleteSegment": "آیا شما مطمئن هستید که میخواهید این بخش را حذف کنید؟",
|
||||
"AutoArchivePreProcessed": "گزارش سگمنتال پیش پردازش (سریع تر، نیاز به cron را archive.php ذخیره)",
|
||||
"AutoArchiveRealTime": "گزارش های سگمنتال در زمان واقعی پردازش",
|
||||
"ChooseASegment": "انتخاب بخش",
|
||||
"DefaultAllVisits": "تمامی بازدیدکننده ها",
|
||||
"DragDropCondition": "کشیدن و رها کردن",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "پردازش داده های بازدید کننده تقسیم ممکن است چند دقیقه طول بکشد ...",
|
||||
"OperatorAND": "و",
|
||||
"OperatorOR": "یا",
|
||||
"SaveAndApply": "ذخیره و درخواست",
|
||||
"SegmentDisplayedAllWebsites": "تمام وب سایت ها",
|
||||
"SegmentDisplayedThisWebsiteOnly": "این وب سایت فقط",
|
||||
"SegmentIsDisplayedForWebsite": "و برای نمایش داده",
|
||||
"SelectSegmentOfVisitors": "انتخاب بخشی از بازدید کنندگان:",
|
||||
"ThisSegmentIsVisibleTo": "این بخش قابل رؤیت است:",
|
||||
"VisibleToAllUsers": "تمام کاربران",
|
||||
"VisibleToMe": "من",
|
||||
"YouMustBeLoggedInToCreateSegments": "شما باید برای ایجاد و ویرایش بخش های بازدید کننده سفارشی، وارد سیستم شوید."
|
||||
}
|
||||
}
|
||||
27
www/analytics/plugins/SegmentEditor/lang/fi.json
Normal file
27
www/analytics/plugins/SegmentEditor/lang/fi.json
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Lisää %s ehto",
|
||||
"AddNewSegment": "Lisää uusi segmentti",
|
||||
"AreYouSureDeleteSegment": "Haluatko varmasti poistaa tämän segmentin?",
|
||||
"AutoArchivePreProcessed": "Segmentoidut raportit ennakkokäsitellään (nopeampi, archive.php cron vaaditaan)",
|
||||
"AutoArchiveRealTime": "segmentoidut raportit prosessoidaan reaaliajassa",
|
||||
"ChooseASegment": "Valitse segmentti",
|
||||
"DataAvailableAtLaterDate": "Raportti tulee saataville myöhemmin. Pahoittelut häiriöstä.",
|
||||
"DefaultAllVisits": "Kaikki käynnit",
|
||||
"DragDropCondition": "Vedä & Pudota ehto",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Segmentoitujen käyttäjätietojen prosessointi saattaa kestää joitakin minuutteja...",
|
||||
"OperatorAND": "JA",
|
||||
"OperatorOR": "TAI",
|
||||
"SaveAndApply": "Tallenna ja ota käyttöön",
|
||||
"SegmentDisplayedAllWebsites": "kaikki sivut",
|
||||
"SegmentDisplayedThisWebsiteOnly": "vain tällä verkkosivulla",
|
||||
"SegmentIsDisplayedForWebsite": "näytetään vain",
|
||||
"SegmentNotApplied": "Segmenttiä '%s' ei sovelleta",
|
||||
"SelectSegmentOfVisitors": "Valitse kävijäsegmentti:",
|
||||
"ThisSegmentIsVisibleTo": "Tämä segmentti näytetään seuraaville:",
|
||||
"VisibleToAllUsers": "kaikki käyttäjät",
|
||||
"VisibleToMe": "minä",
|
||||
"YouMayChangeSetting": "Vaihtoehtoisesti voit vaihtaa asetuksen tiedostosta %1$s, tai muuttaa tätä segmenttiä ja valita '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Sinun täytyy olla sisäänkirjautuneena voidaksesi luoda tai muokata kävijäsegmenttejä."
|
||||
}
|
||||
}
|
||||
36
www/analytics/plugins/SegmentEditor/lang/fr.json
Normal file
36
www/analytics/plugins/SegmentEditor/lang/fr.json
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Créez et réutilisez des Segments de visiteurs personnalisés avec l'éditeur de Segment.",
|
||||
"AddANDorORCondition": "Ajouter la condition %s",
|
||||
"AddNewSegment": "Ajouter un nouveau segment",
|
||||
"AreYouSureDeleteSegment": "Êtes vous sûr(e) de vouloir supprimer ce segment?",
|
||||
"AutoArchivePreProcessed": "les rapports segmentés sont pré-traités (plus rapide, requiert un cron sur archive.php)",
|
||||
"AutoArchiveRealTime": "les rapports segmentés sont traités en temps réel",
|
||||
"ChooseASegment": "Choisir un segment",
|
||||
"CurrentlySelectedSegment": "Segment sélectionné : %s",
|
||||
"DataAvailableAtLaterDate": "Votre rapport d'analyse segmenté sera disponible plus tard. Veuillez nous excuser pour le désagrément.",
|
||||
"DefaultAllVisits": "Toutes les visites",
|
||||
"DragDropCondition": "Condition de Drag & Drop",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Le traitement des données visiteurs segmentées peut prendre quelques minutes...",
|
||||
"OperatorAND": "ET",
|
||||
"OperatorOR": "OU",
|
||||
"SaveAndApply": "Sauvegarder & appliquer",
|
||||
"SegmentDisplayedAllWebsites": "tous les sites web",
|
||||
"SegmentDisplayedThisWebsiteOnly": "ce site web uniquement",
|
||||
"SegmentIsDisplayedForWebsite": "et affiché pour",
|
||||
"SegmentNotApplied": "Segment \"%s\" non appliqué",
|
||||
"SegmentNotAppliedMessage": "Vous êtes en train de demander des données for le segment personnalisé '%s', la configuration actuelle de Piwik empêche la génération en temps réelle de rapport pour des raisons de performance.",
|
||||
"SelectSegmentOfVisitors": "Choisir un segment de visiteurs :",
|
||||
"ThisSegmentIsVisibleTo": "Ce segment est visible pour :",
|
||||
"VisibleToAllUsers": "tous les utilisateurs",
|
||||
"VisibleToMe": "moi",
|
||||
"YouMayChangeSetting": "Vous pouvez ou changer le paramètre depuis le fichier de configuration (%1$s) ou bien modifier ce segment et choisir '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Vous devez être identifié(e) pour créer et modifier des segments de visiteurs personnalisés.",
|
||||
"YouDontHaveAccessToCreateSegments": "Vous n'avez pas les permissions requises pour créer et modifier des segments.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Ajouter des segments pour tous les sites a été désactivé.",
|
||||
"SegmentXIsAUnionOf": "%s est une union des segments suivants :",
|
||||
"CustomSegment": "Segment personnalisé",
|
||||
"SegmentOperatorIsNullOrEmpty": "Est nul ou vide",
|
||||
"SegmentOperatorIsNotNullNorEmpty": "n'est pas nul ou vide"
|
||||
}
|
||||
}
|
||||
6
www/analytics/plugins/SegmentEditor/lang/he.json
Normal file
6
www/analytics/plugins/SegmentEditor/lang/he.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"DefaultAllVisits": "כל הביקורים",
|
||||
"VisibleToAllUsers": "כל המשתמשים"
|
||||
}
|
||||
}
|
||||
27
www/analytics/plugins/SegmentEditor/lang/hi.json
Normal file
27
www/analytics/plugins/SegmentEditor/lang/hi.json
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "बनाएँ और खंड संपादक के साथ कस्टम विज़िटर सेगमेंट का पुन: उपयोग।",
|
||||
"AddANDorORCondition": "शर्त %s जोड़ें",
|
||||
"AddNewSegment": "नया खंड जोड़ें",
|
||||
"AreYouSureDeleteSegment": "क्या आप इस खंड को हटाना चाहते हैं?",
|
||||
"AutoArchivePreProcessed": "खंडों की रिपोर्ट पूर्व संसाधित कर रहे हैं(तेज, archive.php क्रॉन की आवश्यकता)",
|
||||
"AutoArchiveRealTime": "खंडों की रिपोर्ट के वास्तविक समय में कार्रवाई कर रहे हैं",
|
||||
"ChooseASegment": "एक खंड चुनें",
|
||||
"DataAvailableAtLaterDate": "आपका खंडों Analytics रिपोर्ट बाद में उपलब्ध हो जाएगा। असुविधा के लिए हमें खेद है।",
|
||||
"DefaultAllVisits": "सभी का दौरा",
|
||||
"DragDropCondition": "खींचें और शर्त बताये",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "खंडों आगंतुक डेटा प्रसंस्करण में कुछ मिनट लग सकते हैं ...",
|
||||
"OperatorAND": "और",
|
||||
"OperatorOR": "या",
|
||||
"SaveAndApply": "सहेजें और लागू करें",
|
||||
"SegmentDisplayedAllWebsites": "सभी वेबसाइटों",
|
||||
"SegmentDisplayedThisWebsiteOnly": "यह वेबसाइट केवल",
|
||||
"SegmentIsDisplayedForWebsite": "और के लिए प्रदर्शित",
|
||||
"SegmentNotApplied": "खंड '%s' को लागू नहीं",
|
||||
"SelectSegmentOfVisitors": "दर्शकों के एक वर्ग का चयन करें:",
|
||||
"ThisSegmentIsVisibleTo": "इस खंड के लिए दिख रहा है:",
|
||||
"VisibleToAllUsers": "सभी उपयोगकर्ताओं",
|
||||
"VisibleToMe": "मुझे",
|
||||
"YouMustBeLoggedInToCreateSegments": "आपको कस्टम आगंतुक खंड बनाने और संपादित करने के लिए लॉग इन करना होगा."
|
||||
}
|
||||
}
|
||||
24
www/analytics/plugins/SegmentEditor/lang/id.json
Normal file
24
www/analytics/plugins/SegmentEditor/lang/id.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Tambah %s kondisi",
|
||||
"AddNewSegment": "Tambah pecahan baru",
|
||||
"AreYouSureDeleteSegment": "Apakah Anda yakin menghapus pecahan ini?",
|
||||
"AutoArchivePreProcessed": "laporan terpecah merupakan praproses (lebih cepat, membutuhkan cron archive.php)",
|
||||
"AutoArchiveRealTime": "laporan terpecah diproses dalam waktu nyata",
|
||||
"ChooseASegment": "Pilih pecahan",
|
||||
"DefaultAllVisits": "Semua kunjungan",
|
||||
"DragDropCondition": "Kondisi Seret dan Taruh",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Memproses pecahan data pengunjung mungkin membutuhkan waktu beberapa menit...",
|
||||
"OperatorAND": "TAMBAH",
|
||||
"OperatorOR": "ATAU",
|
||||
"SaveAndApply": "Simpan dan Terapkan",
|
||||
"SegmentDisplayedAllWebsites": "seluruh situs",
|
||||
"SegmentDisplayedThisWebsiteOnly": "hanya situs ini",
|
||||
"SegmentIsDisplayedForWebsite": "dan ditampilkan untuk",
|
||||
"SelectSegmentOfVisitors": "Pilih sebuah pecahan pengunjung:",
|
||||
"ThisSegmentIsVisibleTo": "Pecahan ini tampak untuk:",
|
||||
"VisibleToAllUsers": "seluruh pengunjung",
|
||||
"VisibleToMe": "saya",
|
||||
"YouMustBeLoggedInToCreateSegments": "Anda harus masuk-log untuk membuat dan menyunting pecahan pengunjung kustom."
|
||||
}
|
||||
}
|
||||
36
www/analytics/plugins/SegmentEditor/lang/it.json
Normal file
36
www/analytics/plugins/SegmentEditor/lang/it.json
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Crea e reimpiega dei Segmenti visitatore personali con Segment Editor",
|
||||
"AddANDorORCondition": "Aggiungi condizione %s",
|
||||
"AddNewSegment": "Aggiungi un nuovo segmento",
|
||||
"AreYouSureDeleteSegment": "Sei sicuro di voler eliminare questo segmento?",
|
||||
"AutoArchivePreProcessed": "i reports segmentati sono pre-elaborati (più veloce, richiede un cron-job)",
|
||||
"AutoArchiveRealTime": "i reports segmentati sono elaborati in tempo reale",
|
||||
"ChooseASegment": "Scegli un segmento",
|
||||
"CurrentlySelectedSegment": "Segmento attualmente selezionato: %s",
|
||||
"DataAvailableAtLaterDate": "I report segmentati delle statistiche saranno disponibili più tardi. Ci scusiamo per l'inconveniente.",
|
||||
"DefaultAllVisits": "Tutte le visite",
|
||||
"DragDropCondition": "Copia & Incolla condizione",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "L'elaborazione dei dati visitatore segmentati può richiedere qualche minuto...",
|
||||
"OperatorAND": "E",
|
||||
"OperatorOR": "O",
|
||||
"SaveAndApply": "Salva & Applica",
|
||||
"SegmentDisplayedAllWebsites": "tutti i siti",
|
||||
"SegmentDisplayedThisWebsiteOnly": "solo questo sito",
|
||||
"SegmentIsDisplayedForWebsite": "e mostrato per",
|
||||
"SegmentNotApplied": "Segmento '%s' non applicato",
|
||||
"SegmentNotAppliedMessage": "Stai richiedendo i dati per il Segmento Personalizzato '%s', questa configurazione di Piwik attualmente esclude l'elaborazione in tempo reale dei report per ragioni di velocità.",
|
||||
"SelectSegmentOfVisitors": "Seleziona un segmento di visitatori:",
|
||||
"ThisSegmentIsVisibleTo": "Questo segmento è visibile a:",
|
||||
"VisibleToAllUsers": "tutti gli utenti",
|
||||
"VisibleToMe": "me",
|
||||
"YouMayChangeSetting": "In alternativa, puoi cambiare le impostazioni nel file di configurazione (%1$s) o modificare questo Segmento e scegliere '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Devi avere effettuato l'accesso per creare e modificare i segmenti personalizzati dei visitatori.",
|
||||
"YouDontHaveAccessToCreateSegments": "Non hai un livello d'accesso adeguato per creare e modificare i segmenti.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "L'aggiunta di segmenti per tutti i siti è stata disabilitata.",
|
||||
"SegmentXIsAUnionOf": "%s è un'unione di questi segmenti:",
|
||||
"CustomSegment": "Segmento Speciale",
|
||||
"SegmentOperatorIsNullOrEmpty": "è nullo o vuoto",
|
||||
"SegmentOperatorIsNotNullNorEmpty": "non è nullo nè vuoto"
|
||||
}
|
||||
}
|
||||
32
www/analytics/plugins/SegmentEditor/lang/ja.json
Normal file
32
www/analytics/plugins/SegmentEditor/lang/ja.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "セグメントエディターでカスタム ユーザー セグメントを作成、編集できます。",
|
||||
"AddANDorORCondition": "%s の条件を追加",
|
||||
"AddNewSegment": "新しいセグメントを追加",
|
||||
"AreYouSureDeleteSegment": "このセグメントを削除してもよろしいですか?",
|
||||
"AutoArchivePreProcessed": "セグメントレポートの事前処理(archive.php の cron 設定が必要)",
|
||||
"AutoArchiveRealTime": "セグメントレポートをリアルタイムに処理",
|
||||
"ChooseASegment": "セグメントを選択してください",
|
||||
"DataAvailableAtLaterDate": "ご利用中のセグメント化した分析レポートは、後ほど利用できるようになります。ご迷惑をおかけして申し訳ございません。",
|
||||
"DefaultAllVisits": "すべてのビジット",
|
||||
"DragDropCondition": "左のメニューから条件をドラッグ&ドロップしてください",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "ビジターデータのセグメント処理には、数分かかることがあります...",
|
||||
"OperatorAND": "AND(および)",
|
||||
"OperatorOR": "OR(または)",
|
||||
"SaveAndApply": "適用",
|
||||
"SegmentDisplayedAllWebsites": "全ウェブサイト",
|
||||
"SegmentDisplayedThisWebsiteOnly": "このウェブサイトのみ",
|
||||
"SegmentIsDisplayedForWebsite": "表示対象の選択:",
|
||||
"SegmentNotApplied": "セグメント '%s' が適用されませんでした",
|
||||
"SegmentNotAppliedMessage": "カスタムセグメント '%s' のデータをリクエストしました。この Piwik の構成は現在、パフォーマンス上の理由からレポートのリアルタイム処理をおこないません。",
|
||||
"SelectSegmentOfVisitors": "ビジターのセグメントを選択:",
|
||||
"ThisSegmentIsVisibleTo": "このセグメント設定の表示:",
|
||||
"VisibleToAllUsers": "すべてのユーザー",
|
||||
"VisibleToMe": "自分",
|
||||
"YouMayChangeSetting": "別の方法としては設定ファイル (%1$s) で設定を変更するか、このセグメント '%2$s' を選択し編集することができます。",
|
||||
"YouMustBeLoggedInToCreateSegments": "ビジターのカスタムセグメントの作成と編集にはログインが必要です。",
|
||||
"YouDontHaveAccessToCreateSegments": "セグメントの作成および編集に必要なレベルのアクセス権限を持っていません。",
|
||||
"AddingSegmentForAllWebsitesDisabled": "全ウェブサイトに対するセグメントは追加できませんでした。",
|
||||
"CustomSegment": "カスタムセグメント"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/SegmentEditor/lang/lt.json
Normal file
5
www/analytics/plugins/SegmentEditor/lang/lt.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"OperatorAND": "IR"
|
||||
}
|
||||
}
|
||||
17
www/analytics/plugins/SegmentEditor/lang/nb.json
Normal file
17
www/analytics/plugins/SegmentEditor/lang/nb.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddNewSegment": "Legg til nytt segment",
|
||||
"AreYouSureDeleteSegment": "Er du sikker på at du vil slette dette segmentet?",
|
||||
"ChooseASegment": "Velg et segment",
|
||||
"DefaultAllVisits": "Alle besøk",
|
||||
"OperatorAND": "OG",
|
||||
"OperatorOR": "ELLER",
|
||||
"SegmentDisplayedAllWebsites": "alle nettsteder",
|
||||
"SegmentDisplayedThisWebsiteOnly": "kun dette nettstedet",
|
||||
"SegmentIsDisplayedForWebsite": "og vises for",
|
||||
"SelectSegmentOfVisitors": "Velg et segment av besøkende:",
|
||||
"ThisSegmentIsVisibleTo": "Dette segmentet er synlig for:",
|
||||
"VisibleToAllUsers": "alle brukere",
|
||||
"VisibleToMe": "meg"
|
||||
}
|
||||
}
|
||||
31
www/analytics/plugins/SegmentEditor/lang/nl.json
Normal file
31
www/analytics/plugins/SegmentEditor/lang/nl.json
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Maak en hergebruik aangepaste Bezoeker segmenten met de Segment Editor.",
|
||||
"AddANDorORCondition": "Voeg %s voorwaarde toe",
|
||||
"AddNewSegment": "Voeg nieuw segment toe",
|
||||
"AreYouSureDeleteSegment": "Weet je zeker dat je dit segment wilt verwijderen?",
|
||||
"AutoArchivePreProcessed": "gesegmenteerde rapporten worden voor verwerkt (sneller, vereist archive.php cron)",
|
||||
"AutoArchiveRealTime": "gesegmenteerde rapporten worden realtime verwerkt",
|
||||
"ChooseASegment": "Kies een segment",
|
||||
"DataAvailableAtLaterDate": "De gesegmenteerde analyse rapporten zullen op een later tijdstip beschikbaar komen. Excuses voor het ongemak.",
|
||||
"DefaultAllVisits": "Alle bezoeken",
|
||||
"DragDropCondition": "Sleep en verplaats voorwaarde",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Verwerking van gesegmenteerde bezoeker gegevens kan enkele minuten duren ...",
|
||||
"OperatorAND": "EN",
|
||||
"OperatorOR": "OF",
|
||||
"SaveAndApply": "Bewaar & Pas Toe",
|
||||
"SegmentDisplayedAllWebsites": "alle websites",
|
||||
"SegmentDisplayedThisWebsiteOnly": "alleen deze website",
|
||||
"SegmentIsDisplayedForWebsite": "en getoond voor",
|
||||
"SegmentNotApplied": "Segment '%s' niet toegepast",
|
||||
"SegmentNotAppliedMessage": "Je probeert data op te vragen voor aangepast segment '%s', deze Piwik omgeving is op dit moment, vanwege performance redenen, ingericht om geen rapporten in realtime te verwerken.",
|
||||
"SelectSegmentOfVisitors": "Selecteer een segment van bezoekers:",
|
||||
"ThisSegmentIsVisibleTo": "Dit segment is zichtbaar voor:",
|
||||
"VisibleToAllUsers": "alle gebruikers",
|
||||
"VisibleToMe": "mij",
|
||||
"YouMayChangeSetting": "Als alternatief kun je er voor kiezen om de instelling binnen het configuratie bestand (%1$s) aan te passen, of wijzig dit Segment en kies '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Je moet ingelogd zijn om Bezoekers segmenten te bewerken of aan te maken.",
|
||||
"YouDontHaveAccessToCreateSegments": "U heeft niet het benodigde toegangsniveau om segmenten te maken en bewerken.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Het toevoegen van segmenten voor alle websites is uitgeschakeld."
|
||||
}
|
||||
}
|
||||
16
www/analytics/plugins/SegmentEditor/lang/pl.json
Normal file
16
www/analytics/plugins/SegmentEditor/lang/pl.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddNewSegment": "Dodaj nowy segment",
|
||||
"AreYouSureDeleteSegment": "Czy jesteś pewny, że chcesz usunąć ten segment?",
|
||||
"ChooseASegment": "Wybierz segment",
|
||||
"DefaultAllVisits": "Wszystkie wizyty",
|
||||
"OperatorAND": "I",
|
||||
"OperatorOR": "LUB",
|
||||
"SaveAndApply": "Zapisz i zatwierdź zmiany",
|
||||
"SegmentDisplayedAllWebsites": "wszystkie strony",
|
||||
"SegmentDisplayedThisWebsiteOnly": "jedynie ta strona",
|
||||
"ThisSegmentIsVisibleTo": "Ten segment jest widoczny dla",
|
||||
"VisibleToAllUsers": "wszyscy użytkownicy",
|
||||
"VisibleToMe": "mnie"
|
||||
}
|
||||
}
|
||||
36
www/analytics/plugins/SegmentEditor/lang/pt-br.json
Normal file
36
www/analytics/plugins/SegmentEditor/lang/pt-br.json
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Cria e reutiliza Segmentos personalizados de visitantes com o Editor de Segmento.",
|
||||
"AddANDorORCondition": "Adicionar a condição %s",
|
||||
"AddNewSegment": "Adicionar novo segmento",
|
||||
"AreYouSureDeleteSegment": "Confirma a exclusão deste segmento?",
|
||||
"AutoArchivePreProcessed": "Relatórios segmentados são pré-processados (Para agilizar, é necessário usar o cron em: archive.php)",
|
||||
"AutoArchiveRealTime": "Relatórios segmentados são processados em tempo real",
|
||||
"ChooseASegment": "Escolha um segmento",
|
||||
"CurrentlySelectedSegment": "Segmento atualmente selecionado: %s",
|
||||
"DataAvailableAtLaterDate": "Os seus relatórios de análise segmentados estarão disponíveis mais tarde. Pedimos desculpas pela inconveniência.",
|
||||
"DefaultAllVisits": "Todas as visitas",
|
||||
"DragDropCondition": "Condição Drag & Drop",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "O processamento segmentado de dados de visitantes pode demorar alguns mitutos...",
|
||||
"OperatorAND": "e",
|
||||
"OperatorOR": "ou",
|
||||
"SaveAndApply": "Salvar e Aplicar",
|
||||
"SegmentDisplayedAllWebsites": "Todos os Sites",
|
||||
"SegmentDisplayedThisWebsiteOnly": "Somente neste website",
|
||||
"SegmentIsDisplayedForWebsite": "e exibidos para",
|
||||
"SegmentNotApplied": "Segmento '%s' não aplicado",
|
||||
"SegmentNotAppliedMessage": "Você está solicitando dados para o Segmento Personalizado '%s', e esta configuração Piwik atualmente impede o processamento em tempo real de relatórios por motivos de desempenho.",
|
||||
"SelectSegmentOfVisitors": "Selecione um segmento de visitantes:",
|
||||
"ThisSegmentIsVisibleTo": "Este segmento é visível para:",
|
||||
"VisibleToAllUsers": "Todos os Usuários",
|
||||
"VisibleToMe": "mim",
|
||||
"YouMayChangeSetting": "Alternativamente, você pode alterar a configuração no arquivo de configuração (%1$s), ou editar este Segmento e escolher %2$s.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Você precisa estar logado para criar e editar segmentos personalizados de visitantes.",
|
||||
"YouDontHaveAccessToCreateSegments": "Você não tem o nível de acesso necessário para criar e editar segmentos.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Adicionar segmentos para todos os sites foi desativado.",
|
||||
"SegmentXIsAUnionOf": "%s é uma união destes segmentos:",
|
||||
"CustomSegment": "Segmento Personalizado",
|
||||
"SegmentOperatorIsNullOrEmpty": "está nulo ou vazio",
|
||||
"SegmentOperatorIsNotNullNorEmpty": "não está nulo nem vazio"
|
||||
}
|
||||
}
|
||||
29
www/analytics/plugins/SegmentEditor/lang/ro.json
Normal file
29
www/analytics/plugins/SegmentEditor/lang/ro.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Adaugă condiţia %s",
|
||||
"AddNewSegment": "Adaugă segment nou",
|
||||
"AreYouSureDeleteSegment": "Esti sigur ca vrei sa stergi acest segment?",
|
||||
"AutoArchivePreProcessed": "Rapoartele segmentate sunt pre-procesate (mai rapid, necesită archive.php cron)",
|
||||
"AutoArchiveRealTime": "rapoartele segmentate sunt procesate în timp real",
|
||||
"ChooseASegment": "Selectare segment",
|
||||
"DataAvailableAtLaterDate": "Rapoartele de analiză segmentate vor fi disponibile mai târziu. Ne cerem scuze pentru neplăcerile create.",
|
||||
"DefaultAllVisits": "Toate vizite",
|
||||
"DragDropCondition": "Conditie trage & lasa",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Prelucrarea datelor pe segmentul vizitatorii poate dura câteva minute ...",
|
||||
"OperatorAND": "ŞI",
|
||||
"OperatorOR": "SAU",
|
||||
"SaveAndApply": "Salvează şi aplică",
|
||||
"SegmentDisplayedAllWebsites": "toate siturile web",
|
||||
"SegmentDisplayedThisWebsiteOnly": "numai acest site web",
|
||||
"SegmentIsDisplayedForWebsite": "și afișate pentru",
|
||||
"SegmentNotApplied": "Segmentul '%s' nu se aplica",
|
||||
"SegmentNotAppliedMessage": "Vi se solicită date pentru segmentul personalizat '%s', această configurație Piwik împiedică în prezent prelucrarea în timp real a rapoartelor pentru motive de performanță.",
|
||||
"SelectSegmentOfVisitors": "Selecteaza un segment de vizitatori:",
|
||||
"ThisSegmentIsVisibleTo": "Acest segment este vizibil către:",
|
||||
"VisibleToAllUsers": "tuturor utilizatorilor",
|
||||
"VisibleToMe": "mie",
|
||||
"YouMayChangeSetting": "Alternativ, puteți schimba setările în fișierul de configurare (%1$s), sau pentru a edita acest segment și alegeți '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Trebuie să fii logat pentru a crea și edita segmente de vizitatori personalizate.",
|
||||
"YouDontHaveAccessToCreateSegments": "Nu ai nivelul de acces necesar pentru a crea și edita segmente."
|
||||
}
|
||||
}
|
||||
23
www/analytics/plugins/SegmentEditor/lang/ru.json
Normal file
23
www/analytics/plugins/SegmentEditor/lang/ru.json
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Добавить условие %s",
|
||||
"AddNewSegment": "Добавить новый сегмент",
|
||||
"AreYouSureDeleteSegment": "Вы уверены, что хотите удалить этот сегмент?",
|
||||
"AutoArchiveRealTime": "отчёты по сегментам обрабатываются в реальном времени",
|
||||
"ChooseASegment": "Выбрать сегмент",
|
||||
"DefaultAllVisits": "Все посещения",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Обработка данных о посещениях сегмента может занять несколько минут...",
|
||||
"OperatorAND": "И",
|
||||
"OperatorOR": "ИЛИ",
|
||||
"SaveAndApply": "Сохранить и применить",
|
||||
"SegmentDisplayedAllWebsites": "все сайты",
|
||||
"SegmentDisplayedThisWebsiteOnly": "только этот сайт",
|
||||
"SegmentIsDisplayedForWebsite": "и отображается для",
|
||||
"SegmentNotAppliedMessage": "Вы запрашиваете данные для пользовательского сегмента '%s', эта конфигурация Piwik в данный момент препятствует обработке отчетов в реальном времени по соображениям производительности.",
|
||||
"SelectSegmentOfVisitors": "Выберите сегмент посетителей:",
|
||||
"ThisSegmentIsVisibleTo": "Этот сегмент видим для:",
|
||||
"VisibleToAllUsers": "все пользователи",
|
||||
"VisibleToMe": "меня",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Добавление сегментов для всех веб-сайтов было отключено."
|
||||
}
|
||||
}
|
||||
6
www/analytics/plugins/SegmentEditor/lang/sk.json
Normal file
6
www/analytics/plugins/SegmentEditor/lang/sk.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddNewSegment": "Pridať nový segment",
|
||||
"DefaultAllVisits": "Všetky návštevy"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/SegmentEditor/lang/sl.json
Normal file
5
www/analytics/plugins/SegmentEditor/lang/sl.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"DefaultAllVisits": "Vsi obiski"
|
||||
}
|
||||
}
|
||||
31
www/analytics/plugins/SegmentEditor/lang/sr.json
Normal file
31
www/analytics/plugins/SegmentEditor/lang/sr.json
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"PluginDescription": "Kreiranje segmentiranih izveštaja.",
|
||||
"AddANDorORCondition": "Dodavanje uslova %s",
|
||||
"AddNewSegment": "Dodavanje novog segmenta",
|
||||
"AreYouSureDeleteSegment": "Da li ste sigurni da želite da obrišete ovaj segment?",
|
||||
"AutoArchivePreProcessed": "segmentirani izveštaji su unapred pripremljeni (brže, zahteva archive.php cron)",
|
||||
"AutoArchiveRealTime": "segmentirani izveštaji se obrađuju u realnom vremenu",
|
||||
"ChooseASegment": "Izaberite segment",
|
||||
"DataAvailableAtLaterDate": "Vaš segmentirani analitički izveštaj će biti na raspolaganju nešto kasnije. Izvinjavamo se zbog neprijatnosti.",
|
||||
"DefaultAllVisits": "Sve posete",
|
||||
"DragDropCondition": "Prevuci i Pusti uslov",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Obrada podataka može potrajati par trenutaka...",
|
||||
"OperatorAND": "I",
|
||||
"OperatorOR": "ILI",
|
||||
"SaveAndApply": "Sačuvaj i primeni",
|
||||
"SegmentDisplayedAllWebsites": "svi sajtovi",
|
||||
"SegmentDisplayedThisWebsiteOnly": "samo ovaj sajt",
|
||||
"SegmentIsDisplayedForWebsite": "i prikazan za",
|
||||
"SegmentNotApplied": "Segment '%s' nije primenjen.",
|
||||
"SegmentNotAppliedMessage": "Zahtevali ste podatke za korisnički definisani segment '%s' a trenutne postavke Piwik-a sprečavaju procesiranje izveštaja u realnom vremenu zbog očuvanja nivoa performansi.",
|
||||
"SelectSegmentOfVisitors": "Izaberite segment posetilaca:",
|
||||
"ThisSegmentIsVisibleTo": "Ovaj segment je vidljiv:",
|
||||
"VisibleToAllUsers": "svi korisnici",
|
||||
"VisibleToMe": "meni",
|
||||
"YouMayChangeSetting": "Takođe možete promeniti podešavanja i u datoteci %1$s ili izmenom segmenta i izborom '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Morate biti prijavljeni kako biste mogli da kreirate i menjate segmente.",
|
||||
"YouDontHaveAccessToCreateSegments": "Nemate odgovarajući nivo pristupa da biste kreirali i menjali segmente.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Dodavanje segmenata za sve sajtove je onemogućeno."
|
||||
}
|
||||
}
|
||||
32
www/analytics/plugins/SegmentEditor/lang/sv.json
Normal file
32
www/analytics/plugins/SegmentEditor/lang/sv.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Lägg till %s villkor",
|
||||
"AddNewSegment": "Lägg till nytt segment",
|
||||
"AreYouSureDeleteSegment": "Vill du verkligen radera detta segment?",
|
||||
"AutoArchivePreProcessed": "Segmenterade rapporter processas i förväg (för att det ska gå fortare krävs archive.php data)",
|
||||
"AutoArchiveRealTime": "Segmenterade rapporter processas i realtid",
|
||||
"ChooseASegment": "Välj ett segment",
|
||||
"DataAvailableAtLaterDate": "Dina segmenterade analysrapporter kommer att finnas tillgänglig senare. Vi ber om ursäkt för besväret.",
|
||||
"DefaultAllVisits": "Alla besök",
|
||||
"DragDropCondition": "Dra & Droppa villkor",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Att processa data för segmenterade besökare kan ta några minuter...",
|
||||
"OperatorAND": "OCH",
|
||||
"OperatorOR": "ELLER",
|
||||
"SaveAndApply": "Spara & Använd",
|
||||
"SegmentDisplayedAllWebsites": "alla webbsidor",
|
||||
"SegmentDisplayedThisWebsiteOnly": "endast denna webbsida",
|
||||
"SegmentIsDisplayedForWebsite": "och visas för",
|
||||
"SegmentNotApplied": "Segment '%s' tillämpas inte",
|
||||
"SegmentNotAppliedMessage": "Du begär data för det Anpassade Segmentet '%s', denna Piwik konfiguration förhindrar realtidsbearbetning av rapporter pga prestandaskäl.",
|
||||
"SelectSegmentOfVisitors": "Välj ett besökarsegment",
|
||||
"ThisSegmentIsVisibleTo": "Det här segmentet är synligt för:",
|
||||
"VisibleToAllUsers": "alla användare",
|
||||
"VisibleToMe": "jag",
|
||||
"YouMayChangeSetting": "Alternativt kan du ändra inställningarna i konfigurationsfilen (%1$s), eller redigera detta Segment och välj '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Du måste vara inloggad för att skapa och redigera besökssegment.",
|
||||
"YouDontHaveAccessToCreateSegments": "Du har inte rättigheter för att skapa och redigera segment.",
|
||||
"CustomSegment": "Anpassat segment",
|
||||
"SegmentOperatorIsNullOrEmpty": "är null eller tom",
|
||||
"SegmentOperatorIsNotNullNorEmpty": "är inte null och inte tom"
|
||||
}
|
||||
}
|
||||
28
www/analytics/plugins/SegmentEditor/lang/tl.json
Normal file
28
www/analytics/plugins/SegmentEditor/lang/tl.json
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Magdagdag kundisyon %s",
|
||||
"AddNewSegment": "Magdagdag ng bagong segment",
|
||||
"AreYouSureDeleteSegment": "Sigurado ka bang gusto mong tanggalin ang bahaging ito?",
|
||||
"AutoArchivePreProcessed": "Ang kaputol na ulat ay naka pre-processed (ang mas mabilis ay nangangailangan ng cron).",
|
||||
"AutoArchiveRealTime": "ang mga hinating ulat ay iprinoseso sa aktwal na oras",
|
||||
"ChooseASegment": "Pumili ng segment",
|
||||
"DataAvailableAtLaterDate": "Ang iyong segment na ulat ng analytics ay magiging available sa ibang pagkakataon. Kami ay humingi ng paumanhin sa abala.",
|
||||
"DefaultAllVisits": "Lahat ng pagbisita",
|
||||
"DragDropCondition": "Drag at Drop ang kondisyon",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Maaaring tumagal ng ilang minuto ang pagproseso ng kaputol na datos ng bisita.",
|
||||
"OperatorAND": "AT",
|
||||
"OperatorOR": "OR",
|
||||
"SaveAndApply": "I-save at I-apply",
|
||||
"SegmentDisplayedThisWebsiteOnly": "ang website na ito lamang",
|
||||
"SegmentIsDisplayedForWebsite": "at ipinapakita para sa",
|
||||
"SegmentNotApplied": "Hindi nai-apply ang Segment '%s'",
|
||||
"SelectSegmentOfVisitors": "Pumili ng isang segment sa mga bisita:",
|
||||
"ThisSegmentIsVisibleTo": "Ang segment na ito ay makikita sa:",
|
||||
"VisibleToAllUsers": "lahat ng mga user",
|
||||
"VisibleToMe": "ako",
|
||||
"YouMayChangeSetting": "Maaari mo ring baguhin ang settings sa config file (%1$s) o i-edit ang mga Segment at piliin ang '%2$s'.",
|
||||
"YouMustBeLoggedInToCreateSegments": "Kailangan mong mag log-in upang gumawa at mag-edit ng custom visitor segments.",
|
||||
"YouDontHaveAccessToCreateSegments": "Wala kang mga kinakailangang access level upang lumikha at mag edit ng mga segment.",
|
||||
"AddingSegmentForAllWebsitesDisabled": "Ang pagdagdag ng bahagi para sa lahat ng website ay hindi na pinagana."
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/SegmentEditor/lang/tr.json
Normal file
8
www/analytics/plugins/SegmentEditor/lang/tr.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"OperatorAND": "VE",
|
||||
"OperatorOR": "VEYA",
|
||||
"SaveAndApply": "Kaydet & Uygula",
|
||||
"VisibleToAllUsers": "tüm kullanıcılar"
|
||||
}
|
||||
}
|
||||
24
www/analytics/plugins/SegmentEditor/lang/vi.json
Normal file
24
www/analytics/plugins/SegmentEditor/lang/vi.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "Thêm điều kiện %s",
|
||||
"AddNewSegment": "Thêm segment mới",
|
||||
"AreYouSureDeleteSegment": "Bạn có chắc chắn muốn xóa phân đoạn này?",
|
||||
"AutoArchivePreProcessed": "Các báo cáo phân đoạn là tiền xử lý (nhanh hơn, cần thiết archive.php cron)",
|
||||
"AutoArchiveRealTime": "Các báo cáo phân đoạn được xử lý trong thời gian thực",
|
||||
"ChooseASegment": "Chọn một phân đoạn",
|
||||
"DefaultAllVisits": "Tất cả lượt truy cập",
|
||||
"DragDropCondition": "Kéo và thả",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "Xử lý dữ liệu khách truy cập bị phân đoạn có thể mất một vài phút ...",
|
||||
"OperatorAND": "AND",
|
||||
"OperatorOR": "OR",
|
||||
"SaveAndApply": "Lưu và áp dụng",
|
||||
"SegmentDisplayedAllWebsites": "Tất cả các website",
|
||||
"SegmentDisplayedThisWebsiteOnly": "Chỉ website này",
|
||||
"SegmentIsDisplayedForWebsite": "và hiển thị cho",
|
||||
"SelectSegmentOfVisitors": "Chọn một phân đoạn của khách truy cập:",
|
||||
"ThisSegmentIsVisibleTo": "Phân đoạn này có thể nhìn thấy:",
|
||||
"VisibleToAllUsers": "Tất cả người dùng",
|
||||
"VisibleToMe": "Tôi",
|
||||
"YouMustBeLoggedInToCreateSegments": "Bạn phải đăng nhập để tạo và chỉnh sửa các phân đoạn khách hàng."
|
||||
}
|
||||
}
|
||||
24
www/analytics/plugins/SegmentEditor/lang/zh-cn.json
Normal file
24
www/analytics/plugins/SegmentEditor/lang/zh-cn.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"SegmentEditor": {
|
||||
"AddANDorORCondition": "增加 %s 条件",
|
||||
"AddNewSegment": "增加新的元素",
|
||||
"AreYouSureDeleteSegment": "您确认要删除这个分段吗?",
|
||||
"AutoArchivePreProcessed": "分段报表为预处理 (更快,需要 archive.php 定时脚本)",
|
||||
"AutoArchiveRealTime": "分段报表为实时处理",
|
||||
"ChooseASegment": "选择一个分段",
|
||||
"DefaultAllVisits": "所有的访问",
|
||||
"DragDropCondition": "拖拉条件",
|
||||
"LoadingSegmentedDataMayTakeSomeTime": "正在处理分段访客数据,可能需要几分钟 ...",
|
||||
"OperatorAND": "和",
|
||||
"OperatorOR": "或",
|
||||
"SaveAndApply": "保存并应用",
|
||||
"SegmentDisplayedAllWebsites": "所有网站",
|
||||
"SegmentDisplayedThisWebsiteOnly": "仅这个网站",
|
||||
"SegmentIsDisplayedForWebsite": "显示",
|
||||
"SelectSegmentOfVisitors": "选择一个访客分段",
|
||||
"ThisSegmentIsVisibleTo": "这个分段对其可见:",
|
||||
"VisibleToAllUsers": "所有用户",
|
||||
"VisibleToMe": "我",
|
||||
"YouMustBeLoggedInToCreateSegments": "您必须登录后创建和修改自定义访客分段"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,9 +1,13 @@
|
|||
<div class="SegmentEditor" style="display:none;">
|
||||
<div class="segmentationContainer listHtml">
|
||||
<span class="segmentationTitle"></span>
|
||||
<div class="dropdown-body">
|
||||
<div class="segmentationContainer listHtml" title="{{ 'SegmentEditor_ChooseASegment'|translate|e('html_attr') }}. {{ 'SegmentEditor_CurrentlySelectedSegment'|translate(segmentDescription)|e('html_attr') }}">
|
||||
<a class="title" tabindex="4"><span class="icon icon-segment"></span><span class="segmentationTitle"></span></a>
|
||||
<div class="dropdown dropdown-body">
|
||||
<div class="segmentFilterContainer">
|
||||
<input class="segmentFilter" type="text" value="{{ 'General_Search'|translate }}"/>
|
||||
<span/>
|
||||
</div>
|
||||
<ul class="submenu">
|
||||
<li>{{ 'SegmentEditor_SelectSegmentOfVisitors'|translate }}
|
||||
<li>{{ 'SegmentEditor_SelectSegmentOfVisits'|translate }}
|
||||
<div class="segmentList">
|
||||
<ul>
|
||||
</ul>
|
||||
|
|
@ -12,13 +16,18 @@
|
|||
</ul>
|
||||
|
||||
{% if authorizedToCreateSegments %}
|
||||
<a class="add_new_segment">{{ 'SegmentEditor_AddNewSegment'|translate }}</a>
|
||||
<a class="add_new_segment btn">{{ 'SegmentEditor_AddNewSegment'|translate }}</a>
|
||||
{% else %}
|
||||
<hr/>
|
||||
<ul class="submenu">
|
||||
<li> <span class='youMustBeLoggedIn'>{{ 'SegmentEditor_YouMustBeLoggedInToCreateSegments'|translate }}
|
||||
<br/>› <a href='index.php?module={{ loginModule }}'>{{ 'Login_LogIn'|translate }}</a> </span>
|
||||
<li>
|
||||
{% if isUserAnonymous %}
|
||||
<span class='youMustBeLoggedIn'>{{ 'SegmentEditor_YouMustBeLoggedInToCreateSegments'|translate }}
|
||||
<br/>› <a href='index.php?module={{ loginModule }}'>{{ 'Login_LogIn'|translate }}</a> </span>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
<br/><br/>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -54,6 +63,8 @@
|
|||
<option value=">">{{ 'General_OperationGreaterThan'|translate }}</option>
|
||||
<option value="=@">{{ 'General_OperationContains'|translate }}</option>
|
||||
<option value="!@">{{ 'General_OperationDoesNotContain'|translate }}</option>
|
||||
<option value="=^">{{ 'General_OperationStartsWith'|translate }}</option>
|
||||
<option value="=$">{{ 'General_OperationEndsWith'|translate }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="segment-input metricValueBlock">
|
||||
|
|
@ -79,9 +90,10 @@
|
|||
<a href="#">+ {{ 'SegmentEditor_AddANDorORCondition'|translate(andCondition)|raw }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment-element">
|
||||
<div class="segment-element borderedControl expanded">
|
||||
<div class="segment-nav">
|
||||
<h4 class="visits"><span class="available_segments"><strong>
|
||||
<h4 class="visits">
|
||||
<span class="icon-segment"></span><span class="available_segments"><strong>
|
||||
<select class="available_segments_select"></select>
|
||||
</strong></span></h4>
|
||||
<div class="scrollable">
|
||||
|
|
@ -91,7 +103,17 @@
|
|||
<a class="metric_category" href="#">{{ category }}</a>
|
||||
<ul style="display:none;">
|
||||
{% for segmentInCategory in segmentsInCategory %}
|
||||
<li data-metric="{{ segmentInCategory.segment }}"><a class="ddmetric" href="#">{{ segmentInCategory.name }}</a></li>
|
||||
{% set title = segmentInCategory.name %}
|
||||
{% if segmentInCategory.unionOfSegments is defined and segmentInCategory.unionOfSegments %}
|
||||
{% set title = 'SegmentEditor_SegmentXIsAUnionOf'|translate(title) %}
|
||||
{% for unionSegment in segmentInCategory.unionOfSegments %}
|
||||
{% set title = title ~ ' ' ~ unionSegment %}
|
||||
{% if not loop.last %}
|
||||
{% set title = title ~ ',' %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<li data-metric="{{ segmentInCategory.segment }}" title="{{ title|e('html_attr') }}"><a class="ddmetric" href="#">{{ segmentInCategory.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
|
|
@ -115,7 +137,7 @@
|
|||
{{ 'SegmentEditor_SegmentIsDisplayedForWebsite'|translate }}<span class="visible_to_website"><strong>
|
||||
<select class="visible_to_website_select">
|
||||
<option selected="" value="{{ idSite }}">{{ 'SegmentEditor_SegmentDisplayedThisWebsiteOnly'|translate }}</option>
|
||||
<option value="0">{{ 'SegmentEditor_SegmentDisplayedAllWebsites'|translate }}</option>
|
||||
{% if isAddingSegmentsForAllWebsitesEnabled %}<option value="0">{{ 'SegmentEditor_SegmentDisplayedAllWebsites'|translate }}</option>{% endif %}
|
||||
</select>
|
||||
</strong></span>
|
||||
{{ 'General_And'|translate }} <span class="auto_archive"><strong>
|
||||
|
|
@ -132,7 +154,7 @@
|
|||
</div>
|
||||
<div class="segment-footer">
|
||||
<div piwik-rate-feature title="Segment Editor" style="display:inline-block;float: left;margin-top: 2px;margin-right: 10px;"></div>
|
||||
<span class="segmentFooterNote">The Segment Editor was <a class='crowdfundingLink' href='http://crowdfunding.piwik.org/custom-segments-editor/' target='_blank'>crowdfunded</a> with the awesome support of 80 companies and Piwik users worldwide!</span>
|
||||
<span class="segmentFooterNote">The Segment Editor was <a class='crowdfundingLink' href='http://crowdfunding.piwik.org/custom-segments-editor/' rel='noreferrer' target='_blank'>crowdfunded</a> with the awesome support of 80 companies and Piwik users worldwide!</span>
|
||||
<a class="delete" href="#">{{ 'General_Delete'|translate }}</a>
|
||||
<a class="close" href="#">{{ 'General_Close'|translate }}</a>
|
||||
<button class="saveAndApply">{{ 'SegmentEditor_SaveAndApply'|translate }}</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue