Browse Source

Backend : traductions

reduction
Guillaume 4 years ago
parent
commit
479a52f1f8
3 changed files with 23 additions and 6 deletions
  1. +1
    -1
      ShopBundle/Model/MerchantConfig.php
  2. +15
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  3. +7
    -5
      ShopBundle/Resources/views/backend/form/custom_bootstrap_4.html.twig

+ 1
- 1
ShopBundle/Model/MerchantConfig.php View File



public function getLabel() public function getLabel()
{ {
return $this->getOptionValue('label') ;
return 'field.MerchantConfig.'.$this->getOptionValue('id') ;
} }


public function getFieldType() public function getFieldType()

+ 15
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml View File

listChildren: Afficher les enfants listChildren: Afficher les enfants
edit: Éditer edit: Éditer
delete: Supprimer delete: Supprimer
send: Envoyer

product: product:
title: Titre title: Titre
titleHelp: Un message d'aide titleHelp: Un message d'aide
main: Général main: Général
address: Adresse address: Adresse
default: Édition default: Édition
Général: Général
Adresse: Adresse
ProductFamily: ProductFamily:
addresses: Livraisons & facturation addresses: Livraisons & facturation
main: Général main: Général
alert: Alerte alert: Alerte
info: Information info: Information
warningMessage: Contenu du message d'avertissement warningMessage: Contenu du message d'avertissement
newsletters: Newsletters
isPublic: Publique
isDepository: Dépôt
productCategories: Catégories
parent: Parent
date: Date
content: Contenu
devAlias: Alias
merchantConfigs: Configuration
taxRate: Règle de taxe
value: Valeur


ProductFamily: ProductFamily:
activeProducts: Activer les déclinaisons activeProducts: Activer les déclinaisons

+ 7
- 5
ShopBundle/Resources/views/backend/form/custom_bootstrap_4.html.twig View File

'%id%': id, '%id%': id,
}) %} }) %}
{%- else -%} {%- else -%}
{% set label = 'form.field.'~easyadmin['entity']['name']~'.'~name %}
{% if label|trans({}, 'lcshop') == label %}{% set label = 'form.field.default.'~name %}{% endif %}
{% if 'field.MerchantConfig.' in label %}
{% set name_trad = label|replace({'field.MerchantConfig.': ''}) %}
{% set trad = name_trad|lc_trad(easyadmin['entity']['name'], 'field') %}
{% else %}
{% set trad = name|lc_trad(easyadmin['entity']['name'], 'field') %}
{% endif %}
{%- endif -%} {%- endif -%}
<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>{{ name|lc_trad(easyadmin['entity']['name'], 'field') }}</{{ element|default('label') }}>

<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>{{ trad }}</{{ element|default('label') }}>
{%- endif -%} {%- endif -%}
{%- endblock form_label %} {%- endblock form_label %}



{% block easyadmin_rest %} {% block easyadmin_rest %}
{{- form_rest(form) -}} {{- form_rest(form) -}}



Loading…
Cancel
Save