Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix translations #128

Merged
merged 1 commit into from Dec 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions classes/Form/ConfigurationForm.php
Expand Up @@ -149,9 +149,9 @@ public function generate()
],
[
'type' => 'select',
'label' => $this->module->getTranslator()->trans('Cancelled order states', [], 'Modules.GAnalytics.Admin'),
'label' => $this->module->getTranslator()->trans('Canceled order states', [], 'Modules.GAnalytics.Admin'),
'name' => 'GA_CANCELLED_STATES',
'desc' => $this->module->getTranslator()->trans('Choose order states, in which you consider the given order cancelled. This will be usually only the default "Cancelled" state, but some shops may have extra states like "Returned" etc.', [], 'Modules.GAnalytics.Admin'),
'desc' => $this->module->getTranslator()->trans('Choose order states, in which you consider the given order canceled. This will usually be the default "Canceled" state, but some shops may have extra states like "Returned" etc.', [], 'Modules.GAnalytics.Admin'),
'class' => 'chosen',
'multiple' => true,
'options' => [
Expand Down Expand Up @@ -238,15 +238,15 @@ public function treat()

if (null !== $gaTrackBackOffice) {
Configuration::updateValue('GA_TRACK_BACKOFFICE_ENABLED', (bool) $gaTrackBackOffice);
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for Enable Back Office tracking updated successfully', [], 'Modules.GAnalytics.Admin'));
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for Enable Back Office tracking updated successfully.', [], 'Modules.GAnalytics.Admin'));
}

if ($gaCancelledStates === false) {
Configuration::updateValue('GA_CANCELLED_STATES', '');
} else {
Configuration::updateValue('GA_CANCELLED_STATES', json_encode($gaCancelledStates));
}
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for cancelled order states updated successfully', [], 'Modules.GAnalytics.Admin'));
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for canceled order states updated successfully.', [], 'Modules.GAnalytics.Admin'));

return $treatmentResult;
}
Expand Down