1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

refactoring i18n keys: projects

This commit is contained in:
Sylvain 2019-12-18 11:08:14 +01:00
parent a8e8ffa1d4
commit 1124159f2e
11 changed files with 110 additions and 82 deletions

View File

@ -17,21 +17,21 @@ Application.Controllers.controller('AbusesController', ['$scope', '$state', 'Abu
resolve: {
object () {
return {
title: _t('manage_abuses.confirmation_required'),
msg: _t('manage_abuses.report_will_be_destroyed')
title: _t('app.admin.manage_abuses.confirmation_required'),
msg: _t('app.admin.manage_abuses.report_will_be_destroyed')
};
}
}
},
function () { // cancel confirmed
Abuse.remove({ id: abuseId }, function () { // successfully canceled
growl.success(_t('manage_abuses.report_removed'));
growl.success(_t('app.admin.manage_abuses.report_removed'));
Abuse.query({}, function (abuses) {
$scope.abuses = abuses.abuses.filter(a => a.signaled_type === 'Project');
});
}
, function () { // error while canceling
growl.error(_t('manage_abuses.failed_to_remove'));
growl.error(_t('app.admin.manage_abuses.failed_to_remove'));
});
}
);

View File

@ -165,8 +165,8 @@ class ProjectsController {
resolve: {
object () {
return {
title: _t('confirmation_required'),
msg: _t('do_you_really_want_to_delete_this_step')
title: _t('app.shared.project.confirmation_required'),
msg: _t('app.shared.project.do_you_really_want_to_delete_this_step')
};
}
}
@ -215,6 +215,10 @@ class ProjectsController {
return false;
};
/**
* This function will query the API to autocomplete the typed user's name
* @param nameLookup {string}
*/
$scope.autoCompleteName = function (nameLookup) {
if (!nameLookup) {
return;
@ -246,6 +250,16 @@ class ProjectsController {
return step.project_step_images_attributes.splice(index, 1);
}
};
/**
* Returns the text to display on the save button, depending on the current state of the project
*/
$scope.saveButtonValue = function () {
if (!$scope.project.state || $scope.project.state === 'draft') {
return _t('app.shared.project.save_as_draft');
}
return _t('app.shared.buttons.save');
}
}
}
@ -324,7 +338,7 @@ Application.Controllers.controller('ProjectsController', ['$scope', '$state', 'P
$scope.projectsPagination = new paginationService.Instance(OpenlabProject, currentPage, PROJECTS_PER_PAGE, null, { }, loadMoreOpenlabCallback);
return OpenlabProject.query({ q: $scope.search.q, page: currentPage, per_page: PROJECTS_PER_PAGE }, function (projectsPromise) {
if (projectsPromise.errors != null) {
growl.error(_t('projects_list.openlab_search_not_available_at_the_moment'));
growl.error(_t('app.public.projects_list.openlab_search_not_available_at_the_moment'));
$scope.openlab.searchOverWholeNetwork = false;
return $scope.triggerSearch();
} else {
@ -533,8 +547,8 @@ Application.Controllers.controller('ShowProjectController', ['$scope', '$state',
resolve: {
object () {
return {
title: _t('confirmation_required'),
msg: _t('do_you_really_want_to_delete_this_project')
title: _t('app.public.projects_show.confirmation_required'),
msg: _t('app.public.projects_show.do_you_really_want_to_delete_this_project')
};
}
}
@ -543,7 +557,7 @@ Application.Controllers.controller('ShowProjectController', ['$scope', '$state',
$scope.project.$delete(function () { $state.go('app.public.projects_list', {}, { reload: true }); });
});
} else {
return console.error(_t('unauthorized_operation'));
return console.error(_t('app.public.projects_show.unauthorized_operation'));
}
};
@ -577,12 +591,12 @@ Application.Controllers.controller('ShowProjectController', ['$scope', '$state',
{ abuse: $scope.signaler },
function (res) {
// creation successful
growl.success(_t('your_report_was_successful_thanks'));
growl.success(_t('app.public.projects_show.your_report_was_successful_thanks'));
return $uibModalInstance.close(res);
}
, function (error) {
// creation failed...
growl.error(_t('an_error_occured_while_sending_your_report'));
growl.error(_t('app.public.projects_show.an_error_occured_while_sending_your_report'));
}
);
};

View File

@ -10,16 +10,16 @@
<input name="_method" type="hidden" ng-value="method">
<div class="form-group" ng-class="{'has-error': projectForm['project[name]'].$dirty && projectForm['project[name]'].$invalid}">
<label for="name" class="col-sm-2 control-label">{{ 'name' | translate }} *</label>
<label for="name" class="col-sm-2 control-label">{{ 'app.shared.project.name' | translate }} *</label>
<div class="col-sm-8">
<input ng-model="project.name" type="text" name="project[name]" class="form-control" id="project_name" placeholder="" required>
<span class="help-block" ng-show="projectForm['project[name]'].$dirty && projectForm['project[name]'].$error.required" translate>{{ 'name_is_required' }}</span>
<span class="help-block" ng-show="projectForm['project[name]'].$dirty && projectForm['project[name]'].$error.required" translate>{{ 'app.shared.project.name_is_required' }}</span>
</div>
</div>
<div class="form-group">
<label for="project_image" class="col-sm-2 control-label" translate>{{ 'illustration' }}</label>
<label for="project_image" class="col-sm-2 control-label" translate>{{ 'app.shared.project.illustration' }}</label>
<div class="col-sm-10">
<div class="fileinput" data-provides="fileinput" ng-class="fileinputClass(project.project_image)">
<div class="fileinput-new thumbnail" style="width: 334px; height: 250px;">
@ -29,9 +29,9 @@
<img ng-src="{{ project.project_image }}" alt="" />
</div>
<div>
<span class="btn btn-default btn-file"><span class="fileinput-new">{{ 'add_an_illustration' | translate }} <i class="fa fa-upload fa-fw"></i></span><span class="fileinput-exists" translate>{{ 'change' }}</span>
<span class="btn btn-default btn-file"><span class="fileinput-new">{{ 'app.shared.project.add_an_illustration' | translate }} <i class="fa fa-upload fa-fw"></i></span><span class="fileinput-exists" translate>{{ 'app.shared.buttons.change' }}</span>
<input type="file" name="project[project_image_attributes][attachment]"></span>
<a class="btn btn-danger fileinput-exists" data-dismiss="fileinput" translate>{{ 'delete' }}</a>
<a class="btn btn-danger fileinput-exists" data-dismiss="fileinput" translate>{{ 'app.shared.buttons.delete' }}</a>
</div>
</div>
</div>
@ -39,7 +39,7 @@
<div class="form-group">
<label class="col-sm-2 control-label" translate>{{ 'CAD_file' }}</label>
<label class="col-sm-2 control-label" translate>{{ 'app.shared.project.CAD_file' }}</label>
<div class="col-sm-10">
<div ng-repeat="file in project.project_caos_attributes" ng-show="!file._destroy">
<div class="col-md-11 m-l-n">
@ -50,40 +50,40 @@
<div class="form-control" data-trigger="fileinput">
<i class="glyphicon glyphicon-file fileinput-exists"></i> <span class="fileinput-filename">{{file.attachment}}</span>
</div>
<span class="input-group-addon btn btn-default btn-file"><span class="fileinput-new" translate>{{ 'browse' }}</span>
<span class="fileinput-exists" translate>{{ 'change' }}</span><input type="file" name="project[project_caos_attributes][][attachment]"></span>
<span class="input-group-addon btn btn-default btn-file"><span class="fileinput-new" translate>{{ 'app.shared.buttons.browse' }}</span>
<span class="fileinput-exists" translate>{{ 'app.shared.buttons.change' }}</span><input type="file" name="project[project_caos_attributes][][attachment]"></span>
<a class="input-group-addon btn btn-danger fileinput-exists" data-dismiss="fileinput" ng-click="deleteFile(file)"><i class="fa fa-trash-o"></i></a>
</div>
</div>
<div class="col-md-1 m-t-xs">
<i class="fa fa-info-circle" aria-hidden="true" uib-tooltip="{{ 'allowed_extensions' | translate }} {{allowedExtensions.join(', ')}}" tooltip-placement="bottom" tooltip-class="media-lg"></i>
<i class="fa fa-info-circle" aria-hidden="true" uib-tooltip="{{ 'app.shared.project.allowed_extensions' | translate }} {{allowedExtensions.join(', ')}}" tooltip-placement="bottom" tooltip-class="media-lg"></i>
</div>
</div>
<a class="btn btn-default" ng-click="addFile()" role="button">{{ 'add_a_new_file' | translate }} <i class="fa fa-file-o fa-fw"></i></a>
<a class="btn btn-default" ng-click="addFile()" role="button">{{ 'app.shared.project.add_a_new_file' | translate }} <i class="fa fa-file-o fa-fw"></i></a>
</div>
</div>
<div class="form-group" ng-class="{'has-error': projectForm['project[description]'].$dirty && projectForm['project[description]'].$invalid}">
<label for="description" class="col-sm-2 control-label">{{ 'description' | translate }} *</label>
<label for="description" class="col-sm-2 control-label">{{ 'app.shared.project.description' | translate }} *</label>
<div class="col-sm-10">
<input type="hidden" name="project[description]" ng-value="project.description" />
<summernote ng-model="project.description" id="project_description" placeholder="" config="summernoteOpts" name="project[description]" required></summernote>
<span class="help-block" ng-show="projectForm['project[description]'].$dirty && projectForm['project[description]'].$error.required" translate>{{ 'description_is_required' }}</span>
<span class="help-block" ng-show="projectForm['project[description]'].$dirty && projectForm['project[description]'].$error.required" translate>{{ 'app.shared.project.description_is_required' }}</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" translate>{{ 'steps' }}</label>
<label class="col-sm-2 control-label" translate>{{ 'app.shared.project.steps' }}</label>
<div class="col-sm-10">
<div ng-repeat="step in project.project_steps_attributes | orderBy:'step_nb'" ng-hide="step._destroy">
<div class="m-t-xs m-b-lg">
<div class="btn-group" uib-dropdown is-open="status.isopen">
<button id="single-button" type="button" class="btn btn-warning" uib-dropdown-toggle>
{{ 'step_N' | translate:{ INDEX:step.step_nb } }}/{{totalSteps}} <i class="fa fa-caret-down" aria-hidden="true"></i>
{{ 'app.shared.project.step_N' | translate:{ INDEX:step.step_nb } }}/{{totalSteps}} <i class="fa fa-caret-down" aria-hidden="true"></i>
</button>
<ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">
<li role="menuitem" ng-repeat="step_idx in intArray(1, totalSteps +1)"><a href="#" ng-click="changeStepIndex($event, step, step_idx)">{{ 'step_N' | translate:{ INDEX:step_idx } }}</a></li>
<li role="menuitem" ng-repeat="step_idx in intArray(1, totalSteps +1)"><a href="#" ng-click="changeStepIndex($event, step, step_idx)">{{ 'app.shared.project.step_N' | translate:{ INDEX:step_idx } }}</a></li>
</ul>
</div>
<span class="label label-warning m-t m-b"></span>
@ -94,7 +94,7 @@
type="text"
name="project[project_steps_attributes][][title]"
class="form-control m-b-sm m-t-xs"
placeholder="{{ 'step_title' | translate }}"
placeholder="{{ 'app.shared.project.step_title' | translate }}"
required>
<input type="hidden" name="project[project_steps_attributes][][description]" ng-value="step.description" />
@ -114,25 +114,25 @@
<img ng-src="{{ image.attachment_url }}" alt="{{image.attachment}}" />
</div>
<div>
<span class="btn btn-default btn-file"><span class="fileinput-new">{{ 'browse' | translate }} <i class="fa fa-upload fa-fw"></i></span><span class="fileinput-exists" translate>{{ 'change' }}</span>
<span class="btn btn-default btn-file"><span class="fileinput-new">{{ 'app.shared.buttons.browse' | translate }} <i class="fa fa-upload fa-fw"></i></span><span class="fileinput-exists" translate>{{ 'app.shared.buttons.change' }}</span>
<input type="file" name="project[project_steps_attributes][][project_step_images_attributes][][attachment]"></span>
<a class="btn btn-danger fileinput-exists" data-dismiss="fileinput" ng-click="deleteProjectStepImage(step, image)" translate>{{ 'delete' }}</a>
<a class="btn btn-danger fileinput-exists" data-dismiss="fileinput" ng-click="deleteProjectStepImage(step, image)" translate>{{ 'app.shared.buttons.delete' }}</a>
</div>
</div>
</div>
</div>
<div>
<a class="btn btn-default" ng-click="addProjectStepImage(step)" role="button">{{ 'add_a_picture' | translate }} <i class="fa fa-file-o fa-fw"></i></a>
<a class="btn btn-default" ng-click="addProjectStepImage(step)" role="button">{{ 'app.shared.project.add_a_picture' | translate }} <i class="fa fa-file-o fa-fw"></i></a>
</div>
<div class="m-t">
<a class="btn btn-sm btn-danger" ng-click="deleteStep(step)" role="button"><i class="fa fa-trash-o m-r-xs"></i> {{ 'delete_the_step' | translate }}</a>
<a class="btn btn-sm btn-danger" ng-click="deleteStep(step)" role="button"><i class="fa fa-trash-o m-r-xs"></i> {{ 'app.shared.project.delete_the_step' | translate }}</a>
</div>
</div>
</div>
<a class="btn btn-default m-b" ng-click="addStep()" role="button">
<i class="fa fa-plus m-r-sm" aria-hidden="true"></i>
<span translate>{{ 'add_a_new_step' }}</span></a>
<span translate>{{ 'app.shared.project.add_a_new_step' }}</span></a>
</div>
</div>
@ -141,11 +141,11 @@
</div> <!-- ./panel-body -->
<div class="panel-footer no-padder">
<div ng-show="project.state != 'published'">
<div class="btn btn-lg btn-block btn-valid btn-success text-u-c r-n" publish-project ng-disabled="projectForm.$invalid" translate>{{ 'publish_your_project' }}</div>
<div class="text-center font-bold text-u-c" translate>{{ 'or' }}</div>
<div class="btn btn-lg btn-block btn-valid btn-success text-u-c r-n" publish-project ng-disabled="projectForm.$invalid" translate>{{ 'app.shared.project.publish_your_project' }}</div>
<div class="text-center font-bold text-u-c" translate>{{ 'app.shared.project.or' }}</div>
</div>
<input type="submit"
ng-value="'save_button_value' | translate"
ng-value="saveButtonValue()"
class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c"
ng-disabled="projectForm.$invalid"/>
</div>
@ -158,7 +158,7 @@
<div class="widget panel b-a m m-t-lg">
<div class="panel-heading b-b small">
<h3 translate>{{ 'employed_materials' }}</h3>
<h3 translate>{{ 'app.shared.project.employed_materials' }}</h3>
</div>
<div class="widget-content no-bg wrapper">
<input type="hidden" name="project[component_ids][]" value="" />
@ -176,7 +176,7 @@
<div class="widget panel b-a m m-t-lg">
<div class="panel-heading b-b small">
<h3 translate>{{ 'employed_machines' }}</h3>
<h3 translate>{{ 'app.shared.project.employed_machines' }}</h3>
</div>
<div class="widget-content no-bg wrapper">
<input type="hidden" name="project[machine_ids][]" value="" />
@ -194,7 +194,7 @@
<div class="widget panel b-a m m-t-lg">
<div class="panel-heading b-b small">
<h3 translate>{{ 'collaborators' }}</h3>
<h3 translate>{{ 'app.shared.project.collaborators' }}</h3>
</div>
<div class="widget-content no-bg wrapper">
<input type="hidden" name="project[user_ids][]" value="" />
@ -212,7 +212,7 @@
<div class="widget panel b-a m m-t-lg">
<div class="panel-heading b-b small">
<h3 translate>{{ 'creative_commons_licences' }}</h3>
<h3 translate>{{ 'app.shared.project.creative_commons_licences' }}</h3>
</div>
<div class="widget-content no-bg wrapper">
<%# TODO: be able to remove the selected option %>
@ -230,7 +230,7 @@
<div class="widget panel b-a m m-t-lg">
<div class="panel-heading b-b small">
<h3 translate>{{ 'themes' }}</h3>
<h3 translate>{{ 'app.shared.project.themes' }}</h3>
</div>
<div class="widget-content no-bg wrapper">
<input type="hidden" name="project[theme_ids][]" value="" />
@ -248,7 +248,7 @@
<div class="widget panel b-a m m-t-lg">
<div class="panel-heading b-b small">
<h3 translate>{{ 'tags' }}</h3>
<h3 translate>{{ 'app.shared.project.tags' }}</h3>
</div>
<div class="widget-content no-bg wrapper">
<textarea ng-model="project.tags" class="form-control" id="project_tags" placeholder="" name="project[tags]"></textarea>

View File

@ -12,16 +12,16 @@
</div>
<div class="col-xs-10 col-sm-10 col-md-7 b-l b-r-md">
<section class="heading-title">
<h1>{{ 'edit_the_project' | translate }} <span class="badge" ng-if="project.state == 'draft'" translate>{{ 'rough_draft' }}</span></h1>
<h1>{{ 'app.logged.projects_edit.edit_the_project' | translate }} <span class="badge" ng-if="project.state == 'draft'" translate>{{ 'app.logged.projects_edit.rough_draft' }}</span></h1>
</section>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 b-t hide-b-md">
<section class="heading-actions wrapper">
<input type="submit" ng-value="'save_button_value' | translate" class="btn btn-lg btn-warning m-t-xs text-u-c"
<input type="submit" ng-value="saveButtonValue()" class="btn btn-lg btn-warning m-t-xs text-u-c"
ng-disabled="projectForm.$invalid"/>
<div class="btn btn-lg btn-valid btn-success m-t-xs text-u-c" publish-project ng-if="project.state == 'draft'" ng-disabled="projectForm.$invalid" translate>{{ 'publish' }}</div>
<div class="btn btn-lg btn-valid btn-success m-t-xs text-u-c" publish-project ng-if="project.state == 'draft'" ng-disabled="projectForm.$invalid" translate>{{ 'app.logged.projects_edit.publish' }}</div>
</section>
</div>
</div>
@ -29,7 +29,7 @@
<ng-include src="'<%= asset_path 'projects/_form.html' %>'"></ng-include>
<ng-include src="'<%= asset_path "projects/_form.html" %>'"></ng-include>
</form>

View File

@ -50,7 +50,7 @@
</div>
</form>
</div>
<span ng-if="!openlab.searchOverWholeNetwork">
<div class="inline" ng-if="!openlab.searchOverWholeNetwork">
<div class="col-md-3 m-b" ng-show="isAuthenticated()">
<select ng-model="search.from" ng-change="setUrlQueryParams(search) && triggerSearch()" class="form-control">
<option value="" translate>{{ 'app.public.projects_list.all_projects' }}</option>
@ -76,7 +76,7 @@
<option value="" translate>{{ 'app.public.projects_list.all_materials' }}</option>
</select>
</div>
</span>
</div>
</div>
@ -105,7 +105,7 @@
<div class="card-overlay">
<div class="btn-group">
<div class="btn btn-default" ng-click="showProject(project)">
<i ng-class="{'fa fa-external-link' : (openlab.searchOverWholeNetwork && project.app_id != openlabAppId) }"></i> {{ 'consult' | translate }}
<i ng-class="{'fa fa-external-link' : (openlab.searchOverWholeNetwork && project.app_id != openlabAppId) }"></i> {{ 'app.shared.buttons.consult' | translate }}
</div>
<div class="btn btn-default" ui-sref="app.logged.projects_edit({id:project.id})" ng-if="isAuthorized('admin') && !openlab.searchOverWholeNetwork">
<i class="fa fa-edit"></i>

View File

@ -9,7 +9,7 @@
</div>
<div class="col-xs-10 col-sm-10 col-md-8 b-l ">
<section class="heading-title">
<h1 translate>{{ 'add_a_new_project' }}</h1>
<h1 translate>{{ 'app.logged.projects_new.add_a_new_project' }}</h1>
</section>
</div>
</div>
@ -18,7 +18,7 @@
<form role="form" name="projectForm" class="form-horizontal" novalidate action="{{ actionUrl }}" ng-upload="submited(content)" upload-options-enable-rails-csrf="true" unsaved-warning-form>
<ng-include src="'<%= asset_path 'projects/_form.html' %>'"></ng-include>
<ng-include src="'<%= asset_path "projects/_form.html" %>'"></ng-include>
</form>

View File

@ -9,14 +9,14 @@
</div>
<div class="col-xs-10 col-sm-10 col-md-8 b-l b-r-md">
<section class="heading-title">
<h1>{{ project.name }} <span class="badge" ng-if="project.state == 'draft'" translate>{{ 'rough_draft' }}</span></h1>
<h1>{{ project.name }} <span class="badge" ng-if="project.state == 'draft'" translate>{{ 'app.public.projects_show.rough_draft' }}</span></h1>
</section>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 b-t hide-b-md">
<section class="heading-actions wrapper">
<a ui-sref="app.logged.projects_edit({id: project.id})" ng-if="projectEditableBy(currentUser) || isAuthorized('admin')" class="btn btn-lg btn-warning bg-white b-2x rounded m-t-xs text-u-c text-sm"><i class="fa fa-edit"></i> {{ 'edit' | translate }}</a>
<a ui-sref="app.logged.projects_edit({id: project.id})" ng-if="projectEditableBy(currentUser) || isAuthorized('admin')" class="btn btn-lg btn-warning bg-white b-2x rounded m-t-xs text-u-c text-sm"><i class="fa fa-edit"></i> {{ 'app.shared.buttons.edit' | translate }}</a>
<a ng-click="deleteProject(event)" ng-if="projectDeletableBy(currentUser) || isAuthorized('admin')" class="btn btn-lg btn-danger b-2x rounded no-b m-t-xs"><i class="fa fa-trash-o"></i></a>
</section>
@ -34,13 +34,13 @@
<a href="{{project.project_full_image}}" target="_blank"><img ng-src="{{project.project_image}}" alt="{{project.name}}"></a>
</div>
<h3 translate>{{ 'project_description' }}</h3>
<h3 translate>{{ 'app.public.projects_show.project_description' }}</h3>
<p ng-bind-html="project.description | toTrusted"></p>
<div class="article-steps">
<div class="row article-step m-b-lg" ng-repeat="step in project.project_steps_attributes">
<div class="col-md-12 m-b-xs">
<h3 class="well well-simple step-title">{{ 'step_N' | translate:{INDEX:step.step_nb} }} : {{step.title}}</h3>
<h3 class="well well-simple step-title">{{ 'app.public.projects_show.step_N' | translate:{INDEX:step.step_nb} }} : {{step.title}}</h3>
</div>
<div ng-repeat-start="image in step.project_step_images_attributes" class="clearfix" ng-if="$index % 3 == 0"></div>
<div class="col-md-4" ng-repeat-end>
@ -58,8 +58,8 @@
</div>
<div class="text-center" id="social-share">
<a ng-href="{{shareOnFacebook()}}" target="_blank" class="btn btn-facebook btn-lg m-t"><i class="fa fa-facebook m-r"></i> {{ 'share_on_facebook' | translate }}</a>
<a ng-href="{{shareOnTwitter()}}" target="_blank" class="btn btn-twitter btn-lg m-t"><i class="fa fa-twitter m-r"></i> {{ 'share_on_twitter' | translate }}</a>
<a ng-href="{{shareOnFacebook()}}" target="_blank" class="btn btn-facebook btn-lg m-t"><i class="fa fa-facebook m-r"></i> {{ 'app.public.projects_show.share_on_facebook' | translate }}</a>
<a ng-href="{{shareOnTwitter()}}" target="_blank" class="btn btn-twitter btn-lg m-t"><i class="fa fa-twitter m-r"></i> {{ 'app.public.projects_show.share_on_twitter' | translate }}</a>
</div>
<div class="wrapper-lg">
@ -78,11 +78,11 @@
</div>
<div>
<a ng-show="project.author_id" class="text-sm font-sbold" ui-sref="app.logged.members_show({id: project.author.slug})">
<i> {{ 'by_name' | translate:{NAME:project.author.first_name} }}</i>
<i> {{ 'app.public.projects_show.by_name' | translate:{NAME:project.author.first_name} }}</i>
</a>
<span ng-hide="project.author_id" class="text-sm font-sbold text-gray" translate>{{ 'deleted_user' }}</span>
<span ng-hide="project.author_id" class="text-sm font-sbold text-gray" translate>{{ 'app.public.projects_show.deleted_user' }}</span>
</div>
<small class="text-xs m-b"><i>{{ 'posted_on_' | translate }} {{project.created_at | amDateFormat: 'LL'}}</i></small>
<small class="text-xs m-b"><i>{{ 'app.public.projects_show.posted_on_' | translate }} {{project.created_at | amDateFormat: 'LL'}}</i></small>
</div>
@ -90,7 +90,7 @@
<section class="widget panel b-a m" ng-if="project.project_caos_attributes">
<div class="panel-heading b-b">
<span class="badge bg-warning pull-right">{{project.project_caos_attributes.length}}</span>
<h3 translate translate-values="{COUNT:project.project_caos_attributes.length}">{{ 'CAD_file_to_download' }}</h3>
<h3 translate translate-values="{COUNT:project.project_caos_attributes.length}">{{ 'app.public.projects_show.CAD_file_to_download' }}</h3>
</div>
<ul class="widget-content list-group list-group-lg no-bg auto">
@ -103,7 +103,7 @@
<section class="widget panel b-a m" ng-if="project.machines">
<div class="panel-heading b-b">
<span class="badge bg-warning pull-right">{{project.machines.length}}</span>
<h3 translate>{{ 'machines_and_materials' }}</h3>
<h3 translate>{{ 'app.public.projects_show.machines_and_materials' }}</h3>
</div>
<ul class="widget-content list-group list-group-lg no-bg auto">
@ -122,7 +122,7 @@
<section class="widget panel b-a m" ng-if="project.project_users.length > 0">
<div class="panel-heading b-b">
<span class="badge bg-warning pull-right">{{project.project_users.length}}</span>
<h3 translate>{{ 'collaborators' }}</h3>
<h3 translate>{{ 'app.public.projects_show.collaborators' }}</h3>
</div>
<ul class="widget-content list-group list-group-lg no-bg auto">
@ -143,7 +143,7 @@
<section class="widget panel b-a m" ng-if="project.licence">
<div class="panel-heading b-b">
<h3 translate>{{ 'licence' }}</h3>
<h3 translate>{{ 'app.public.projects_show.licence' }}</h3>
</div>
<div class="panel-body">
{{ project.licence.name }}
@ -153,7 +153,7 @@
<section class="widget b-t">
<div class="widget-content text-center m-t">
<a href="#" ng-click="signalAbuse($event)"><i class="fa fa-warning"></i> {{ 'report_an_abuse' | translate }}</a>
<a href="#" ng-click="signalAbuse($event)"><i class="fa fa-warning"></i> {{ 'app.public.projects_show.report_an_abuse' | translate }}</a>
</div>
</section>
</div>

View File

@ -1,19 +1,19 @@
<div class="modal-header">
<img ng-src="{{logoBlack.custom_asset_file_attributes.attachment_url}}" alt="{{logo.custom_asset_file_attributes.attachment}}" class="modal-logo"/>
<h1 translate>{{ 'report_an_abuse' }}</h1>
<h1 translate>{{ 'app.public.projects_show.report_an_abuse' }}</h1>
</div>
<div class="modal-body">
<form role="form" name="signalForm" class="form-horizontal" novalidate autocomplete="off" ng-keydown="signupForm.$valid && $event.which == 13 && ok()">
<div class="form-group">
<div class="col-sm-6" ng-class="{'has-error': signalForm.first_name.$dirty && signalForm.first_name.$invalid}">
<input type="text" name="first_name" ng-model="signaler.first_name" class="form-control" placeholder="{{ 'your_first_name' | translate }}" required>
<span class="help-block" ng-show="signalForm.first_name.$dirty && signalForm.first_name.$error.required" translate>{{ 'your_first_name_is_required' }}</span>
<input type="text" name="first_name" ng-model="signaler.first_name" class="form-control" placeholder="{{ 'app.public.projects_show.your_first_name' | translate }}" required>
<span class="help-block" ng-show="signalForm.first_name.$dirty && signalForm.first_name.$error.required" translate>{{ 'app.public.projects_show.your_first_name_is_required' }}</span>
</div>
<div class="m-b visible-xs"></div>
<div class="col-sm-6" ng-class="{'has-error': signalForm.last_name.$dirty && signalForm.last_name.$invalid}">
<input type="text" name="last_name" ng-model="signaler.last_name" class="form-control" placeholder="{{ 'your_surname' | translate }}" required>
<span class="help-block" ng-show="signalForm.last_name.$dirty && signalForm.last_name.$error.required" translate>{{ 'your_surname_is_required' }}</span>
<input type="text" name="last_name" ng-model="signaler.last_name" class="form-control" placeholder="{{ 'app.public.projects_show.your_surname' | translate }}" required>
<span class="help-block" ng-show="signalForm.last_name.$dirty && signalForm.last_name.$error.required" translate>{{ 'app.public.projects_show.your_surname_is_required' }}</span>
</div>
</div>
@ -21,21 +21,21 @@
<div class="col-sm-12">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
<input type="email" name="email" ng-model="signaler.email" class="form-control" placeholder="{{ 'your_email_address' | translate }}" required>
<input type="email" name="email" ng-model="signaler.email" class="form-control" placeholder="{{ 'app.public.projects_show.your_email_address' | translate }}" required>
</div>
<span class="help-block" ng-show="signalForm.email.$dirty && signalForm.email.$error.required" translate>{{ 'your_email_address_is_required' }}</span>
<span class="help-block" ng-show="signalForm.email.$dirty && signalForm.email.$error.required" translate>{{ 'app.public.projects_show.your_email_address_is_required' }}</span>
</div>
</div>
<div class="form-group" ng-class="{'has-error': signalForm.message.$dirty && signalForm.message.$invalid}">
<div class="col-sm-12">
<textarea ng-model="signaler.message" rows="10" class="form-control" id="message" placeholder="{{ 'tell_us_why_this_looks_abusive' | translate }}" name="message" required></textarea>
<span class="help-block" ng-show="signalForm.message.$dirty && signalForm.message.$error.required" translate>{{ 'message_is_required' }}</span>
<textarea ng-model="signaler.message" rows="10" class="form-control" id="message" placeholder="{{ 'app.public.projects_show.tell_us_why_this_looks_abusive' | translate }}" name="message" required></textarea>
<span class="help-block" ng-show="signalForm.message.$dirty && signalForm.message.$error.required" translate>{{ 'app.public.projects_show.message_is_required' }}</span>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-info" ng-click="ok()" ng-disabled="signalForm.$invalid" translate>{{ 'report' }}</button>
<button class="btn btn-default" ng-click="cancel()" translate>{{ 'cancel' }}</button>
<button class="btn btn-info" ng-click="ok()" ng-disabled="signalForm.$invalid" translate>{{ 'app.public.projects_show.report' }}</button>
<button class="btn btn-default" ng-click="cancel()" translate>{{ 'app.shared.buttons.cancel' }}</button>
</div>

View File

@ -130,12 +130,11 @@ fr:
projects_new:
# ajouter un nouveau projet
add_a_new_project: "Ajouter un nouveau projet"
save_button_value: "Enregistrer comme brouillon" # "save as draft"
projects_edit:
# modifier un projet existant
save_button_value: "Enregistrer" # "save"
edit_the_project: "Éditer le projet"
rough_draft: "Brouillon"
publish: "Publier"
machines_reserve:

View File

@ -179,12 +179,19 @@ fr:
projects_show:
# détails d'un projet
rough_draft: "Brouillon"
project_description: "Description du projet"
by_name: "Par {NAME}"
step_N: "Étape {INDEX}"
share_on_facebook: "Partager sur Facebook"
share_on_twitter: "Partager sur Twitter"
deleted_user: "Utilisateur supprimé"
posted_on_: "posté le"
CAD_file_to_download: "{COUNT, plural, =0{Aucun fichier CAO} =1{Fichier CAO à télécharger} other{Fichiers CAO à télécharger}}"
machines_and_materials: "Machines et matériaux"
collaborators: "Les collaborateurs"
licence: "Licence"
confirmation_required: "Confirmation requise"
report_an_abuse: "Signaler un abus"
unauthorized_operation: "Opération non autorisée"
your_report_was_successful_thanks: "Votre signalement a bien été pris en compte, merci."

View File

@ -43,9 +43,6 @@ fr:
_click_on_the_synchronization_button_opposite_: "cliquez sur le bouton de synchronisation ci-contre"
_disconnect_then_reconnect_: "déconnectez-vous puis re-connectez vous"
_for_your_changes_to_take_effect: "pour que les modifications soient prises en compte."
illustration: "Visuel"
add_an_illustration: "Ajouter un visuel"
name_is_required: "Le nom est requis."
all_themes: "Toutes les thématiques"
filter: 'Filtre'
payment_card_error: "Un problème est survenu avec votre carte bancaire :"
@ -98,22 +95,33 @@ fr:
project:
# formulaire d'étition d'un projet
name: "Nom"
name_is_required: "Le nom est requis."
illustration: "Illustration"
add_an_illustration: "Ajouter un visuel"
CAD_file: "Fichier CAO"
allowed_extensions: "Extensions autorisées :"
add_a_new_file: "Ajouter un nouveau fichier"
description: "Description"
description_is_required: "La description est requise."
steps: "Étapes"
step_N: "Étape {INDEX}"
step_title: "Titre de l'étape"
add_a_picture: "Ajouter une image"
change_the_picture: "Modifier l'image"
delete_the_step: "Supprimer l'étape"
confirmation_required: "Confirmation requise"
do_you_really_want_to_delete_this_step: "Êtes-vous sur de vouloir supprimer cette étape ?"
add_a_new_step: "Ajouter une nouvelle étape"
publish_your_project: "Publier votre projet"
or: "ou"
employed_materials: "Matériaux utilisés"
employed_machines: "Machines utilisées"
collaborators: "Les collaborateurs"
creative_commons_licences: "Licences Creative Commons"
themes: "Thématiques"
tags: "Étiquettes"
save_as_draft: "Enregistrer comme brouillon"
machine:
# formulaire d'édition d'une machine