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

Various minor tweaks to 3.x (#10566)

* Remove code block height as it looks better to let the browser set height automatically (ie. no scroll bar)

* Remove deprecated code

* UI tests: nicer code block

* select on focus the tracking code
parent 3b09e9ab
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -621,8 +621,6 @@ class Date ...@@ -621,8 +621,6 @@ class Date
*/ */
public function getLocalized($template) public function getLocalized($template)
{ {
$template = $this->replaceLegacyPlaceholders($template);
$dateTimeFormatProvider = StaticContainer::get('Piwik\Intl\Data\Provider\DateTimeFormatProvider'); $dateTimeFormatProvider = StaticContainer::get('Piwik\Intl\Data\Provider\DateTimeFormatProvider');
$template = $dateTimeFormatProvider->getFormatPattern($template); $template = $dateTimeFormatProvider->getFormatPattern($template);
...@@ -643,40 +641,6 @@ class Date ...@@ -643,40 +641,6 @@ class Date
return $out; return $out;
} }
/**
* Replaces legacy placeholders
*
* @deprecated should be removed in Piwik 3.0.0 or later
*
* - **%day%**: replaced with the day of the month without leading zeros, eg, **1** or **20**.
* - **%shortMonth%**: the short month in the current language, eg, **Jan**, **Feb**.
* - **%longMonth%**: the whole month name in the current language, eg, **January**, **February**.
* - **%shortDay%**: the short day name in the current language, eg, **Mon**, **Tue**.
* - **%longDay%**: the long day name in the current language, eg, **Monday**, **Tuesday**.
* - **%longYear%**: the four digit year, eg, **2007**, **2013**.
* - **%shortYear%**: the two digit year, eg, **07**, **13**.
* - **%time%**: the time of day, eg, **07:35:00**, or **15:45:00**.
*/
protected function replaceLegacyPlaceholders($template)
{
if (strpos($template, '%') === false) {
return $template;
}
$mapping = array(
'%day%' => 'd',
'%shortMonth%' => 'MMM',
'%longMonth%' => 'MMMM',
'%shortDay%' => 'EEE',
'%longDay%' => 'EEEE',
'%longYear%' => 'y',
'%shortYear%' => 'yy',
'%time%' => 'HH:mm:ss'
);
return str_replace(array_keys($mapping), array_values($mapping), $template);
}
protected function formatToken($token) protected function formatToken($token)
{ {
$dayOfWeek = $this->toString('N'); $dayOfWeek = $this->toString('N');
......
#javascript-output-section .codeblock {
height: 312px;
}
#image-link-output-section .codeblock { #image-link-output-section .codeblock {
height: 92px; height: 92px;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<p>{{ 'CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead'|translate("&lt;/head&gt;")|raw }}</p> <p>{{ 'CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead'|translate("&lt;/head&gt;")|raw }}</p>
<pre>{{ jsTag|raw }}</pre> <pre piwik-select-on-focus>{{ jsTag|raw }}</pre>
<p>{{ 'CoreAdminHome_JSTrackingIntro5'|translate('<a rel="noreferrer" target="_blank" href="http://piwik.org/docs/javascript-tracking/">','</a>')|raw }}</p> <p>{{ 'CoreAdminHome_JSTrackingIntro5'|translate('<a rel="noreferrer" target="_blank" href="http://piwik.org/docs/javascript-tracking/">','</a>')|raw }}</p>
......
Le fichier a été supprimé par une entrée .gitattributes, ou son encodage n'est pas pris en charge.
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