translate app + add french translation
This commit is contained in:
parent
2981a90f57
commit
c6864c6db6
@ -4,25 +4,30 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid
|
||||
|
||||
$translateProvider.translations('english', {
|
||||
FORM_SUCCESS: 'Form entry successfully submitted!',
|
||||
SUBMIT: 'Submit',
|
||||
REVIEW: 'Review',
|
||||
BACK_TO_FORM: 'Go back to Form',
|
||||
EDIT_FORM: 'Edit this TellForm',
|
||||
CREATE_FORM: 'Create this TellForm',
|
||||
ADVANCEMENT: '{{done}} out of {{total}} answered',
|
||||
CONTINUE_FORM: 'Continue to Form',
|
||||
REQUIRED: 'required',
|
||||
COMPLETING_NEEDED: '{{answers_not_completed}} answer(s) need completing',
|
||||
OPTIONAL: 'optional',
|
||||
ERROR_EMAIL_INVALID: 'Please enter a valid email address',
|
||||
ERROR_NOT_A_NUMBER: 'Please enter valid numbers only',
|
||||
ERROR_URL_INVALID: 'Please a valid url',
|
||||
OK: 'OK',
|
||||
ENTER: 'press ENTER',
|
||||
YES: 'Yes',
|
||||
NO: 'No',
|
||||
NEWLINE: 'press SHIFT+ENTER to create a newline',
|
||||
CONTINUE: 'Continue',
|
||||
LEGAL_ACCEPT: 'I accept',
|
||||
LEGAL_NO_ACCEPT: 'I don’t accept',
|
||||
DELETE: 'Delete',
|
||||
CANCEL: 'Cancel',
|
||||
UPLOAD_FILE: 'Upload your File',
|
||||
SUBMIT: 'Submit'
|
||||
});
|
||||
|
||||
$translateProvider.preferredLanguage('english')
|
||||
|
@ -4,25 +4,30 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid
|
||||
|
||||
$translateProvider.translations('french', {
|
||||
FORM_SUCCESS: 'Votre formulaire a été enregistré!',
|
||||
REVIEW: 'Review',
|
||||
BACK_TO_FORM: 'Retourner au formulaire',
|
||||
EDIT_FORM: 'Éditer le Tellform',
|
||||
CREATE_FORM: 'Créer un TellForm',
|
||||
ADVANCEMENT: '{{done}} complétés sur {{total}}',
|
||||
CONTINUE_FORM: 'Aller au formulaire',
|
||||
REQUIRED: 'obligatoire',
|
||||
COMPLETING_NEEDED: '{{answers_not_completed}} réponse(s) doive(nt) être complétée(s)',
|
||||
OPTIONAL: 'facultatif',
|
||||
ERROR_EMAIL_INVALID: 'Merci de rentrer une adresse mail valide',
|
||||
ERROR_NOT_A_NUMBER: 'Merce de ne rentrer que des nombres',
|
||||
ERROR_URL_INVALID: 'Merci de rentrer une url valide',
|
||||
OK: 'OK',
|
||||
ENTER: 'presser ENTRÉE',
|
||||
YES: 'Oui',
|
||||
NO: 'Non',
|
||||
NEWLINE: 'presser SHIFT+ENTER pour créer une nouvelle ligne',
|
||||
CONTINUE: 'Continuer',
|
||||
LEGAL_ACCEPT: 'J’accepte',
|
||||
LEGAL_NO_ACCEPT: 'Jen n’accepte pas',
|
||||
LEGAL_NO_ACCEPT: 'Je n’accepte pas',
|
||||
DELETE: 'Supprimer',
|
||||
CANCEL: 'Réinitialiser',
|
||||
UPLOAD_FILE: 'Envoyer des fichier',
|
||||
SUBMIT: 'Enregistrer'
|
||||
SUBMIT: 'Enregistrer',
|
||||
UPLOAD_FILE: 'Envoyer un fichier',
|
||||
});
|
||||
|
||||
}]);
|
||||
|
@ -8,7 +8,7 @@ angular.module('forms', [
|
||||
angular.module('NodeForm', [
|
||||
'ui.select', 'cgBusy', 'ngSanitize', 'vButton', 'ngResource',
|
||||
'ui.router', 'ui.bootstrap', 'ui.utils', 'ngRaven', 'forms',
|
||||
'ui.select'
|
||||
'ui.select'
|
||||
]);
|
||||
|
||||
angular.module('forms').factory('Auth', [
|
||||
|
File diff suppressed because one or more lines are too long
@ -19,9 +19,12 @@ angular.module('forms').directive('submitFormDirective',
|
||||
}
|
||||
return true;
|
||||
}).length;
|
||||
|
||||
var nb_valid = $filter('formValidity')($scope.myform);
|
||||
$scope.translateAdvancementData = {
|
||||
done: $filter('formValidity')($scope.myform),
|
||||
total: form_fields_count
|
||||
done: nb_valid,
|
||||
total: form_fields_count,
|
||||
answers_not_completed: form_fields_count - nb_valid
|
||||
};
|
||||
|
||||
$scope.reloadForm = function(){
|
||||
@ -105,9 +108,11 @@ angular.module('forms').directive('submitFormDirective',
|
||||
$scope.selected._id = field_id;
|
||||
$scope.selected.index = field_index;
|
||||
|
||||
var nb_valid = $filter('formValidity')($scope.myform);
|
||||
$scope.translateAdvancementData = {
|
||||
done: $filter('formValidity')($scope.myform),
|
||||
total: form_fields_count
|
||||
done: nb_valid,
|
||||
total: form_fields_count,
|
||||
answers_not_completed: form_fields_count - nb_valid
|
||||
};
|
||||
|
||||
if(animateScroll){
|
||||
|
@ -29,7 +29,7 @@
|
||||
<div class="letter" style="float:left">
|
||||
Y
|
||||
</div>
|
||||
<span> {{ 'LEGAL_ACCEPT' | translate }} </span>
|
||||
<span>{{ 'LEGAL_ACCEPT' | translate }}</span>
|
||||
</label>
|
||||
<label class="btn col-md-5 col-md-offset-1 col-xs-12"
|
||||
ng-class="{activeBtn: field.fieldValue == 'false'}">
|
||||
@ -44,7 +44,7 @@
|
||||
<div class="letter" style="float:left">
|
||||
N
|
||||
</div>
|
||||
<span>{{ 'LEGAL_NO_ACCEPT' | translate }} </span>
|
||||
<span>{{ 'LEGAL_NO_ACCEPT' | translate }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
|
||||
</small>
|
||||
{{field.title}}
|
||||
<span class="required-error" ng-show="!field.required">optional</span>
|
||||
<span class="required-error" ng-show="!field.required">{{ 'OPTIONAL' | translate }}</span>
|
||||
</h3>
|
||||
<small>press SHIFT+ENTER to create a newline</small>
|
||||
<small>{{ 'NEWLINE' | translate }}</small>
|
||||
</div>
|
||||
<div class="col-xs-12 field-input">
|
||||
<textarea class="textarea focusOn" type="text"
|
||||
|
@ -34,7 +34,7 @@
|
||||
<div class="letter">
|
||||
Y
|
||||
</div>
|
||||
<span>Yes</span>
|
||||
<span>{{ 'YES' | translate }}</span>
|
||||
<i ng-show="field.fieldValue === 'true'" class="fa fa-check" aria-hidden="true"></i>
|
||||
</label>
|
||||
</div>
|
||||
@ -55,7 +55,7 @@
|
||||
<div class="letter">
|
||||
N
|
||||
</div>
|
||||
<span>No</span>
|
||||
<span>{{ 'NO' | translate }}</span>
|
||||
<i ng-show="field.fieldValue === 'false'" class="fa fa-check" aria-hidden="true"></i>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -70,6 +70,7 @@ ng-style="{'color':button.color}">
|
||||
<div class="col-xs-12 text-left"
|
||||
style="background-color:#990000; color:white;"
|
||||
ng-if="forms.myForm.$invalid">
|
||||
{{ 'COMPLETING_NEEDED' | translate:translateAdvancementData }}
|
||||
{{form_fields_count - (myform | formValidity)}} answer(s) need completing
|
||||
</div>
|
||||
|
||||
@ -88,7 +89,7 @@ ng-style="{'color':button.color}">
|
||||
class="Button btn col-sm-2 col-xs-8"
|
||||
ng-click="goToInvalid()"
|
||||
style="font-size: 1.6em; margin-left: 1em; margin-top: 1em; background-color:#990000; color:white">
|
||||
Review
|
||||
{{ 'REVIEW' | translate }}
|
||||
</button>
|
||||
|
||||
<div class="col-sm-2 hidden-xs" style="font-size: 75%; margin-top:3.25em">
|
||||
|
Loading…
Reference in New Issue
Block a user