Skip to content

Commit ab57298

Browse files
committed
Change ->trans to ->l to be 1.6 compliant
1 parent e21849b commit ab57298

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

ps_googleanalytics.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ public function __construct()
4646
$this->name = 'ps_googleanalytics';
4747
$this->tab = 'analytics_stats';
4848
$this->version = '3.2.0';
49-
$this->ps_versions_compliancy = array('min' => '1.7.0.0', 'max' => _PS_VERSION_);
49+
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
5050
$this->author = 'PrestaShop';
5151
$this->module_key = 'fd2aaefea84ac1bb512e6f1878d990b8';
5252
$this->bootstrap = true;
5353

5454
parent::__construct();
5555

56-
$this->displayName = $this->trans('Google Analytics', array(), 'Modules.GAnalytics.Admin');
57-
$this->description = $this->trans('Gain clear insights into important metrics about your customers, using Google Analytics', array(), 'Modules.GAnalytics.Admin');
56+
$this->displayName = $this->l('Google Analytics', array(), 'Modules.GAnalytics.Admin');
57+
$this->description = $this->l('Gain clear insights into important metrics about your customers, using Google Analytics', array(), 'Modules.GAnalytics.Admin');
5858

59-
$this->confirmUninstall = $this->trans('Are you sure you want to uninstall Google Analytics? You will lose all the data related to this module.', array(), 'Modules.GAnalytics.Admin');
59+
$this->confirmUninstall = $this->l('Are you sure you want to uninstall Google Analytics? You will lose all the data related to this module.', array(), 'Modules.GAnalytics.Admin');
6060
}
6161
public function install()
6262
{
@@ -193,86 +193,86 @@ public function displayForm()
193193
$helper->toolbar_btn = array(
194194
'save' =>
195195
array(
196-
'desc' => $this->trans('Save', array(), 'Admin.Actions'),
196+
'desc' => $this->l('Save', array(), 'Admin.Actions'),
197197
'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name.
198198
'&token='.Tools::getAdminTokenLite('AdminModules'),
199199
),
200200
'back' => array(
201201
'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminModules'),
202-
'desc' => $this->trans('Back to list', array(), 'Admin.Actions')
202+
'desc' => $this->l('Back to list', array(), 'Admin.Actions')
203203
)
204204
);
205205

206206
$fields_form = array();
207207
// Init Fields form array
208208
$fields_form[0]['form'] = array(
209209
'legend' => array(
210-
'title' => $this->trans('Settings', array(),'Admin.Global'),
210+
'title' => $this->l('Settings', array(),'Admin.Global'),
211211
),
212212
'input' => array(
213213
array(
214214
'type' => 'text',
215-
'label' => $this->trans('Google Analytics Tracking ID', array(), 'Modules.GAnalytics.Admin'),
215+
'label' => $this->l('Google Analytics Tracking ID', array(), 'Modules.GAnalytics.Admin'),
216216
'name' => 'GA_ACCOUNT_ID',
217217
'size' => 20,
218218
'required' => true,
219-
'hint' => $this->trans('This information is available in your Google Analytics account', array(), 'Modules.GAnalytics.Admin')
219+
'hint' => $this->l('This information is available in your Google Analytics account', array(), 'Modules.GAnalytics.Admin')
220220
),
221221
array(
222222
'type' => 'switch',
223-
'label' => $this->trans('Enable User ID tracking', array(), 'Modules.GAnalytics.Admin'),
223+
'label' => $this->l('Enable User ID tracking', array(), 'Modules.GAnalytics.Admin'),
224224
'name' => 'GA_USERID_ENABLED',
225225
'values' => array(
226226
array(
227227
'id' => 'ga_userid_enabled',
228228
'value' => 1,
229-
'label' => $this->trans('Enabled', array(), 'Admin.Global')
229+
'label' => $this->l('Enabled', array(), 'Admin.Global')
230230
),
231231
array(
232232
'id' => 'ga_userid_disabled',
233233
'value' => 0,
234-
'label' => $this->trans('Disabled', array(), 'Admin.Global')
234+
'label' => $this->l('Disabled', array(), 'Admin.Global')
235235
))
236236
),
237237
array(
238238
'type' => 'switch',
239-
'label' => $this->trans('Anonymize IP', array(), 'Modules.GAnalytics.Admin'),
239+
'label' => $this->l('Anonymize IP', array(), 'Modules.GAnalytics.Admin'),
240240
'name' => 'GA_ANONYMIZE_ENABLED',
241-
'hint' => $this->trans('Use this option to anonymize the visitor’s IP to comply with data privacy laws in some countries'),
241+
'hint' => $this->l('Use this option to anonymize the visitor’s IP to comply with data privacy laws in some countries'),
242242
'values' => array(
243243
array(
244244
'id' => 'ga_anonymize_enabled',
245245
'value' => 1,
246-
'label' => $this->trans('Enabled', array(), 'Admin.Global')
246+
'label' => $this->l('Enabled', array(), 'Admin.Global')
247247
),
248248
array(
249249
'id' => 'ga_anonymize_disabled',
250250
'value' => 0,
251-
'label' => $this->trans('Disabled', array(), 'Admin.Global')
251+
'label' => $this->l('Disabled', array(), 'Admin.Global')
252252
),
253253
),
254254
),
255255
),
256256
'submit' => array(
257-
'title' => $this->trans('Save', array(), 'Admin.Actions'),
257+
'title' => $this->l('Save', array(), 'Admin.Actions'),
258258
)
259259
);
260260

