Skip to content

Commit

Permalink
CO: Fix wrong domains
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbourdeau committed Aug 26, 2016
1 parent 2bb730f commit 8fadf94
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 35 deletions.
1 change: 1 addition & 0 deletions .t9n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ paths:
- themes
- pdf
exclude_files:
- src/PrestaShopBundle/Tests
- classes/PrestaShopAutoload.php
- app/cache/
- app/logs
Expand Down
40 changes: 20 additions & 20 deletions controllers/admin/AdminStoresController.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,16 @@ public function renderForm()
'label' => $this->trans('Disabled', array(), 'Admin.Global')
)
),
'hint' => $this->trans('Whether or not to display this store.', array(), 'Admin.ShopParemeters.Help')
'hint' => $this->trans('Whether or not to display this store.', array(), 'Admin.ShopParameters.Help')
),
array(
'type' => 'file',
'label' => $this->trans('Picture', array(), 'Admin.ShopParemeters.Feature'),
'label' => $this->trans('Picture', array(), 'Admin.ShopParameters.Feature'),
'name' => 'image',
'display_image' => true,
'image' => $image_url ? $image_url : false,
'size' => $image_size,
'hint' => $this->trans('Storefront picture.', array(), 'Admin.ShopParemeters.Help')
'hint' => $this->trans('Storefront picture.', array(), 'Admin.ShopParameters.Help')
)
),
'hours' => array(
Expand All @@ -283,13 +283,13 @@ public function renderForm()
}

$days = array();
$days[1] = $this->trans('Monday', array(), 'Admin.ShopParemeters.Feature');
$days[2] = $this->trans('Tuesday', array(), 'Admin.ShopParemeters.Feature');
$days[3] = $this->trans('Wednesday', array(), 'Admin.ShopParemeters.Feature');
$days[4] = $this->trans('Thursday', array(), 'Admin.ShopParemeters.Feature');
$days[5] = $this->trans('Friday', array(), 'Admin.ShopParemeters.Feature');
$days[6] = $this->trans('Saturday', array(), 'Admin.ShopParemeters.Feature');
$days[7] = $this->trans('Sunday', array(), 'Admin.ShopParemeters.Feature');
$days[1] = $this->trans('Monday', array(), 'Admin.ShopParameters.Feature');
$days[2] = $this->trans('Tuesday', array(), 'Admin.ShopParameters.Feature');
$days[3] = $this->trans('Wednesday', array(), 'Admin.ShopParameters.Feature');
$days[4] = $this->trans('Thursday', array(), 'Admin.ShopParameters.Feature');
$days[5] = $this->trans('Friday', array(), 'Admin.ShopParameters.Feature');
$days[6] = $this->trans('Saturday', array(), 'Admin.ShopParameters.Feature');
$days[7] = $this->trans('Sunday', array(), 'Admin.ShopParameters.Feature');

