Merge pull request #273 from roadster31/labels

Improved french translation, fixed some english strings.
This commit is contained in:
Manuel Raynaud
2014-04-04 11:50:27 +02:00
6 changed files with 37 additions and 14 deletions

View File

@@ -62,8 +62,8 @@ interface ParserInterface
/**
* Create a variable that will be available in the templates
*
* @param $variable the vatiable name
* @param $value the value of the variable
* @param string $variable the variable name
* @param mixed $value the value of the variable
*/
public function assign($variable, $value);
}

View File

@@ -134,6 +134,9 @@ class Form extends AbstractSmartyPlugin
$template->assign("value", $fieldValue);
$template->assign("checked", isset($fieldVars['checked']) ? $fieldVars['checked'] : false);
$template->assign("choices", isset($fieldVars['choices']) ? $fieldVars['choices'] : false);
$template->assign("multiple", isset($fieldVars['multiple']) ? $fieldVars['multiple'] : false);
//data
$template->assign("data", $fieldVars['data']);

View File

@@ -33,6 +33,7 @@ use Thelia\Model\Map\ModuleTableMap;
use Thelia\Model\ModuleI18nQuery;
use Thelia\Model\Map\ModuleImageTableMap;
use Thelia\Model\ModuleI18n;
use Thelia\Model\Order;
use Thelia\Tools\Image;
use Thelia\Exception\ModuleException;
use Thelia\Model\Module;
@@ -262,6 +263,30 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
return basename(dirname($this->reflected->getFileName()));
}
/**
* Check if this module is the payment module for a given order
*
* @param Order $order an order
* @return bool true if this module is the payment module for the given order.
*/
public function isPaymentModuleFor(Order $order) {
$model = $this->getModuleModel();
return $order->getPaymentModuleId() == $model->getId();
}
/**
* Check if this module is the delivery module for a given order
*
* @param Order $order an order
* @return bool true if this module is the delivery module for the given order.
*/
public function isDeliveryModuleFor(Order $order) {
$model = $this->getModuleModel();
return $order->getDeliveryModuleId() == $model->getId();
}
/**
*
* This method allow adding new compilers to Thelia container

View File

@@ -6,10 +6,8 @@ return array(
'(edit)' => '(modification)',
'<a href="http://en.wikipedia.org/wiki/ISO_639-1_language_matrix" target="_other">Check the list</a> of ISO 639-1 codes' => '<a href="http://en.wikipedia.org/wiki/ISO_639-1_language_matrix" target="_other">Consulter la liste</a> des codes ISO 639-1',
'<span id="number_of_generated_combinations">0</span> combinations' => '<span id="number_of_generated_combinations">0</span> combinaisons',
'<strong>Cannot translate all fields.</strong> According to your PHP configuration, forms cannot contains more than
%current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration
of change the translation file by hand.' => '<strong>Cannot translate all fields.</strong> According to your PHP configuration, forms cannot contains more than %current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration of change the translation file by hand.',
'<strong>Congratulations</strong>, all text is now translated !' => '<strong>Félicitations</strong>, Toute la traduction a été effectué',
'<strong>Cannot translate all fields.</strong> According to your PHP configuration, forms cannot contains more than %current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration of change the translation file by hand.' => '<strong>Limitation système bloquante !</strong> Votre configuration PHP limite le nombre de champs d\'une forme HTML à %current_max_input_vars champs. Au moins %required_max_input_vars champs sont nécessaires pour effectuer les traductions. Merci de modifier en conséquence la variable max_input_vars de votre configuration PHP. Vous pouvez aussi modifier les fichiers de traduction à la main.',
'<strong>Congratulations</strong>, all text is now translated !' => '<strong>Félicitations</strong>, tous les textes ont été traduits !',
'<strong>Did not found any text to translate</strong>. It\'s probably normal. If not, please be sure to use Smarty\'s "intl" function in templates, or the Translator::trans() method in PHP files.' => '<streong>Aucun texte à traduire</strong>. C\'est probablement normal. Si ce n\'est pas le cas vérifiez que vous utilisez bien la fonction Smarty "intl" ou bien le translator Translator::trans dans un fichier php',
'A content could be attached to more than one folder. Select here the additional folders for this content.' => 'Un contenu peut être rattaché à plusieurs dossiers. Sélectionnez ici les dossiers dans lesquels ce contenu apparaîtra',
'A product could be attached to more than one category. Select here the additional categories for this product.' => 'Un produit peut être associé à plusieurs rubriques. Sélectionner les rubrique pour lesquels le produit sera associé',
@@ -423,9 +421,9 @@ return array(
'Enter here the folder name in the default language (%title)' => 'Entrez ici le nom du dossier dans la langue par défaut (%title)',
'Enter here the mailing template purpose in the default language (%title)' => 'Renseigner l\'objet du mail dans la langue par défaut (%title)',
'Enter here the product name in the default language (%title)' => 'Entrez ici le nom du produit dans la langue par défaut (%title)',
'Enter here the product price in the default currency (%title)' => 'entrez ici le prix du produit dans la langue par défaut (%title)',
'Enter here the product price in %title' => 'Indiquez ici le prix HT en %title ',
'Enter here the product reference' => 'Entrez ici la nouvelle référence produit',
'Enter here the product tax price in the default currency (%title)' => 'Renseignez le prox TTC dans la devise par défaut (%title)',
'Enter here the product tax price in %title' => 'Indiquez ici le prix TTC en %title ',
'Enter here the product weight, in Kilogrammes' => 'Entrez ici le poids du produit, en Kilogrammes',
'Enter here the template name in the default language (%title)' => 'Renseignez le nom du template dans la langue par défaut (%title)',
'Enter here the value in the current edit language (%language_name)' => 'Rensignez la valeur dans la langue d\'édition actuelle (%language_name)',

View File

@@ -505,7 +505,7 @@
</div>
</div>
<div class="help-block">{intl l='Enter here the product price in the default currency (%title)' title=$NAME}</div>
<div class="help-block">{intl l='Enter here the product price in %title' title=$NAME}</div>
{form_field form=$form field='currency'}
<input type="hidden" name="{$name}" value="{$ID}" />
@@ -529,7 +529,7 @@
</div>
</div>
<div class="help-block">{intl l='Enter here the product tax price in the default currency (%title)' title=$NAME}</div>
<div class="help-block">{intl l='Enter here the product tax price in %title' title=$NAME}</div>
{/loop}
</div>
{/form_field}

View File

@@ -241,10 +241,7 @@
{if $max_input_vars_warning}
<div class="alert alert-danger">
{intl l='<strong>Cannot translate all fields.</strong> According to your PHP configuration, forms cannot contains more than
%current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration
of change the translation file by hand.'
{intl l='<strong>Cannot translate all fields.</strong> According to your PHP configuration, forms cannot contains more than %current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration of change the translation file by hand.'
current_max_input_vars=$current_max_input_vars
required_max_input_vars=$required_max_input_vars
}