mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
translate step content, change order of words in title
This commit is contained in:
parent
bfe427b85a
commit
6ab5c18174
@ -122,15 +122,21 @@ export class PollService implements Resolve<Poll> {
|
||||
}
|
||||
let keyToTranslate = stepsTitle[kind][(step_current - 1) | 0];
|
||||
|
||||
this.translate.get(keyToTranslate).subscribe(
|
||||
(resp) => {
|
||||
this.titleService.setTitle(environment.appTitle + ' - ' + resp + ' - ' + this.form.value.title);
|
||||
},
|
||||
(err) => {
|
||||
console.error(err);
|
||||
this.toastService.display(err.message);
|
||||
this.translate.getTranslation(this.translate.getBrowserLang()).subscribe((response) => {
|
||||
let step = this.translate.getParsedResult(response, 'nav.step');
|
||||
let on = this.translate.getParsedResult(response, 'nav.on');
|
||||
let no_title = this.translate.getParsedResult(response, 'nav.no_title');
|
||||
let titleText = this.form.value.title ? ' - ' + this.form.value.title : no_title + ' -';
|
||||
let stepTitle = this.translate.getParsedResult(response, keyToTranslate);
|
||||
if (this.step_current == 1) {
|
||||
titleText = stepTitle;
|
||||
}
|
||||
);
|
||||
console.log('a', step, this.translate.getBrowserCultureLang());
|
||||
let fullTitle = `${titleText} ${step} ${this.step_current} ${on} ${this.step_max} - ${environment.appTitle} `;
|
||||
console.log('fullTitle', fullTitle);
|
||||
// ex: Nom de mon sondage - étape 3 sur 7 - Framadate
|
||||
this.titleService.setTitle(fullTitle);
|
||||
});
|
||||
} else {
|
||||
this.titleService.setTitle(apptitle);
|
||||
}
|
||||
|
@ -27,14 +27,6 @@ export class StepOneComponent implements OnInit {
|
||||
) {
|
||||
this.step_max = this.pollService.step_max;
|
||||
this.pollService.step_current = 1;
|
||||
this.titleService.setTitle(
|
||||
' Création de sondage - Étape ' +
|
||||
this.pollService.step_current +
|
||||
' sur ' +
|
||||
this.pollService.step_max +
|
||||
' ' +
|
||||
environment.appTitle
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
@ -28,14 +28,6 @@ export class StepThreeComponent implements OnInit {
|
||||
|
||||
this.pollService.step_current = 3;
|
||||
this.step_max = this.pollService.step_max;
|
||||
this.titleService.setTitle(
|
||||
' Création de sondage - Étape ' +
|
||||
this.pollService.step_current +
|
||||
' sur ' +
|
||||
this.pollService.step_max +
|
||||
' ' +
|
||||
environment.appTitle
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
@ -46,14 +46,6 @@ export class StepTwoComponent implements OnInit {
|
||||
this.form = this.pollService.form;
|
||||
this.pollService.step_current = 2;
|
||||
this.step_max = this.pollService.step_max;
|
||||
this.titleService.setTitle(
|
||||
' Création de sondage - Étape ' +
|
||||
this.pollService.step_current +
|
||||
' sur ' +
|
||||
this.pollService.step_max +
|
||||
' ' +
|
||||
environment.appTitle
|
||||
);
|
||||
}
|
||||
|
||||
get choices(): FormArray {
|
||||
|
@ -17,7 +17,7 @@
|
||||
"previous": "Previous",
|
||||
"next": "Next",
|
||||
"step": "Step",
|
||||
"on": "on",
|
||||
"on": "of",
|
||||
"no_title": "(no title)",
|
||||
"remove": "Remove",
|
||||
"save": "Save"
|
||||
|
Loading…
Reference in New Issue
Block a user