1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

refactor plan translations mapping

This commit is contained in:
Sylvain 2017-02-14 16:09:07 +01:00
parent 93bceb5517
commit 1554cfe65d
5 changed files with 40 additions and 34 deletions

View File

@ -146,7 +146,7 @@ Application.Controllers.controller 'NewPlanController', ['$scope', '$uibModal',
$scope.partner.name = "#{user.first_name} #{user.last_name}"
$uibModalInstance.close($scope.partner)
, (error)->
growl.error(_t('unable_to_save_this_user_check_that_there_isnt_an_already_a_user_with_the_same_name'))
growl.error(_t('new_plan.unable_to_save_this_user_check_that_there_isnt_an_already_a_user_with_the_same_name'))
$scope.cancel = ->
$uibModalInstance.dismiss('cancel')
]
@ -164,9 +164,9 @@ Application.Controllers.controller 'NewPlanController', ['$scope', '$uibModal',
##
$scope.afterSubmit = (content) ->
if !content.id? and !content.plan_ids?
growl.error(_t('unable_to_create_the_subscription_please_try_again'))
growl.error(_t('new_plan.unable_to_create_the_subscription_please_try_again'))
else
growl.success(_t('successfully_created_subscription(s)_dont_forget_to_redefine_prices'))
growl.success(_t('new_plan.successfully_created_subscription(s)_dont_forget_to_redefine_prices'))
if content.plan_ids?
$state.go('app.admin.pricing')
else
@ -231,9 +231,9 @@ Application.Controllers.controller 'EditPlanController', ['$scope', 'groups', 'p
##
$scope.afterSubmit = (content) ->
if !content.id? and !content.plan_ids?
growl.error(_t('unable_to_save_subscription_changes_please_try_again'))
growl.error(_t('confirm_changes.unable_to_save_subscription_changes_please_try_again'))
else
growl.success(_t('subscription_successfully_changed'))
growl.success(_t('confirm_changes.subscription_successfully_changed'))
$state.go('app.admin.pricing')

View File

@ -7,7 +7,7 @@
</div>
<div class="col-xs-10 col-sm-10 col-md-8 b-l">
<section class="heading-title">
<h1>{{ 'subscription_plan' | translate }} {{ plan.base_name }}</h1>
<h1>{{ 'edit_plan.subscription_plan' | translate }} {{ plan.base_name }}</h1>
</section>
</div>
@ -30,19 +30,19 @@
<ng-include src="'<%= asset_path 'admin/plans/_form.html' %>'"></ng-include>
<h2 class="m-t-xl" translate>{{ 'prices' }}</h2>
<h2 class="m-t-xl" translate>{{ 'edit_plan.prices' }}</h2>
<div class="form-group col-md-6 col-lg-offset-6">
<input type="hidden" ng-model="plan.parent" name="plan[parent_id]" ng-value="plan.parent"/>
<label for="parentPlan" translate>{{ 'copy_prices_from' }}</label>
<label for="parentPlan" translate>{{ 'edit_plan.copy_prices_from' }}</label>
<select id="parentPlan" ng-options="plan.id as humanReadablePlanName(plan, groups) for plan in plans" ng-model="plan.parent" ng-change="copyPricesFromPlan()" class="form-control">
<option value=""></option>
</select>
</div>
<h3 translate>{{ 'machines' }}</h3>
<h3 translate>{{ 'edit_plan.machines' }}</h3>
<table class="table">
<thead>
<th translate>{{ 'machine' }}</th>
<th translate>{{ 'hourly_rate' }}</th>
<th translate>{{ 'edit_plan.machine' }}</th>
<th translate>{{ 'edit_plan.hourly_rate' }}</th>
</thead>
<tbody>

View File

@ -7,7 +7,7 @@
</div>
<div class="col-xs-10 col-sm-10 col-md-8 b-l">
<section class="heading-title">
<h1 translate>{{ 'add_a_subscription_plan' }}</h1>
<h1 translate>{{ 'new_plan.add_a_subscription_plan' }}</h1>
</section>
</div>

View File

@ -214,19 +214,22 @@ en:
plans:
new:
# add a subscription plan on the platform
add_a_subscription_plan: "Add a subscription plan"
unable_to_create_the_subscription_please_try_again: "Unable to create the subscription plan. Please try again."
successfully_created_subscription(s)_dont_forget_to_redefine_prices: "Subscription(s) successfully created. Don't forget to redefine prices."
unable_to_save_this_user_check_that_there_isnt_an_already_a_user_with_the_same_name: "Unable to save this user. Check that there isn't an already defined user with the same name."
new_plan:
add_a_subscription_plan: "Add a subscription plan"
unable_to_create_the_subscription_please_try_again: "Unable to create the subscription plan. Please try again."
successfully_created_subscription(s)_dont_forget_to_redefine_prices: "Subscription(s) successfully created. Don't forget to redefine prices."
unable_to_save_this_user_check_that_there_isnt_an_already_a_user_with_the_same_name: "Unable to save this user. Check that there isn't an already defined user with the same name."
edit:
# edit a subscription plan / machine hours prices
subscription_plan: "Subscription plan:"
prices: "Prices"
copy_prices_from: "Copy prices from"
machine: "Machine"
hourly_rate: "Hourly rate"
unable_to_save_subscription_changes_please_try_again: "Unable to save subscription changes. Please try again."
subscription_successfully_changed: "Subscription successfully changed."
edit_plan:
subscription_plan: "Subscription plan:"
prices: "Prices"
copy_prices_from: "Copy prices from"
machines: "Machines"
machine: "Machine"
hourly_rate: "Hourly rate"
unable_to_save_subscription_changes_please_try_again: "Unable to save subscription changes. Please try again."
subscription_successfully_changed: "Subscription successfully changed."
invoices:
# list of all invoices & invoicing parameters

View File

@ -214,19 +214,22 @@ fr:
plans:
new:
# ajouter une formule d'abonnement sur la plate-forme
add_a_subscription_plan: "Ajouter une formule d'abonnement"
unable_to_create_the_subscription_please_try_again: "L'abonnement n'a pas pu être créé. Veuillez réessayer."
successfully_created_subscription(s)_dont_forget_to_redefine_prices: "Création du/des abonnement(s) réussie. N'oubliez pas de redéfinir les tarifs."
unable_to_save_this_user_check_that_there_isnt_an_already_a_user_with_the_same_name: "Impossible d'enregistrer cet utilisateur. Vérifiez qu'il n'existe pas déjà un utilisateur du même nom."
new_plan:
add_a_subscription_plan: "Ajouter une formule d'abonnement"
unable_to_create_the_subscription_please_try_again: "L'abonnement n'a pas pu être créé. Veuillez réessayer."
successfully_created_subscription(s)_dont_forget_to_redefine_prices: "Création du/des abonnement(s) réussie. N'oubliez pas de redéfinir les tarifs."
unable_to_save_this_user_check_that_there_isnt_an_already_a_user_with_the_same_name: "Impossible d'enregistrer cet utilisateur. Vérifiez qu'il n'existe pas déjà un utilisateur du même nom."
edit:
# modifier une formule d'abonnement / les prix des heures machines
subscription_plan: "Formule d'abonnement :"
prices: "Tarifs"
copy_prices_from: "Copier les prix depuis"
machine: "Machine"
hourly_rate: "Tarif horaire"
unable_to_save_subscription_changes_please_try_again: "Les modifications de l'abonnement n'ont pas pu être enregistrées. Veuillez réessayer."
subscription_successfully_changed: "Modification de l'abonnement réussie."
edit_plan:
subscription_plan: "Formule d'abonnement :"
prices: "Tarifs"
copy_prices_from: "Copier les prix depuis"
machines: "Machines"
machine: "Machine"
hourly_rate: "Tarif horaire"
unable_to_save_subscription_changes_please_try_again: "Les modifications de l'abonnement n'ont pas pu être enregistrées. Veuillez réessayer."
subscription_successfully_changed: "Modification de l'abonnement réussie."
invoices:
# liste de toutes les factures & paramètres de facturation