$hours_temp = json_decode($this->getFieldValue($obj, 'hours'));
$hours = [];
Expand Down Expand Up @@ -395,46 +395,46 @@ protected function _getDefaultFieldsContent()
{
$this->context = Context::getContext();
$countryList = array();
$countryList[] = array('id' => '0', 'name' => $this->trans('Choose your country', array(), 'Admin.ShopParemeters.Feature'));
$countryList[] = array('id' => '0', 'name' => $this->trans('Choose your country', array(), 'Admin.ShopParameters.Feature'));
foreach (Country::getCountries($this->context->language->id) as $country) {
$countryList[] = array('id' => $country['id_country'], 'name' => $country['name']);
}
$stateList = array();
$stateList[] = array('id' => '0', 'name' => $this->trans('Choose your state (if applicable)', array(), 'Admin.ShopParemeters.Feature'));
$stateList[] = array('id' => '0', 'name' => $this->trans('Choose your state (if applicable)', array(), 'Admin.ShopParameters.Feature'));
foreach (State::getStates($this->context->language->id) as $state) {
$stateList[] = array('id' => $state['id_state'], 'name' => $state['name']);
}

$formFields = array(
'PS_SHOP_NAME' => array(
'title' => $this->trans('Shop name', array(), 'Admin.ShopParemeters.Feature'),
'hint' => $this->trans('Displayed in emails and page titles.', array(), 'Admin.ShopParemeters.Feature'),
'title' => $this->trans('Shop name', array(), 'Admin.ShopParameters.Feature'),
'hint' => $this->trans('Displayed in emails and page titles.', array(), 'Admin.ShopParameters.Feature'),
'validation' => 'isGenericName',
'required' => true,
'type' => 'text',
'no_escape' => true,
),
'PS_SHOP_EMAIL' => array('title' => $this->trans('Shop email', array(), 'Admin.ShopParemeters.Feature'),
'hint' => $this->trans('Displayed in emails sent to customers.', array(), 'Admin.ShopParemeters.Help'),
'PS_SHOP_EMAIL' => array('title' => $this->trans('Shop email', array(), 'Admin.ShopParameters.Feature'),
'hint' => $this->trans('Displayed in emails sent to customers.', array(), 'Admin.ShopParameters.Help'),
'validation' => 'isEmail',
'required' => true,
'type' => 'text'
),
'PS_SHOP_DETAILS' => array(
'title' => $this->trans('Registration number', array(), 'Admin.ShopParemeters.Feature'),
'hint' => $this->trans('Shop registration information (e.g. SIRET or RCS).', array(), 'Admin.ShopParemeters.Help'),
'title' => $this->trans('Registration number', array(), 'Admin.ShopParameters.Feature'),
'hint' => $this->trans('Shop registration information (e.g. SIRET or RCS).', array(), 'Admin.ShopParameters.Help'),
'validation' => 'isGenericName',
'type' => 'textarea',
'cols' => 30,
'rows' => 5
),
'PS_SHOP_ADDR1' => array(
'title' => $this->trans('Shop address line 1', array(), 'Admin.ShopParemeters.Feature'),
'title' => $this->trans('Shop address line 1', array(), 'Admin.ShopParameters.Feature'),
'validation' => 'isAddress',
'type' => 'text'
),
'PS_SHOP_ADDR2' => array(
'title' => $this->trans('Shop address line 2', array(), 'Admin.ShopParemeters.Feature'),
'title' => $this->trans('Shop address line 2', array(), 'Admin.ShopParameters.Feature'),
'validation' => 'isAddress',
'type' => 'text'
),
Expand Down
4 changes: 2 additions & 2 deletions controllers/front/GuestTrackingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function postProcess()
$this->errors[] = $this->trans(
'Your password must be at least %min% characters long.',
array('%min%' => Validate::PASSWORD_LENGTH),
'Shop.Form.Help'
'Shop.Forms.Help'
);
} elseif ($customer->transformToCustomer($this->context->language->id, $password)) {
$this->success[] = $this->trans(
Expand Down Expand Up @@ -148,7 +148,7 @@ public function getBreadcrumbLinks()
$breadcrumbLinks = parent::getBreadcrumbLinks();

$breadcrumbLinks['links'][] = array(
'title' => $this->getTranslator()->trans('Guest order tracking', array(), 'Front.Theme.Checkout'),
'title' => $this->getTranslator()->trans('Guest order tracking', array(), 'Shop.Theme.Checkout'),
'url' => '#',
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

{% block content %}
<div class="search-translation">
<h2>Search</h2>
<div class="hide alert alert-info">{{ '0 results found'|trans({}, 'AdminNotificationsError') }}</div>
<label>Translation key or value (2 characters at least):</label>
<h2>{{ 'Search'|trans({}, 'Admin.Actions') }}</h2>
<div class="hide alert alert-info">{{ '0 result found'|trans({}, 'Admin.Notifications.Error') }}</div>
<label>{{ 'Translation key or value (2 characters at least):'|trans({}, 'Admin.International.Feature') }}</label>
<form>
<input pattern=".{2,}" type="search" id="jetsSearch">
<input class="btn btn-default btn-sm search-button" type="submit" value="{{ 'search'|trans({}, 'AdmninActions') }}">
<input class="btn btn-default btn-sm" type="reset" value="{{ 'reset'|trans({}, 'AdminActions') }}">
<input class="btn btn-default btn-sm search-button" type="submit" value="{{ 'Search'|trans({}, 'Admin.Actions') }}">
<input class="btn btn-default btn-sm" type="reset" value="{{ 'Reset'|trans({}, 'Admin.Actions') }}">
</form>
<div id="jetsContent">
{{ getTranslationsForms(translationsTree)|raw }}
Expand Down
14 changes: 7 additions & 7 deletions src/PrestaShopBundle/Twig/TranslationsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ public function makeSubtree($tree, $level = 3)
protected function getSharedEditFormViewProperties()
{
return array(
'label_edit' => $this->translator->trans('Edit', array(), 'AdminActions'),
'label_reset' => $this->translator->trans('Reset', array(), 'AdminActions'),
'label_edit' => $this->translator->trans('Edit', array(), 'Admin.Actions'),
'label_reset' => $this->translator->trans('Reset', array(), 'Admin.Actions'),
'notification_success' => $this->translator->trans('Translation successfully edited', array(),
'AdminNotificationsSuccess'),
'Admin.International.Notification'),
'notification_error' => $this->translator->trans('Translation unsuccessfully edited', array(),
'AdminNotificationsError'),
'Admin.International.Notification'),
);
}

Expand Down Expand Up @@ -290,8 +290,8 @@ protected function concatenateSubtreeHeader($subdomain, $subtree, $level = 2)

if ($hasMessagesSubtree) {
$output .= $this->render('button-toggle-messages-visibility.html.twig', array(
'label_show_messages' => $this->translator->trans('Show messages', array(), 'AdminActions'),
'label_hide_messages' => $this->translator->trans('Hide messages', array(), 'AdminActions')
'label_show_messages' => $this->translator->trans('Show messages', array(), 'Admin.International.Feature'),
'label_hide_messages' => $this->translator->trans('Hide messages', array(), 'Admin.International.Feature')
));

$output .= $this->getNavigation($this->parseDomain($subtree));
Expand All @@ -304,7 +304,7 @@ protected function concatenateSubtreeHeader($subdomain, $subtree, $level = 2)
if ($hasMessagesSubtree) {
$output .= $this->render('button-go-to-pagination-bar.html.twig', array(
'domain' => $id,
'label' => $this->translator->trans('Go to previous navigation menu', array(), 'AdminActions'),
'label' => $this->translator->trans('Go to previous navigation menu', array(), 'Admin.International.Feature'),
));

// Close div with translation-domain class
Expand Down
2 changes: 1 addition & 1 deletion themes/classic/templates/customer/guest-login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<div class="form-group row">
<label class="col-md-3 form-control-label required">
{l s='Order Reference:' d='Shop.Theme.Labels'}
{l s='Order Reference:' d='Shop.Forms.Labels'}
</label>
<div class="col-md-6">
<input
Expand Down

0 comments on commit 8fadf94

Please sign in to comment.