diff --git a/app/assets/javascripts/controllers/admin/calendar.js.erb b/app/assets/javascripts/controllers/admin/calendar.js.erb
index df52ae0e7..793579bf7 100644
--- a/app/assets/javascripts/controllers/admin/calendar.js.erb
+++ b/app/assets/javascripts/controllers/admin/calendar.js.erb
@@ -675,7 +675,7 @@ Application.Controllers.controller('CreateEventModalController', ['$scope', '$ui
if (items.length === 0) return `${_t("app.admin.calendar.none")}`;
const names = items.map(function (i) { return $sce.trustAsHtml(`${i.name}`); });
- if (items.length > 1) return names.slice(0, -1).join(', ') + ` ${_t('and')} ` + names[names.length - 1];
+ if (items.length > 1) return names.slice(0, -1).join(', ') + ` ${_t('app.admin.calendar.and')} ` + names[names.length - 1];
return names[0];
}
diff --git a/app/assets/javascripts/controllers/admin/groups.js b/app/assets/javascripts/controllers/admin/groups.js
index 221d64d8f..e102117c6 100644
--- a/app/assets/javascripts/controllers/admin/groups.js
+++ b/app/assets/javascripts/controllers/admin/groups.js
@@ -54,15 +54,15 @@ Application.Controllers.controller('GroupsController', ['$scope', 'groupsPromise
*/
$scope.saveGroup = function (data, id) {
if (id != null) {
- return Group.update({ id }, { group: data }, response => growl.success(_t('group_form.changes_successfully_saved'))
- , error => growl.error(_t('group_form.an_error_occurred_while_saving_changes')));
+ return Group.update({ id }, { group: data }, response => growl.success(_t('app.admin.members.group_form.changes_successfully_saved'))
+ , error => growl.error(_t('app.admin.members.group_form.an_error_occurred_while_saving_changes')));
} else {
return Group.save({ group: data }, function (resp) {
- growl.success(_t('group_form.new_group_successfully_saved'));
+ growl.success(_t('app.admin.members.group_form.new_group_successfully_saved'));
return $scope.groups[$scope.groups.length - 1].id = resp.id;
}
, function (error) {
- growl.error(_t('.group_forman_error_occurred_when_saving_the_new_group'));
+ growl.error(_t('app.admin.members.group_form.an_error_occurred_when_saving_the_new_group'));
return $scope.groups.splice($scope.groups.length - 1, 1);
});
}
@@ -74,10 +74,10 @@ Application.Controllers.controller('GroupsController', ['$scope', 'groupsPromise
*/
$scope.removeGroup = index =>
Group.delete({ id: $scope.groups[index].id }, function (resp) {
- growl.success(_t('group_form.group_successfully_deleted'));
+ growl.success(_t('app.admin.members.group_form.group_successfully_deleted'));
return $scope.groups.splice(index, 1);
}
- , error => growl.error(_t('group_form.unable_to_delete_group_because_some_users_and_or_groups_are_still_linked_to_it')));
+ , error => growl.error(_t('app.admin.members.group_form.unable_to_delete_group_because_some_users_and_or_groups_are_still_linked_to_it')));
/**
* Enable/disable the group at the specified index
@@ -86,13 +86,13 @@ Application.Controllers.controller('GroupsController', ['$scope', 'groupsPromise
return $scope.toggleDisableGroup = function (index) {
const group = $scope.groups[index];
if (!group.disabled && (group.users > 0)) {
- return growl.error(_t('group_form.unable_to_disable_group_with_users', { USERS: group.users }));
+ return growl.error(_t('app.admin.members.group_form.unable_to_disable_group_with_users', { USERS: group.users }));
} else {
return Group.update({ id: group.id }, { group: { disabled: !group.disabled } }, function (response) {
$scope.groups[index] = response;
- return growl.success(_t('group_form.group_successfully_enabled_disabled', { STATUS: response.disabled }));
+ return growl.success(_t('app.admin.members.group_form.group_successfully_enabled_disabled', { STATUS: response.disabled }));
}
- , error => growl.error(_t('group_form.unable_to_enable_disable_group', { STATUS: !group.disabled })));
+ , error => growl.error(_t('app.admin.members.group_form.unable_to_enable_disable_group', { STATUS: !group.disabled })));
}
};
}
diff --git a/app/assets/javascripts/controllers/admin/invoices.js.erb b/app/assets/javascripts/controllers/admin/invoices.js.erb
index 3011621d3..df5cbc6c7 100644
--- a/app/assets/javascripts/controllers/admin/invoices.js.erb
+++ b/app/assets/javascripts/controllers/admin/invoices.js.erb
@@ -705,8 +705,8 @@ Application.Controllers.controller('AvoirModalController', ['$scope', '$uibModal
// If a subscription was took with the current invoice, should it be canceled or not
$scope.subscriptionExpireOptions = {};
- $scope.subscriptionExpireOptions[_t('yes')] = true;
- $scope.subscriptionExpireOptions[_t('no')] = false;
+ $scope.subscriptionExpireOptions[_t('app.shared.buttons.yes')] = true;
+ $scope.subscriptionExpireOptions[_t('app.shared.buttons.no')] = false;
// AngularUI-Bootstrap datepicker parameters to define when to refund
$scope.datePicker = {
diff --git a/app/assets/javascripts/controllers/admin/members.js.erb b/app/assets/javascripts/controllers/admin/members.js.erb
index ce7b16c41..506cae4ee 100644
--- a/app/assets/javascripts/controllers/admin/members.js.erb
+++ b/app/assets/javascripts/controllers/admin/members.js.erb
@@ -192,8 +192,8 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce',
resolve: {
object () {
return {
- title: _t('confirmation_required'),
- msg: $sce.trustAsHtml(_t('confirm_delete_member') + '
' + _t('this_may_take_a_while_please_wait'))
+ title: _t('app.admin.members.confirmation_required'),
+ msg: $sce.trustAsHtml(_t('app.admin.members.confirm_delete_member') + '
' + _t('app.admin.members.this_may_take_a_while_please_wait'))
};
}
}
@@ -203,9 +203,9 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce',
{ id: memberId },
function () {
$scope.members.splice(findItemIdxById($scope.members, memberId), 1);
- return growl.success(_t('member_successfully_deleted'));
+ return growl.success(_t('app.admin.members.member_successfully_deleted'));
},
- function (error) { growl.error(_t('unable_to_delete_the_member')); }
+ function (error) { growl.error(_t('app.admin.members.unable_to_delete_the_member')); }
);
}
);
@@ -222,8 +222,8 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce',
resolve: {
object () {
return {
- title: _t('confirmation_required'),
- msg: $sce.trustAsHtml(_t('do_you_really_want_to_delete_this_administrator_this_cannot_be_undone') + '
' + _t('this_may_take_a_while_please_wait'))
+ title: _t('app.admin.members.confirmation_required'),
+ msg: $sce.trustAsHtml(_t('app.admin.members.do_you_really_want_to_delete_this_administrator_this_cannot_be_undone') + '
' + _t('app.admin.members.this_may_take_a_while_please_wait'))
};
}
}
@@ -233,9 +233,9 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce',
{ id: admin.id },
function () {
admins.splice(findItemIdxById(admins, admin.id), 1);
- return growl.success(_t('administrator_successfully_deleted'));
+ return growl.success(_t('app.admin.members.administrator_successfully_deleted'));
},
- function (error) { growl.error(_t('unable_to_delete_the_administrator')); }
+ function (error) { growl.error(_t('app.admin.members.unable_to_delete_the_administrator')); }
);
}
);
@@ -268,7 +268,7 @@ Application.Controllers.controller('AdminMembersController', ['$scope', '$sce',
$scope.alertExport = function (type) {
Export.status({ category: 'users', type }).then(function (res) {
if (!res.data.exists) {
- return growl.success(_t('export_is_running_you_ll_be_notified_when_its_ready'));
+ return growl.success(_t('app.admin.members.export_is_running_you_ll_be_notified_when_its_ready'));
}
});
};
@@ -424,10 +424,10 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
{ id: subscription.id },
{ subscription: { expired_at: $scope.new_expired_at, free } },
function (_subscription) {
- growl.success(_t('you_successfully_changed_the_expiration_date_of_the_user_s_subscription'));
+ growl.success(_t('app.admin.members_edit.you_successfully_changed_the_expiration_date_of_the_user_s_subscription'));
return $uibModalInstance.close(_subscription);
},
- function (error) { growl.error(_t('a_problem_occurred_while_saving_the_date')); }
+ function (error) { growl.error(_t('app.admin.members_edit.a_problem_occurred_while_saving_the_date')); }
);
};
@@ -471,12 +471,12 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
$scope.ok = function () {
$scope.subscription.user_id = user.id;
return Subscription.save({ }, { subscription: $scope.subscription }, function (_subscription) {
- growl.success(_t('subscription_successfully_purchased'));
+ growl.success(_t('app.admin.members_edit.subscription_successfully_purchased'));
$uibModalInstance.close(_subscription);
return $state.reload();
}
, function (error) {
- growl.error(_t('a_problem_occurred_while_taking_the_subscription'));
+ growl.error(_t('app.admin.members_edit.a_problem_occurred_while_taking_the_subscription'));
console.error(error);
});
};
@@ -536,11 +536,11 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
avoir_description: $scope.description
},
function (_wallet) {
- growl.success(_t('wallet_credit_successfully'));
+ growl.success(_t('app.shared.wallet.wallet_credit_successfully'));
return $uibModalInstance.close(_wallet);
},
function (error) {
- growl.error(_t('a_problem_occurred_for_wallet_credit'));
+ growl.error(_t('app.shared.wallet.a_problem_occurred_for_wallet_credit'));
console.error(error);
}
);
@@ -750,11 +750,11 @@ Application.Controllers.controller('NewAdminController', ['$state', '$scope', 'A
{},
{ admin: $scope.admin },
function () {
- growl.success(_t('administrator_successfully_created_he_will_receive_his_connection_directives_by_email', { GENDER: getGender($scope.admin) }));
+ growl.success(_t('app.admin.admins_new.administrator_successfully_created_he_will_receive_his_connection_directives_by_email', { GENDER: getGender($scope.admin) }));
return $state.go('app.admin.members');
}
, function (error) {
- growl.error(_t('failed_to_create_admin') + JSON.stringify(error.data ? error.data : error));
+ growl.error(_t('app.admin.admins_new.failed_to_create_admin') + JSON.stringify(error.data ? error.data : error));
console.error(error);
}
);
diff --git a/app/assets/javascripts/controllers/admin/pricing.js.erb b/app/assets/javascripts/controllers/admin/pricing.js.erb
index acd26eab8..fb576b001 100644
--- a/app/assets/javascripts/controllers/admin/pricing.js.erb
+++ b/app/assets/javascripts/controllers/admin/pricing.js.erb
@@ -528,7 +528,7 @@ Application.Controllers.controller('EditPricingController', ['$scope', '$state',
, function () {
// the admin has confirmed, delete the coupon
Coupon.delete({ id }, function (res) {
- growl.success(_t('coupon_was_successfully_deleted'));
+ growl.success(_t('app.admin.pricing.coupon_was_successfully_deleted'));
return $scope.coupons.splice(findItemIdxById(coupons, id), 1);
}
diff --git a/app/assets/javascripts/controllers/admin/settings.js.erb b/app/assets/javascripts/controllers/admin/settings.js.erb
index d16907986..e682dd5a2 100644
--- a/app/assets/javascripts/controllers/admin/settings.js.erb
+++ b/app/assets/javascripts/controllers/admin/settings.js.erb
@@ -166,7 +166,7 @@ Application.Controllers.controller('SettingsController', ['$scope', '$filter', '
Setting.update(
{ name: setting.name },
{ value },
- function () { growl.success(_t('app.admin.settings.customization_of_SETTING_successfully_saved', { SETTING: _t(`settings.${setting.name}`) })); },
+ function () { growl.success(_t('app.admin.settings.customization_of_SETTING_successfully_saved', { SETTING: _t(`app.admin.settings.${setting.name}`) })); },
function (error) { console.log(error); }
);
};
diff --git a/app/assets/javascripts/controllers/admin/trainings.js.erb b/app/assets/javascripts/controllers/admin/trainings.js.erb
index 366bfe531..d783bf429 100644
--- a/app/assets/javascripts/controllers/admin/trainings.js.erb
+++ b/app/assets/javascripts/controllers/admin/trainings.js.erb
@@ -276,8 +276,8 @@ Application.Controllers.controller('TrainingsAdminController', ['$scope', '$stat
resolve: {
object () {
return {
- title: _t('confirmation_required'),
- msg: _t('do_you_really_want_to_delete_this_training')
+ title: _t('app.admin.trainings.confirmation_required'),
+ msg: _t('app.admin.trainings.do_you_really_want_to_delete_this_training')
};
}
}
@@ -285,10 +285,10 @@ Application.Controllers.controller('TrainingsAdminController', ['$scope', '$stat
function () { // deletion confirmed
training.$delete(function () {
$scope.trainings.splice(index, 1);
- growl.info(_t('training_successfully_deleted'));
+ growl.info(_t('app.admin.trainings.training_successfully_deleted'));
},
function (error) {
- growl.warning(_t('unable_to_delete_the_training_because_some_users_alredy_booked_it'));
+ growl.warning(_t('app.admin.trainings.unable_to_delete_the_training_because_some_users_already_booked_it'));
console.error(error);
});
}
diff --git a/app/assets/javascripts/controllers/application.js.erb b/app/assets/javascripts/controllers/application.js.erb
index 7e4d33006..db462cb75 100644
--- a/app/assets/javascripts/controllers/application.js.erb
+++ b/app/assets/javascripts/controllers/application.js.erb
@@ -149,7 +149,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
$uibModalInstance.close(user);
} else {
// the user was not saved in database, something wrong occurred
- growl.error(_t('unexpected_error_occurred'));
+ growl.error(_t('app.public.common.unexpected_error_occurred'));
}
}, function (error) {
// creation failed...
@@ -204,7 +204,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
};
}]
}).result['finally'](null).then(function () {
- growl.success(_t('your_password_was_successfully_changed'));
+ growl.success(_t('app.public.common.your_password_was_successfully_changed'));
return Auth.login().then(function (user) {
$scope.setCurrentUser(user);
}, function (error) {
@@ -375,7 +375,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
console.error(`Authentication failed: ${JSON.stringify(error)}`);
$scope.alerts = [];
return $scope.alerts.push({
- msg: _t('wrong_email_or_password'),
+ msg: _t('app.public.common.wrong_email_or_password'),
type: 'danger'
});
});
@@ -418,13 +418,13 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
$scope.alerts = [];
return $http.post('/users/password.json', { user: $scope.user }).then(function () { $uibModalInstance.close(); }).catch(function () {
$scope.alerts.push({
- msg: _t('your_email_address_is_unknown'),
+ msg: _t('app.public.common.your_email_address_is_unknown'),
type: 'danger'
});
});
};
}]
- }).result['finally'](null).then(function () { growl.info(_t('you_will_receive_in_a_moment_an_email_with_instructions_to_reset_your_password')); });
+ }).result['finally'](null).then(function () { growl.info(_t('app.public.common.you_will_receive_in_a_moment_an_email_with_instructions_to_reset_your_password')); });
}
});
// otherwise the user just closed the modal
diff --git a/app/assets/javascripts/controllers/members.js b/app/assets/javascripts/controllers/members.js
index 23127f37f..5afb42eba 100644
--- a/app/assets/javascripts/controllers/members.js
+++ b/app/assets/javascripts/controllers/members.js
@@ -142,10 +142,10 @@ Application.Controllers.controller('EditProfileController', ['$scope', '$rootSco
$rootScope.currentUser = user;
Auth._currentUser.group_id = user.group_id;
$scope.group.change = false;
- return growl.success(_t('edit_profile.your_group_has_been_successfully_changed'));
+ return growl.success(_t('app.logged.dashboard.settings.your_group_has_been_successfully_changed'));
}
, function (err) {
- growl.error(_t('edit_profile.an_unexpected_error_prevented_your_group_from_being_changed'));
+ growl.error(_t('app.logged.dashboard.settings.an_unexpected_error_prevented_your_group_from_being_changed'));
return console.error(err);
});
@@ -198,13 +198,13 @@ Application.Controllers.controller('EditProfileController', ['$scope', '$rootSco
resolve: {
object () {
return {
- title: _t('confirmation_required'),
+ title: _t('app.logged.dashboard.settings.confirmation_required'),
msg: $sce.trustAsHtml(
- _t('edit_profile.confirm_delete_your_account') + '
' +
- '' + _t('edit_profile.all_data_will_be_lost') + '
' +
- _t('edit_profile.invoicing_data_kept') + '
' +
- _t('edit_profile.statistic_data_anonymized') + '
' +
- _t('edit_profile.no_further_access_to_projects')
+ _t('app.logged.dashboard.settings.confirm_delete_your_account') + '
' +
+ '' + _t('app.logged.dashboard.settings.all_data_will_be_lost') + '
' +
+ _t('app.logged.dashboard.settings.invoicing_data_kept') + '
' +
+ _t('app.logged.dashboard.settings.statistic_data_anonymized') + '
' +
+ _t('app.logged.dashboard.settings.no_further_access_to_projects')
)
};
}
@@ -214,12 +214,12 @@ Application.Controllers.controller('EditProfileController', ['$scope', '$rootSco
Member.remove({ id: user.id }, () =>
Auth.logout().then(function () {
$state.go('app.public.home');
- return growl.success(_t('edit_profile.your_user_account_has_been_successfully_deleted_goodbye'));
+ return growl.success(_t('app.logged.dashboard.settings.your_user_account_has_been_successfully_deleted_goodbye'));
})
, function (error) {
console.log(error);
- return growl.error(_t('edit_profile.an_error_occured_preventing_your_account_from_being_deleted'));
+ return growl.error(_t('app.logged.dashboard.settings.an_error_occured_preventing_your_account_from_being_deleted'));
})
);
diff --git a/app/assets/javascripts/controllers/plans.js.erb b/app/assets/javascripts/controllers/plans.js.erb
index bc155daa9..bbdbd4cee 100644
--- a/app/assets/javascripts/controllers/plans.js.erb
+++ b/app/assets/javascripts/controllers/plans.js.erb
@@ -99,7 +99,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop
const amountToPay = helpers.getAmountToPay($scope.cart.total, wallet.amount);
if (($scope.currentUser.role !== 'admin') && (amountToPay > 0)) {
if ($rootScope.fablabWithoutOnlinePayment) {
- growl.error(_t('online_payment_disabled'));
+ growl.error(_t('app.public.plans.online_payment_disabled'));
} else {
return payByStripe();
}
@@ -323,7 +323,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop
if ((price.price > 0) && ($scope.walletAmount === 0)) {
$scope.validButtonName = _t('app.public.plans.confirm_payment_of_html', { ROLE: $scope.currentUser.role, AMOUNT: $filter('currency')(price.price) });
} else {
- $scope.validButtonName = _t('confirm');
+ $scope.validButtonName = _t('app.shared.buttons.confirm');
}
}
diff --git a/app/assets/javascripts/controllers/profile.js.erb b/app/assets/javascripts/controllers/profile.js.erb
index 4c7e11048..7a893f7a1 100644
--- a/app/assets/javascripts/controllers/profile.js.erb
+++ b/app/assets/javascripts/controllers/profile.js.erb
@@ -123,7 +123,7 @@ Application.Controllers.controller('CompleteProfileController', ['$scope', '$roo
if (err.data.error) {
growl.error(err.data.error);
} else {
- growl.error(_t('an_unexpected_error_occurred_check_your_authentication_code'));
+ growl.error(_t('app.logged.profile_completion.an_unexpected_error_occurred_check_your_authentication_code'));
console.error(err);
}
});
@@ -174,7 +174,7 @@ Application.Controllers.controller('CompleteProfileController', ['$scope', '$roo
function (email) {
// Request the server to send an auth-migration email to the current user
AuthProvider.send_code({ email },
- function (res) { growl.info(_t('code_successfully_sent_again')); },
+ function (res) { growl.info(_t('app.logged.profile_completion.code_successfully_sent_again')); },
function (err) { growl.error(err.data.error); }
);
}
diff --git a/app/assets/javascripts/controllers/spaces.js.erb b/app/assets/javascripts/controllers/spaces.js.erb
index 20db9ea8d..a60d0fce0 100644
--- a/app/assets/javascripts/controllers/spaces.js.erb
+++ b/app/assets/javascripts/controllers/spaces.js.erb
@@ -185,7 +185,7 @@ Application.Controllers.controller('ShowSpaceController', ['$scope', '$state', '
event.preventDefault();
// check the permissions
if ($scope.currentUser.role !== 'admin') {
- return console.error(_t('space_show.unauthorized_operation'));
+ return console.error(_t('app.public.space_show.unauthorized_operation'));
} else {
return dialogs.confirm({
resolve: {
diff --git a/app/assets/javascripts/controllers/trainings.js.erb b/app/assets/javascripts/controllers/trainings.js.erb
index d29ac27b9..22ed4e5dd 100644
--- a/app/assets/javascripts/controllers/trainings.js.erb
+++ b/app/assets/javascripts/controllers/trainings.js.erb
@@ -47,15 +47,15 @@ Application.Controllers.controller('ShowTrainingController', ['$scope', '$state'
$scope.delete = function (training) {
// check the permissions
if ($scope.currentUser.role !== 'admin') {
- console.error(_t('unauthorized_operation'));
+ growl.error(_t('app.public.training_show.unauthorized_operation'));
} else {
dialogs.confirm(
{
resolve: {
object () {
return {
- title: _t('confirmation_required'),
- msg: _t('do_you_really_want_to_delete_this_training')
+ title: _t('app.public.training_show.confirmation_required'),
+ msg: _t('app.public.training_show.do_you_really_want_to_delete_this_training')
};
}
}
@@ -65,7 +65,7 @@ Application.Controllers.controller('ShowTrainingController', ['$scope', '$state'
training.$delete(
function () { $state.go('app.public.trainings_list'); },
function (error) {
- growl.warning(_t('the_training_cant_be_deleted_because_it_is_already_reserved_by_some_users'));
+ growl.warning(_t('app.public.training_show.the_training_cant_be_deleted_because_it_is_already_reserved_by_some_users'));
console.error(error);
}
);
@@ -208,7 +208,7 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$sta
*/
$scope.markSlotAsModifying = function () {
$scope.selectedEvent.backgroundColor = '#eee';
- $scope.selectedEvent.title = $scope.selectedEvent.training.name + ' - ' + _t('i_change');
+ $scope.selectedEvent.title = $scope.selectedEvent.training.name + ' - ' + _t('app.logged.trainings_reserve.i_change');
return updateCalendar();
};
@@ -222,7 +222,7 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$sta
}
if (!$scope.events.placable || ($scope.events.placable._id !== $scope.selectedEvent._id)) {
$scope.selectedEvent.backgroundColor = '#bbb';
- $scope.selectedEvent.title = $scope.selectedEvent.training.name + ' - ' + _t('i_shift');
+ $scope.selectedEvent.title = $scope.selectedEvent.training.name + ' - ' + _t('app.logged.trainings_reserve.i_shift');
}
return updateCalendar();
};
@@ -231,7 +231,7 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$sta
* When modifying an already booked reservation, callback when the modification was successfully done.
*/
$scope.modifyTrainingSlot = function () {
- $scope.events.placable.title = $scope.currentUser.role !== 'admin' ? $scope.events.placable.training.name + ' - ' + _t('i_ve_reserved') : $scope.events.placable.training.name;
+ $scope.events.placable.title = $scope.currentUser.role !== 'admin' ? $scope.events.placable.training.name + ' - ' + _t('app.logged.trainings_reserve.i_ve_reserved') : $scope.events.placable.training.name;
$scope.events.placable.backgroundColor = 'white';
$scope.events.placable.borderColor = $scope.events.modifiable.borderColor;
$scope.events.placable.id = $scope.events.modifiable.id;
@@ -257,7 +257,7 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$sta
$scope.events.placable.backgroundColor = 'white';
$scope.events.placable.title = $scope.events.placable.training.name;
}
- $scope.events.modifiable.title = $scope.currentUser.role !== 'admin' ? $scope.events.modifiable.training.name + ' - ' + _t('i_ve_reserved') : $scope.events.modifiable.training.name;
+ $scope.events.modifiable.title = $scope.currentUser.role !== 'admin' ? $scope.events.modifiable.training.name + ' - ' + _t('app.logged.trainings_reserve.i_ve_reserved') : $scope.events.modifiable.training.name;
$scope.events.modifiable.backgroundColor = 'white';
return updateCalendar();
@@ -329,7 +329,7 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$sta
$scope.events.paid[0].can_modify = true;
updateTrainingSlotId($scope.events.paid[0], reservation);
$scope.events.paid[0].borderColor = '#b2e774';
- $scope.events.paid[0].title = $scope.events.paid[0].training.name + ' - ' + _t('i_ve_reserved');
+ $scope.events.paid[0].title = $scope.events.paid[0].training.name + ' - ' + _t('app.logged.trainings_reserve.i_ve_reserved');
if ($scope.selectedPlan) {
$scope.ctrl.member.subscribed_plan = angular.copy($scope.selectedPlan);
diff --git a/app/assets/javascripts/directives/cart.js.erb b/app/assets/javascripts/directives/cart.js.erb
index 0eb1dd94e..70e258be0 100644
--- a/app/assets/javascripts/directives/cart.js.erb
+++ b/app/assets/javascripts/directives/cart.js.erb
@@ -117,7 +117,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
return $scope.modePlans = true;
} else {
// otherwise we alert, this error musn't occur when the current user hasn't the admin role
- return growl.error(_t('cart.please_select_a_member_first'));
+ return growl.error(_t('app.shared.cart.please_select_a_member_first'));
}
};
@@ -133,7 +133,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
const amountToPay = helpers.getAmountToPay($scope.amountTotal, wallet.amount);
if (!$scope.isAdmin() && (amountToPay > 0)) {
if ($rootScope.fablabWithoutOnlinePayment) {
- growl.error(_t('cart.online_payment_disabled'));
+ growl.error(_t('app.shared.cart.online_payment_disabled'));
} else {
return payByStripe(reservation);
}
@@ -145,7 +145,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
});
} else {
// otherwise we alert, this error musn't occur when the current user is not admin
- return growl.error(_t('cart.please_select_a_member_first'));
+ return growl.error(_t('app.shared.cart.please_select_a_member_first'));
}
};
@@ -173,7 +173,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
return $scope.events.modifiable = null;
}
, function (err) { // failure
- growl.error(_t('cart.unable_to_change_the_reservation'));
+ growl.error(_t('app.shared.cart.unable_to_change_the_reservation'));
return console.error(err);
});
};
@@ -315,19 +315,19 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
resolve: {
object () {
return {
- title: _t('cart.confirmation_required'),
- msg: _t('cart.do_you_really_want_to_cancel_this_reservation')
+ title: _t('app.shared.cart.confirmation_required'),
+ msg: _t('app.shared.cart.do_you_really_want_to_cancel_this_reservation')
};
}
}
},
function () { // cancel confirmed
Slot.cancel({ id: $scope.slot.id }, function () { // successfully canceled
- growl.success(_t('cart.reservation_was_cancelled_successfully'));
+ growl.success(_t('app.shared.cart.reservation_was_cancelled_successfully'));
if (typeof $scope.onSlotCancelSuccess === 'function') { return $scope.onSlotCancelSuccess(); }
}
, function () { // error while canceling
- growl.error(_t('cart.cancellation_failed'));
+ growl.error(_t('app.shared.cart.cancellation_failed'));
});
}
);
@@ -403,7 +403,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
});
} else {
// otherwise we alert, this error musn't occur when the current user is not admin
- growl.warning(_t('cart.please_select_a_member_first'));
+ growl.warning(_t('app.shared.cart.please_select_a_member_first'));
return $scope.amountTotal = null;
}
};
@@ -556,12 +556,12 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
// Button label
if ($scope.amount > 0) {
- $scope.validButtonName = _t('cart.confirm_payment_of_html', { ROLE: $rootScope.currentUser.role, AMOUNT: $filter('currency')($scope.amount) });
+ $scope.validButtonName = _t('app.shared.cart.confirm_payment_of_html', { ROLE: $rootScope.currentUser.role, AMOUNT: $filter('currency')($scope.amount) });
} else {
if ((price.price > 0) && ($scope.walletAmount === 0)) {
- $scope.validButtonName = _t('cart.confirm_payment_of_html', { ROLE: $rootScope.currentUser.role, AMOUNT: $filter('currency')(price.price) });
+ $scope.validButtonName = _t('app.shared.cart.confirm_payment_of_html', { ROLE: $rootScope.currentUser.role, AMOUNT: $filter('currency')(price.price) });
} else {
- $scope.validButtonName = _t('confirm');
+ $scope.validButtonName = _t('app.shared.buttons.confirm');
}
}
@@ -576,7 +576,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
}
, function (response) {
$scope.alerts = [];
- $scope.alerts.push({ msg: _t('cart.a_problem_occurred_during_the_payment_process_please_try_again_later'), type: 'danger' });
+ $scope.alerts.push({ msg: _t('app.shared.cart.a_problem_occurred_during_the_payment_process_please_try_again_later'), type: 'danger' });
return $scope.attempting = false;
});
};
diff --git a/app/assets/javascripts/directives/coupon.js.erb b/app/assets/javascripts/directives/coupon.js.erb
index fe0c0f861..0d8e6316a 100644
--- a/app/assets/javascripts/directives/coupon.js.erb
+++ b/app/assets/javascripts/directives/coupon.js.erb
@@ -53,15 +53,15 @@ Application.Directives.directive('coupon', [ '$rootScope', 'Coupon', '_t', funct
$scope.status = 'valid';
$scope.coupon = res;
if (res.type === 'percent_off') {
- return $scope.messages.push({ type: 'success', message: _t('the_coupon_has_been_applied_you_get_PERCENT_discount', { PERCENT: res.percent_off }) });
+ return $scope.messages.push({ type: 'success', message: _t('app.shared.coupon_input.the_coupon_has_been_applied_you_get_PERCENT_discount', { PERCENT: res.percent_off }) });
} else {
- return $scope.messages.push({ type: 'success', message: _t('the_coupon_has_been_applied_you_get_AMOUNT_CURRENCY', { AMOUNT: res.amount_off, CURRENCY: $rootScope.currencySymbol }) });
+ return $scope.messages.push({ type: 'success', message: _t('app.shared.coupon_input.the_coupon_has_been_applied_you_get_AMOUNT_CURRENCY', { AMOUNT: res.amount_off, CURRENCY: $rootScope.currencySymbol }) });
}
}
, function (err) {
$scope.status = 'invalid';
$scope.coupon = null;
- return $scope.messages.push({ type: 'danger', message: _t(`unable_to_apply_the_coupon_because_${err.data.status}`) });
+ return $scope.messages.push({ type: 'danger', message: _t(`app.shared.coupon_input.unable_to_apply_the_coupon_because_${err.data.status}`) });
});
}
};
diff --git a/app/assets/javascripts/directives/stripe-form.js.erb b/app/assets/javascripts/directives/stripe-form.js.erb
index 15835c91c..4f125e4b4 100644
--- a/app/assets/javascripts/directives/stripe-form.js.erb
+++ b/app/assets/javascripts/directives/stripe-form.js.erb
@@ -73,7 +73,7 @@ Application.Directives.directive('stripeForm', ['Payment', 'growl', '_t',
if (response.error.statusText) {
growl.error(response.error.statusText);
} else {
- growl.error(`${_t('payment_card_error')} ${response.error}`);
+ growl.error(`${_t('app.shared.messages.payment_card_error')} ${response.error}`);
}
confirmButton.prop('disabled', false);
} else if (response.requires_action) {
diff --git a/app/assets/templates/admin/admins/new.html.erb b/app/assets/templates/admin/admins/new.html.erb
index 8eeebbb34..4164626ab 100644
--- a/app/assets/templates/admin/admins/new.html.erb
+++ b/app/assets/templates/admin/admins/new.html.erb
@@ -7,7 +7,7 @@
{{ 'you_intentionally_decide_to_extend_the_user_s_subscription_by_offering_him_free_days' }}
-{{ 'credits_will_remain_unchanged' }}
+{{ 'app.admin.members_edit.you_intentionally_decide_to_extend_the_user_s_subscription_by_offering_him_free_days' }}
+{{ 'app.admin.members_edit.credits_will_remain_unchanged' }}
{{ 'you_intentionally_decide_to_extend_the_user_s_subscription_by_charging_him_again_for_his_current_subscription' }}
-{{ 'credits_will_be_reset' }}
+{{ 'app.admin.members_edit.you_intentionally_decide_to_extend_the_user_s_subscription_by_charging_him_again_for_his_current_subscription' }}
+{{ 'app.admin.members_edit.credits_will_be_reset' }}
{{ 'do_not_fill_the_form_beside_but_specify_here_the_code_you_ve_received_by_email_to_recover_your_access' }}
-{{ 'just_specify_code_here_to_recover_access' }}
-{{ 'i_did_not_receive_the_code' }}
+{{ 'app.logged.profile_completion.do_not_fill_the_form_beside_but_specify_here_the_code_you_ve_received_by_email_to_recover_your_access' }}
+{{ 'app.logged.profile_completion.just_specify_code_here_to_recover_access' }}
+{{ 'app.logged.profile_completion.i_did_not_receive_the_code' }}
{{ 'we_need_some_more_details' }}.
-{{ 'your_email_is_already_used_by_another_account_on_the_platform' }}
+{{ 'app.logged.profile_completion.we_need_some_more_details' }}.
+{{ 'app.logged.profile_completion.your_email_is_already_used_by_another_account_on_the_platform' }}
{{ 'please_fill_the_following_form'}}.
-{{ 'some_data_may_have_already_been_provided_by_provider_and_cannot_be_modified' | translate:{NAME:activeProvider.name} }}.
- {{ 'then_click_on_' | translate }} {{ 'confirm_changes' }} {{ '_to_start_using_the_application' | translate }}.
{{ 'app.logged.profile_completion.please_fill_the_following_form'}}.
+{{ 'app.logged.profile_completion.some_data_may_have_already_been_provided_by_provider_and_cannot_be_modified' | translate:{NAME:activeProvider.name} }}.
+ {{ 'app.logged.profile_completion.then_click_on_' | translate }} {{ 'app.shared.buttons.confirm_changes' }} {{ 'app.logged.profile_completion._to_start_using_the_application' | translate }}.
- {{ 'your_email_' | translate }} ({{ssoEmail()}}) {{ '_is_currently_associated_with_another_account_on_this_platform' | translate }} - {{ 'please_click_to_change_email_associated_with_your_PROVIDER_account' | translate:{PROVDER: activeProvider.name} }} + {{ 'app.logged.profile_completion.your_email_' | translate }} + ({{ssoEmail()}}) + {{ 'app.logged.profile_completion._is_currently_associated_with_another_account_on_this_platform' | translate }} + {{ 'app.logged.profile_completion.please_click_to_change_email_associated_with_your_PROVIDER_account' | translate:{PROVDER: activeProvider.name} }}
{{ 'once_your_data_are_up_to_date_' | translate }} {{ '_click_on_the_synchronization_button_opposite_' }} {{ 'or' | translate}} {{ '_disconnect_then_reconnect_' }} {{ '_for_your_changes_to_take_effect' | translate }}
++ {{ 'app.logged.profile_completion.once_your_data_are_up_to_date_' | translate }} + {{ 'app.logged.profile_completion._click_on_the_synchronization_button_opposite_' }} + {{ 'app.logged.profile_completion.or' | translate}} + {{ 'app.logged.profile_completion._disconnect_then_reconnect_' }} + {{ 'app.logged.profile_completion._for_your_changes_to_take_effect' | translate }} +
- {{ 'not_registered_to_the_fablab' }}
+ {{ 'app.public.common.not_registered_to_the_fablab' }}
- {{ 'create_an_account' }}
+ {{ 'app.public.common.create_an_account' }}
{{ 'here_is_the_summary_of_the_slots_to_book_for_the_current_user' }}
+{{ 'app.shared.valid_reservation_modal.here_is_the_summary_of_the_slots_to_book_for_the_current_user' }}