261261
if ($is_multistore_active) {
262262
$fields_form[0]['form']['input'][] = array(
263263
'type' => 'switch',
264-
'label' => $this->trans('Enable Cross-Domain tracking', array(), 'Modules.GAnalytics.Admin'),
264+
'label' => $this->l('Enable Cross-Domain tracking', array(), 'Modules.GAnalytics.Admin'),
265265
'name' => 'GA_CROSSDOMAIN_ENABLED',
266266
'values' => array(
267267
array(
268268
'id' => 'ga_crossdomain_enabled',
269269
'value' => 1,
270-
'label' => $this->trans('Enabled', array(), 'Admin.Global')
270+
'label' => $this->l('Enabled', array(), 'Admin.Global')
271271
),
272272
array(
273273
'id' => 'ga_crossdomain_disabled',
274274
'value' => 0,
275-
'label' => $this->trans('Disabled', array(), 'Admin.Global')
275+
'label' => $this->l('Disabled', array(), 'Admin.Global')
276276
)
277277
)
278278
);
@@ -298,24 +298,24 @@ public function getContent()
298298
if (!empty($ga_account_id)) {
299299
Configuration::updateValue('GA_ACCOUNT_ID', $ga_account_id);
300300
Configuration::updateValue('GANALYTICS_CONFIGURATION_OK', true);
301-
$output .= $this->displayConfirmation($this->trans('Account ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
301+
$output .= $this->displayConfirmation($this->l('Account ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
302302
}
303303
$ga_userid_enabled = Tools::getValue('GA_USERID_ENABLED');
304304
if (null !== $ga_userid_enabled) {
305305
Configuration::updateValue('GA_USERID_ENABLED', (bool)$ga_userid_enabled);
306-
$output .= $this->displayConfirmation($this->trans('Settings for User ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
306+
$output .= $this->displayConfirmation($this->l('Settings for User ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
307307
}
308308

309309
$ga_crossdomain_enabled = Tools::getValue('GA_CROSSDOMAIN_ENABLED');
310310
if (null !== $ga_crossdomain_enabled) {
311311
Configuration::updateValue('GA_CROSSDOMAIN_ENABLED', (bool)$ga_crossdomain_enabled);
312-
$output .= $this->displayConfirmation($this->trans('Settings for User ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
312+
$output .= $this->displayConfirmation($this->l('Settings for User ID updated successfully', array(), 'Modules.GAnalytics.Admin'));
313313
}
314314

315315
$ga_anonymize_enabled = Tools::getValue('GA_ANONYMIZE_ENABLED');
316316
if (null !== $ga_anonymize_enabled) {
317317
Configuration::updateValue('GA_ANONYMIZE_ENABLED', (bool)$ga_anonymize_enabled);
318-
$output .= $this->displayConfirmation($this->trans('Settings for Anonymize IP updated successfully', array(), 'Modules.GAnalytics.Admin'));
318+
$output .= $this->displayConfirmation($this->l('Settings for Anonymize IP updated successfully', array(), 'Modules.GAnalytics.Admin'));
319319
}
320320
}
321321

0 commit comments

Comments
 (0)