Skip to content
Extraits de code Groupes Projets
Valider 3e524abc rédigé par Matthieu Aubry's avatar Matthieu Aubry Validation de GitHub
Parcourir les fichiers

Use placeholder in translation string (#10924)

* Use placeholder in translation string

* Fix the system test
parent 8457bc70
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -27,7 +27,7 @@ class UrlHelper
*
* @return true if $test matches or is equal to one of the regex/string in $patterns, false otherwise.
*/
protected static function in_array_reg($test, $patterns)
protected static function in_array_matches_regex($test, $patterns)
{
foreach($patterns as $val) {
if(@preg_match($val, null) === false) {
......@@ -62,7 +62,7 @@ class UrlHelper
// decode encoded square brackets
$name = str_replace(array('%5B', '%5D'), array('[', ']'), $name);
if (!self::in_array_reg(strtolower($name), $parametersToExclude)) {
if (!self::in_array_matches_regex(strtolower($name), $parametersToExclude)) {
if (is_array($value)) {
foreach ($value as $param) {
if ($param === false) {
......
......@@ -43,7 +43,7 @@
"KeepURLFragmentsLong": "Keep Page URL fragments when tracking Page URLs",
"ListOfIpsToBeExcludedOnAllWebsites": "The IPs below will be excluded from being tracked on all websites.",
"ListOfQueryParametersToBeExcludedOnAllWebsites": "The Query URLs parameters below will be excluded from URLs on all websites.",
"ListOfQueryParametersToExclude": "Enter the list of URL Query Parameters, one per line, to exclude from the Page URLs reports. Regular expressions such as /^sess.*|.*[dD]ate$/ are suported.",
"ListOfQueryParametersToExclude": "Enter the list of URL Query Parameters, one per line, to exclude from the Page URLs reports. Regular expressions such as %s are suported.",
"MainDescription": "Your Web Analytics reports need Websites! Add, update, delete Websites, and show the JavaScript to insert in your pages.",
"MenuManage": "Manage",
"NotAnEcommerceSite": "Not an Ecommerce site",
......
<div>
{{ 'SitesManager_ListOfQueryParametersToExclude'|translate }}
{{ 'SitesManager_ListOfQueryParametersToExclude'|translate:'/^sess.*|.*[dD]ate$/' }}
<br/><br/>
......
......@@ -183,7 +183,7 @@ class MeasurableSettings extends \Piwik\Settings\Measurable\MeasurableSettings
$self = $this;
return $this->makeProperty('excluded_parameters', $default = array(), FieldConfig::TYPE_ARRAY, function (FieldConfig $field) use ($self) {
$field->title = Piwik::translate('SitesManager_ExcludedParameters');
$field->inlineHelp = Piwik::translate('SitesManager_ListOfQueryParametersToExclude')
$field->inlineHelp = Piwik::translate('SitesManager_ListOfQueryParametersToExclude', "/^sess.*|.*[dD]ate$/")
. '<br /><br />'
. Piwik::translate('SitesManager_PiwikWillAutomaticallyExcludeCommonSessionParameters', array('phpsessid, sessionid, ...'));
$field->uiControl = FieldConfig::UI_CONTROL_TEXTAREA;
......
......@@ -101,7 +101,7 @@
</uiControlAttributes>
<availableValues />
<description />
<inlineHelp>Enter the list of URL Query Parameters, one per line, to exclude from the Page URLs reports.&lt;br /&gt;&lt;br /&gt;Piwik will automatically exclude the common session parameters (phpsessid, sessionid, ...).</inlineHelp>
<inlineHelp>Enter the list of URL Query Parameters, one per line, to exclude from the Page URLs reports. Regular expressions such as /^sess.*|.*[dD]ate$/ are suported.&lt;br /&gt;&lt;br /&gt;Piwik will automatically exclude the common session parameters (phpsessid, sessionid, ...).</inlineHelp>
<introduction />
<condition />
</row>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter