mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
text translation on admin success component
This commit is contained in:
parent
920066a4a0
commit
a43c92fa23
@ -16,11 +16,10 @@
|
||||
</strong>
|
||||
»
|
||||
<span *ngIf="!pollService.admin_key">
|
||||
n'a pas été créé :(
|
||||
|
||||
{{ 'success.not_created' | translate }} :(
|
||||
<br />
|
||||
<button class="button is-primary" [routerLink]="['/administration/step/7']">
|
||||
Revenir en arrière
|
||||
{{ 'success.go_back' | translate }}
|
||||
</button>
|
||||
</span>
|
||||
<span *ngIf="pollService.admin_key">
|
||||
@ -29,18 +28,18 @@
|
||||
</h1>
|
||||
<p>
|
||||
L'événement "<strong class="poll-title"> {{ pollService.form.value.title }} </strong>" est créé.
|
||||
Vous pouvez inviter vos contacts à y participer en partageant le lien ci-dessous.
|
||||
{{ 'success.share' | translate }}
|
||||
</p>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<label for="public_share_link">
|
||||
Lien de partage public
|
||||
{{ 'success.link' | translate }}
|
||||
</label>
|
||||
<input type="text" [value]="pollService.getParticipationUrl()" id="public_share_link" />
|
||||
</div>
|
||||
<div class="column">
|
||||
<button class="is-parimary button">
|
||||
Copier
|
||||
<button class="is-parimary button" (click)="copyText(pollService.getParticipationUrl())">
|
||||
{{ 'success.copy' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -49,9 +48,11 @@
|
||||
</div>
|
||||
</section>
|
||||
<div class="box-well">
|
||||
<h3 class="title is-3">Consultez dès maintenant votre sondage</h3>
|
||||
<h3 class="title is-3">
|
||||
{{ 'success.label' | translate }}
|
||||
</h3>
|
||||
<button class="button is-primary" routerLink="{{ pollService.getAdministrationUrlFromForm() }}">
|
||||
Voir mon sondage
|
||||
{{ 'success.action' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
<hr />
|
||||
@ -65,17 +66,13 @@
|
||||
<div class="no-admin-key padded has-background-danger" *ngIf="!pollService.admin_key">
|
||||
Pas de clé d'administration, l'enregistrement du sondage a échoué. vérifiez vos paramètres
|
||||
réseau.
|
||||
{{ 'success.network_error' | translate }}
|
||||
</div>
|
||||
<div class="admin-ok" *ngIf="pollService.admin_key">
|
||||
<h2 class="title is-2">
|
||||
<i class="fa fa-gears"></i>
|
||||
{{ 'resume.admins' | translate }}
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
Voici les liens d’accès au sondage, conservez-les soigneusement ! (Si vous les perdez
|
||||
vous pourrez toujours les recevoir par email)
|
||||
</p>
|
||||
<div>
|
||||
Pour accéder au sondage et à tous ses paramètres :
|
||||
<br />
|
||||
@ -124,7 +121,7 @@
|
||||
</a>
|
||||
</p>
|
||||
<br />
|
||||
<app-copy-text [textToCopy]="pollService.getParticipationUrlFromForm()"></app-copy-text>
|
||||
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,12 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { PollService } from '../../../core/services/poll.service';
|
||||
import { Poll } from '../../../core/models/poll.model';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { DateUtilitiesService } from '../../../core/services/date.utilities.service';
|
||||
import { ClipboardService } from 'ngx-clipboard';
|
||||
import { ToastService } from '../../../core/services/toast.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-success',
|
||||
@ -16,7 +19,15 @@ export class SuccessComponent {
|
||||
window: any = window;
|
||||
environment = environment;
|
||||
today: Date = new Date();
|
||||
constructor(public pollService: PollService, private dateUtils: DateUtilitiesService, private titleService: Title) {
|
||||
|
||||
constructor(
|
||||
public pollService: PollService,
|
||||
private dateUtils: DateUtilitiesService,
|
||||
private _clipboardService: ClipboardService,
|
||||
private toastService: ToastService,
|
||||
private translate: TranslateService,
|
||||
private titleService: Title
|
||||
) {
|
||||
this.titleService.setTitle(
|
||||
environment.appTitle + ' - 🎉 succès de création de sondage - ' + this.pollService.form.value.title
|
||||
);
|
||||
@ -30,7 +41,12 @@ export class SuccessComponent {
|
||||
alert('todo');
|
||||
}
|
||||
|
||||
getExpiracyDateFromPoll(poll: Poll): Date {
|
||||
return this.dateUtils.addDaysToDate(poll.default_expiracy_days_from_now, new Date());
|
||||
/**
|
||||
* copy public url of new poll
|
||||
* @param participationUrl
|
||||
*/
|
||||
copyText(participationUrl: string) {
|
||||
this._clipboardService.copyFromContent(participationUrl);
|
||||
this.toastService.display(this.translate.get('success.copy_message') + ` ${participationUrl}`);
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,8 @@
|
||||
},
|
||||
"success": {
|
||||
"title": "Your poll is ready !",
|
||||
"description": "The event « {{eventTitle}} » is created. Share it with the following public link.",
|
||||
"description": "The event « {{eventTitle}} » is created.",
|
||||
"share": "Share it with the following public link.",
|
||||
"link": "Public link to share",
|
||||
"label": "Check your poll",
|
||||
"action": "See my poll",
|
||||
|
@ -163,13 +163,19 @@
|
||||
},
|
||||
"success": {
|
||||
"title": "Votre sondage est prêt !",
|
||||
"description": "L'événement « {{eventTitle}} » est créé. Vous pouvez inviter vos contacts à y participer en partageant le lien ci-dessous.",
|
||||
"description": "L'événement « {{eventTitle}} » est créé.",
|
||||
"share":"Vous pouvez inviter vos contacts à y participer en partageant le lien ci-dessous.",
|
||||
"link": "Lien de partage public",
|
||||
"label": "Consultez dès maintenant votre sondage",
|
||||
"action": "Voir mon sondage",
|
||||
"admins": "Côté administrateur-ice-eux",
|
||||
"users": "Côté sondés",
|
||||
"links_mail": "Recevoir les liens par e-mail"
|
||||
"links_mail": "Recevoir les liens par e-mail",
|
||||
"not_created": "n'a pas été créé",
|
||||
"network_error": "n'a pas été créé",
|
||||
"go_back": "Revenir en arrière",
|
||||
"copy": "Copier",
|
||||
"copy_message": "Texte copié:",
|
||||
},
|
||||
"visibility": {
|
||||
"top_txt": "Un peu de paramétrage…",
|
||||
|
Loading…
Reference in New Issue
Block a user