mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
refactor plan form translations mapping
This commit is contained in:
parent
1554cfe65d
commit
42819b18cb
@ -1,19 +1,19 @@
|
||||
<h2 translate>{{ 'general_information' }}</h2>
|
||||
<h2 translate>{{ 'plan_form.general_information' }}</h2>
|
||||
<input type="hidden" name="_method" value="{{method}}">
|
||||
|
||||
<div class="form-group" ng-class="{'has-error': planForm['plan[base_name]'].$dirty && planForm['plan[base_name]'].$invalid}">
|
||||
<label for="plan[base_name]">{{ 'name' | translate }} *</label>
|
||||
<label for="plan[base_name]">{{ 'plan_form.name' | translate }} *</label>
|
||||
<input type="text" id="plan[base_name]"
|
||||
name="plan[base_name]"
|
||||
class="form-control"
|
||||
ng-maxlength="24"
|
||||
ng-model="plan.base_name"
|
||||
required="required"/>
|
||||
<span class="help-block error" ng-show="planForm['plan[base_name]'].$dirty && planForm['plan[base_name]'].$error.required" translate>{{ 'name_is_required' }}</span>
|
||||
<span class="help-block error" ng-show="planForm['plan[base_name]'].$dirty && planForm['plan[base_name]'].$error.maxlength" translate>{{ 'name_length_must_be_less_than_24_characters' }}</span>
|
||||
<span class="help-block error" ng-show="planForm['plan[base_name]'].$dirty && planForm['plan[base_name]'].$error.required" translate>{{ 'plan_form.name_is_required' }}</span>
|
||||
<span class="help-block error" ng-show="planForm['plan[base_name]'].$dirty && planForm['plan[base_name]'].$error.maxlength" translate>{{ 'plan_form.name_length_must_be_less_than_24_characters' }}</span>
|
||||
</div>
|
||||
<div class="form-group" ng-class="{'has-error': planForm['plan[type]'].$dirty && planForm['plan[type]'].$invalid}">
|
||||
<label for="plan[type]">{{ 'type' | translate }} *</label>
|
||||
<label for="plan[type]">{{ 'plan_form.type' | translate }} *</label>
|
||||
<select id="plan[type]"
|
||||
name="plan[type]"
|
||||
class="form-control"
|
||||
@ -23,40 +23,40 @@
|
||||
<option value="Plan" ng-selected="plan.type == 'Plan'" translate>{{ 'standard' }}</option>
|
||||
<option value="PartnerPlan" ng-selected="plan.type == 'PartnerPlan'" translate>{{ 'partner' }}</option>
|
||||
</select>
|
||||
<span class="help-block error" ng-show="planForm['plan[type]'].$dirty && planForm['plan[type]'].$error.required" translate>{{ 'type_is_required' }}</span>
|
||||
<span class="help-block error" ng-show="planForm['plan[type]'].$dirty && planForm['plan[type]'].$error.required" translate>{{ 'plan_form.type_is_required' }}</span>
|
||||
</div>
|
||||
<div class="form-group" ng-class="{'has-error': planForm['plan[group_id]'].$dirty && planForm['plan[group_id]'].$invalid}">
|
||||
<label for="plan[group_id]">{{ 'group' | translate }} *</label>
|
||||
<label for="plan[group_id]">{{ 'plan_form.group' | translate }} *</label>
|
||||
<select id="plan[group_id]"
|
||||
name="plan[group_id]"
|
||||
class="form-control"
|
||||
ng-model="plan.group_id"
|
||||
required="required"
|
||||
ng-disabled="method == 'PATCH'">
|
||||
<option value="all" translate>{{ 'transversal_(all_groups)' }}</option>
|
||||
<option value="all" translate>{{ 'plan_form.transversal_(all_groups)' }}</option>
|
||||
<optgroup label="Groupes">
|
||||
<option ng-repeat="group in groups" ng-value="group.id" ng-selected="plan.group_id == group.id">{{group.name}}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
<span class="help-block" ng-show="planForm['plan[group_id]'].$dirty && planForm['plan[group_id]'].$error.required" translate>{{ 'group_is_required' }}</span>
|
||||
<span class="help-block" ng-show="planForm['plan[group_id]'].$dirty && planForm['plan[group_id]'].$error.required" translate>{{ 'plan_form.group_is_required' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{'has-error': planForm['plan[interval]'].$dirty && planForm['plan[interval]'].$invalid}">
|
||||
<label for="plan[interval]">{{ 'period' | translate }} *</label>
|
||||
<label for="plan[interval]">{{ 'plan_form.period' | translate }} *</label>
|
||||
<select id="plan[interval]"
|
||||
name="plan[interval]"
|
||||
class="form-control"
|
||||
ng-model="plan.interval"
|
||||
ng-disabled="method == 'PATCH'"
|
||||
required="required">
|
||||
<option value="month" ng-selected="plan.interval == 'month'" translate>{{ 'month' }}</option>
|
||||
<option value="year" ng-selected="plan.interval == 'year'" translate>{{ 'year' }}</option>
|
||||
<option value="month" ng-selected="plan.interval == 'month'" translate>{{ 'plan_form.month' }}</option>
|
||||
<option value="year" ng-selected="plan.interval == 'year'" translate>{{ 'plan_form.year' }}</option>
|
||||
</select>
|
||||
<span class="help-block" ng-show="planForm['plan[interval]'].$dirty && planForm['plan[interval]'].$error.required" translate>{{ 'period_is_required' }}</span>
|
||||
<span class="help-block" ng-show="planForm['plan[interval]'].$dirty && planForm['plan[interval]'].$error.required" translate>{{ 'plan_form.period_is_required' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{'has-error': planForm['plan[interval_count]'].$dirty && planForm['plan[interval_count]'].$invalid}">
|
||||
<label for="plan[interval]">{{ 'number_of_periods' | translate }} *</label>
|
||||
<label for="plan[interval]">{{ 'plan_form.number_of_periods' | translate }} *</label>
|
||||
<input id="plan[interval_count]"
|
||||
name="plan[interval_count]"
|
||||
class="form-control"
|
||||
@ -65,12 +65,12 @@
|
||||
ng-disabled="method == 'PATCH'"
|
||||
required="required"
|
||||
min="1"/>
|
||||
<span class="help-block" ng-show="planForm['plan[interval_count]'].$dirty && planForm['plan[interval_count]'].$error.required" translate>{{ 'number_of_periods_is_required' }}</span>
|
||||
<span class="help-block" ng-show="planForm['plan[interval_count]'].$dirty && planForm['plan[interval_count]'].$error.required" translate>{{ 'plan_form.number_of_periods_is_required' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group" ng-class="{'has-error': planForm['plan[amount]'].$dirty && planForm['plan[amount]'].$invalid}">
|
||||
<label for="plan[amount]">{{ 'subscription_price' | translate }} *</label>
|
||||
<label for="plan[amount]">{{ 'plan_form.subscription_price' | translate }} *</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{{currencySymbol}}</span>
|
||||
<input id="plan[amount]"
|
||||
@ -80,24 +80,24 @@
|
||||
ng-required="true"
|
||||
ng-model="plan.amount"/>
|
||||
</div>
|
||||
<span class="help-block" ng-show="planForm['plan[amount]'].$dirty && planForm['plan[amount]'].$error.required" translate>{{ 'price_is_required' }}</span>
|
||||
<span class="help-block" ng-show="planForm['plan[amount]'].$dirty && planForm['plan[amount]'].$error.required" translate>{{ 'plan_form.price_is_required' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label translate>{{ 'visual_prominence_of_the_subscription' }}</label>
|
||||
<label translate>{{ 'plan_form.visual_prominence_of_the_subscription' }}</label>
|
||||
<input ng-model="plan.ui_weight"
|
||||
type="number"
|
||||
name="plan[ui_weight]"
|
||||
class="form-control">
|
||||
<span class="help-block">
|
||||
{{ 'on_the_subscriptions_page_the_most_prominent_subscriptions_will_be_placed_at_the_top_of_the_list' | translate }}
|
||||
{{ 'an_evelated_number_means_a_higher_prominence' | translate }}
|
||||
{{ 'plan_form.on_the_subscriptions_page_the_most_prominent_subscriptions_will_be_placed_at_the_top_of_the_list' | translate }}
|
||||
{{ 'plan_form.an_evelated_number_means_a_higher_prominence' | translate }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="input-group m-t-md">
|
||||
<label for="plan[is_rolling]" class="control-label m-r-md">{{ 'rolling_subscription' | translate }} *</label>
|
||||
<label for="plan[is_rolling]" class="control-label m-r-md">{{ 'plan_form.rolling_subscription' | translate }} *</label>
|
||||
<input bs-switch
|
||||
ng-model="plan.isRolling"
|
||||
id="plan[is_rolling]"
|
||||
@ -112,8 +112,8 @@
|
||||
<span ng-if="method == 'PATCH'">{{ (plan.is_rolling ? 'yes' : 'no') | translate }}</span>
|
||||
<input type="hidden" name="plan[is_rolling]" value="{{plan.isRolling}}"/>
|
||||
<span class="help-block">
|
||||
{{ 'a_rolling_subscription_will_begin_the_day_of_the_first_training' | translate }}
|
||||
{{ 'otherwise_it_will_begin_as_soon_as_it_is_bought' | translate }}
|
||||
{{ 'plan_form.a_rolling_subscription_will_begin_the_day_of_the_first_training' | translate }}
|
||||
{{ 'plan_form.otherwise_it_will_begin_as_soon_as_it_is_bought' | translate }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -121,12 +121,12 @@
|
||||
<!-- PDF description attachement -->
|
||||
<input type="hidden" ng-model="plan.plan_file_attributes.id" name="plan[plan_file_attributes][id]" ng-value="plan.plan_file_attributes.id" />
|
||||
<input type="hidden" ng-model="plan.plan_file_attributes._destroy" name="plan[plan_file_attributes][_destroy]" ng-value="plan.plan_file_attributes._destroy"/>
|
||||
<label class="m-t-md" translate>{{ 'information_sheet' }}</label>
|
||||
<label class="m-t-md" translate>{{ 'plan_form.information_sheet' }}</label>
|
||||
<div class="fileinput input-group" data-provides="fileinput" ng-class="fileinputClass(plan.plan_file_attributes)">
|
||||
<div class="form-control" data-trigger="fileinput">
|
||||
<i class="glyphicon glyphicon-file fileinput-exists"></i> <span class="fileinput-filename">{{file.attachment || plan.plan_file_attributes.attachment_identifier}}</span>
|
||||
</div>
|
||||
<span class="input-group-addon btn btn-default btn-file"><span class="fileinput-new" translate>{{ 'attach_an_information_sheet' }}</span>
|
||||
<span class="input-group-addon btn btn-default btn-file"><span class="fileinput-new" translate>{{ 'plan_form.attach_an_information_sheet' }}</span>
|
||||
<span class="fileinput-exists" translate>{{ 'change' }}</span><input type="file"
|
||||
name="plan[plan_file_attributes][attachment]"
|
||||
accept="image/*, application/pdf"></span>
|
||||
@ -135,7 +135,7 @@
|
||||
|
||||
<div class="form-group m-t-md" ng-show="plan.type == 'PartnerPlan' && method != 'PATCH'">
|
||||
<input type="hidden" ng-model="plan.partnerId" name="plan[partner_id]" ng-value="plan.partnerId" />
|
||||
<label for="plan[partner_id]">{{ 'notified_partner' | translate }} *</label>
|
||||
<label for="plan[partner_id]">{{ 'plan_form.notified_partner' | translate }} *</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control"
|
||||
ng-model="plan.partnerId"
|
||||
@ -144,10 +144,10 @@
|
||||
<option value=""></option>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" ng-click="openPartnerNewModal()"><i class="fa fa-user-plus"></i> {{ 'new_user' | translate }}</button>
|
||||
<button class="btn btn-default" type="button" ng-click="openPartnerNewModal()"><i class="fa fa-user-plus"></i> {{ 'plan_form.new_user' | translate }}</button>
|
||||
</span>
|
||||
</div>
|
||||
<span class="help-block" translate>{{ 'as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user' }}</span>
|
||||
<span class="help-block" translate>{{ 'plan_form.as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="plan.partners">
|
||||
|
@ -199,30 +199,36 @@ en:
|
||||
|
||||
plan:
|
||||
# subscription plan edition form
|
||||
general_information: "General information"
|
||||
name_length_must_be_less_than_24_characters: "Name length must be less than 24 characters."
|
||||
type_is_required: "Type is required."
|
||||
group: "Group"
|
||||
transversal_(all_groups): "Transversal (all groups)"
|
||||
group_is_required: "Group is required."
|
||||
number_of_periods: "Number of periods"
|
||||
number_of_periods_is_required: "Number of periods is required."
|
||||
period: "Period"
|
||||
period_is_required: "Period is required."
|
||||
price_is_required: "Price is required."
|
||||
visual_prominence_of_the_subscription: "Visual prominence of the subscription"
|
||||
on_the_subscriptions_page_the_most_prominent_subscriptions_will_be_placed_at_the_top_of_the_list: "On the subscriptions page, the most prominent subscriptions will be placed at the top of the list."
|
||||
an_evelated_number_means_a_higher_prominence: "An elevated number means a higher prominence."
|
||||
rolling_subscription: "Rolling subscription?"
|
||||
a_rolling_subscription_will_begin_the_day_of_the_first_training: "A rolling subscription will begin the day of the first trainings."
|
||||
otherwise_it_will_begin_as_soon_as_it_is_bought: "Otherwise, it will begin as soon as it is bought."
|
||||
information_sheet: "Information sheet"
|
||||
attach_an_information_sheet: "Attach an information sheet"
|
||||
notified_partner: "Notified partner"
|
||||
new_user: "New user ..."
|
||||
as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user: "As part of a partner subscription, some notifications may be sent to this user."
|
||||
new_partner: "New partner"
|
||||
email_address_is_required: "Email address is required."
|
||||
plan_form:
|
||||
general_information: "General information"
|
||||
name: "Name"
|
||||
name_length_must_be_less_than_24_characters: "Name length must be less than 24 characters."
|
||||
type: "Type"
|
||||
type_is_required: "Type is required."
|
||||
group: "Group"
|
||||
transversal_(all_groups): "Transversal (all groups)"
|
||||
group_is_required: "Group is required."
|
||||
number_of_periods: "Number of periods"
|
||||
number_of_periods_is_required: "Number of periods is required."
|
||||
period: "Period"
|
||||
year: "Year"
|
||||
month: "Month"
|
||||
period_is_required: "Period is required."
|
||||
subscription_price: "Subscription price"
|
||||
price_is_required: "Price is required."
|
||||
visual_prominence_of_the_subscription: "Visual prominence of the subscription"
|
||||
on_the_subscriptions_page_the_most_prominent_subscriptions_will_be_placed_at_the_top_of_the_list: "On the subscriptions page, the most prominent subscriptions will be placed at the top of the list."
|
||||
an_evelated_number_means_a_higher_prominence: "An elevated number means a higher prominence."
|
||||
rolling_subscription: "Rolling subscription?"
|
||||
a_rolling_subscription_will_begin_the_day_of_the_first_training: "A rolling subscription will begin the day of the first trainings."
|
||||
otherwise_it_will_begin_as_soon_as_it_is_bought: "Otherwise, it will begin as soon as it is bought."
|
||||
information_sheet: "Information sheet"
|
||||
attach_an_information_sheet: "Attach an information sheet"
|
||||
notified_partner: "Notified partner"
|
||||
new_user: "New user ..."
|
||||
as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user: "As part of a partner subscription, some notifications may be sent to this user."
|
||||
new_partner: "New partner"
|
||||
email_address_is_required: "Email address is required."
|
||||
|
||||
trainings:
|
||||
# training edition form
|
||||
|
@ -199,30 +199,36 @@ fr:
|
||||
|
||||
plan:
|
||||
# formulaire d'édition d'une formule d'abonnement
|
||||
general_information: "Informations générales"
|
||||
name_length_must_be_less_than_24_characters: "Le nom doit faire moins de 24 caractères."
|
||||
type_is_required: "Le type est requis."
|
||||
group: "Groupe"
|
||||
transversal_(all_groups): "Transversal (tout les groupes)"
|
||||
group_is_required: "Le groupe est requis."
|
||||
number_of_periods: "Nombre de périodes"
|
||||
number_of_periods_is_required: "Le nombre de périodes est requis."
|
||||
period: "Période"
|
||||
period_is_required: "La période est requise."
|
||||
price_is_required: "Le prix est requis."
|
||||
visual_prominence_of_the_subscription: "Importance visuelle de l'abonnement"
|
||||
on_the_subscriptions_page_the_most_prominent_subscriptions_will_be_placed_at_the_top_of_the_list: "Sur la page des abonnements, les abonnements les plus importants seront placés en haut de la liste."
|
||||
an_evelated_number_means_a_higher_prominence: "Un nombre plus élevé traduit une importance plus élevée."
|
||||
rolling_subscription: "Abonnement glissant ?"
|
||||
a_rolling_subscription_will_begin_the_day_of_the_first_training: "Un abonnement glissant prendra effet seulement le jour de la première formation."
|
||||
otherwise_it_will_begin_as_soon_as_it_is_bought: "Dans le cas contraire, il prendra effet dès sa date d'achat."
|
||||
information_sheet: "Fiche descriptive"
|
||||
attach_an_information_sheet: "Joindre une fiche descriptive"
|
||||
notified_partner: "Partenaire notifié"
|
||||
new_user: "Nouvel utilisateur ..."
|
||||
as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user: "Dans le cadre d'un abonnement partenaire, certaines notifications pourront être adressées à cet utilisateur."
|
||||
new_partner: "Nouveau partenaire"
|
||||
email_address_is_required: "L'adresse e-mail est requise."
|
||||
plan_form:
|
||||
general_information: "Informations générales"
|
||||
name: "Nom"
|
||||
name_length_must_be_less_than_24_characters: "Le nom doit faire moins de 24 caractères."
|
||||
type: "Type"
|
||||
type_is_required: "Le type est requis."
|
||||
group: "Groupe"
|
||||
transversal_(all_groups): "Transversal (tout les groupes)"
|
||||
group_is_required: "Le groupe est requis."
|
||||
number_of_periods: "Nombre de périodes"
|
||||
number_of_periods_is_required: "Le nombre de périodes est requis."
|
||||
period: "Période"
|
||||
year: "Année"
|
||||
month: "Mois"
|
||||
period_is_required: "La période est requise."
|
||||
subscription_price: "Coût de l'abonnement"
|
||||
price_is_required: "Le prix est requis."
|
||||
visual_prominence_of_the_subscription: "Importance visuelle de l'abonnement"
|
||||
on_the_subscriptions_page_the_most_prominent_subscriptions_will_be_placed_at_the_top_of_the_list: "Sur la page des abonnements, les abonnements les plus importants seront placés en haut de la liste."
|
||||
an_evelated_number_means_a_higher_prominence: "Un nombre plus élevé traduit une importance plus élevée."
|
||||
rolling_subscription: "Abonnement glissant ?"
|
||||
a_rolling_subscription_will_begin_the_day_of_the_first_training: "Un abonnement glissant prendra effet seulement le jour de la première formation."
|
||||
otherwise_it_will_begin_as_soon_as_it_is_bought: "Dans le cas contraire, il prendra effet dès sa date d'achat."
|
||||
information_sheet: "Fiche descriptive"
|
||||
attach_an_information_sheet: "Joindre une fiche descriptive"
|
||||
notified_partner: "Partenaire notifié"
|
||||
new_user: "Nouvel utilisateur ..."
|
||||
as_part_of_a_partner_subscription_some_notifications_may_be_sent_to_this_user: "Dans le cadre d'un abonnement partenaire, certaines notifications pourront être adressées à cet utilisateur."
|
||||
new_partner: "Nouveau partenaire"
|
||||
email_address_is_required: "L'adresse e-mail est requise."
|
||||
|
||||
trainings:
|
||||
# formulaire d'édition d'une formation
|
||||
|
Loading…
Reference in New Issue
Block a user