Skip to content

Commit

Permalink
Merge pull request #47 from camptocamp/improve_german_language_texts
Browse files Browse the repository at this point in the history
Add more translations and set better application title
  • Loading branch information
lanseg authored Nov 15, 2024
2 parents 39c1f79 + b0fb71b commit f9bd33b
Show file tree
Hide file tree
Showing 8 changed files with 609 additions and 89 deletions.
13 changes: 3 additions & 10 deletions src/app/_components/help-overlay/help-overlay.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@
<span i18n="@@help.show">Voir l'aide</span>
</div>
</a>
<a color="primary" mat-button href="https://rsn.ne.ch/DATA/program/books/rsne/pdf/2154211.pdf" target="_blank">
<div class="flex-row" i18n="@@help.pricing">
Informations sur la tarificatio
</div>
</a>
<a color="primary" mat-button href="https://sitn.ne.ch/geoshop2_media/documents/contrat_sitn.pdf" target="_blank">
<div class="flex-row" i18n="@@help.conditions">
Conditions d'utilisation
</div>
</a>

<!-- TODO: add links to the pricing document -->
<!-- TODO: add links to the usage conditions -->
<hr>
<span class="padding-horizontal-15 questions" i18n>Avez-vous des questions ?</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ul class="padding-vertical-5" *ngIf="order.isAllOrderItemCalculated">
<li class="text-primary" i18n="@@order.fees">Frais de traitement</li>
<li class="text-primary mat-body-strong" i18n="@@order.vat">Total incl. TTC</li>
<li class="mat-small" i8n>Dont TVA 8.1 %</li>
<li class="mat-small" i18n>Dont TVA 8.1 %</li>
</ul>
</td>
</ng-container>
Expand Down
2 changes: 2 additions & 0 deletions src/app/account/new-order/new-order.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<mat-label i18n>Description du mandat</mat-label>
<textarea matInput
formControlName="description"
i18n-placeholder
placeholder="Renseigner une courte description du mandat..."></textarea>
<mat-error *ngIf="orderFormGroup.get('description')?.hasError('required')">{{ REQUIRED }}</mat-error>
</mat-form-field>
Expand All @@ -41,6 +42,7 @@
<!-- Email for delivery -->
<mat-radio-group class="flex-column"
formControlName="emailDeliverChoice"
i18n-aria-label
aria-label="Choisir l'email de livraison">
<mat-radio-button value="1" i18n>Les données seront envoyées à l'adresse email de
l'utilisateur courant: {{(currentUser$|async)?.email}}</mat-radio-button>
Expand Down
4 changes: 2 additions & 2 deletions src/app/account/new-order/new-order.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export class NewOrderComponent implements OnInit, OnDestroy {

get buttonConfirmLabel() {
return this.currentOrder.items.every(x => x.price_status !== 'PENDING') ?
'Acheter maintenant' :
'Demander un devis';
$localize`Acheter maintenant` :
$localize`Demander un devis`;
}

get isOrderHasPendingItem() {
Expand Down
50 changes: 25 additions & 25 deletions src/app/auth/register/register.component.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<mat-card>
<mat-card-header>
<mat-card-title>Inscription au GeoShop</mat-card-title>
<mat-card-subtitle>Une fois soumise, votre inscription sera contrôlée et validée par le SITN</mat-card-subtitle>
<mat-card-title i18n>Inscription au GeoShop</mat-card-title>
<mat-card-subtitle i18n>Une fois soumise, votre inscription sera contrôlée et validée par le SITN</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<mat-horizontal-stepper #stepper [linear]="true" (selectionChange)="setFocusOn($event)">
<mat-step [stepControl]="formCredentials" label="Identifiants">
<mat-step [stepControl]="formCredentials" i18n-label label="Identifiants">
<form [formGroup]="formCredentials" class="flex-column">
<mat-form-field color="primary">
<input #firstInput formControlName="username" autocapitalize="off" autofocus spellcheck="false" required
matInput placeholder="Login">
matInput i18n-placeholder placeholder="Login">
<mat-error *ngIf="username?.hasError('required')">{{ REQUIRED }}</mat-error>
<mat-error *ngIf="username?.hasError('duplicate')">Identifiant déjà pris</mat-error>
<mat-error *ngIf="username?.hasError('duplicate')" i18n>Identifiant déjà pris</mat-error>
</mat-form-field>

<div class="flex-column" formGroupName="passwords">

<mat-form-field color="primary">
<input formControlName="password" autocapitalize="off" autocomplete="off" spellcheck="false" required
matInput placeholder="Mot de passe" type="password">
matInput i18n-placeholder placeholder="Mot de passe" type="password">
<mat-error *ngIf="password?.hasError('required')">{{ REQUIRED }}</mat-error>
</mat-form-field>

<mat-form-field color="primary">
<input formControlName="passwordConfirm" autocapitalize="off" autocomplete="off" spellcheck="false"
required matInput placeholder="Confirmation du mot de passe" type="password">
required matInput i18n-placeholder placeholder="Confirmation du mot de passe" type="password">
<mat-error *ngIf="passwordConfirm?.hasError('required')">{{ REQUIRED }}</mat-error>
</mat-form-field>

<mat-error *ngIf="passwords?.hasError('mismatch')">
<mat-error *ngIf="passwords?.hasError('mismatch')" i18n>
Mot de passe différent
</mat-error>
</div>
Expand All @@ -43,26 +43,26 @@
<form [formGroup]="formContact" class="flex-column">
<mat-form-field color="primary">
<input id="registerInput1" formControlName="firstName" autocapitalize="off" autofocus spellcheck="false"
required matInput placeholder="Prénom">
required matInput i18n-placeholder placeholder="Prénom">
<mat-error *ngIf="firstName?.hasError('required')">{{ REQUIRED }}</mat-error>
</mat-form-field>

<mat-form-field color="primary">
<input formControlName="lastName" autocapitalize="off" autofocus spellcheck="false" required matInput
placeholder="Nom">
i18n-placeholder placeholder="Nom">
<mat-error *ngIf="lastName?.hasError('required')">{{ REQUIRED }}</mat-error>
</mat-form-field>

<mat-form-field color="primary">
<input formControlName="email" autocapitalize="off" autofocus spellcheck="false" required matInput
placeholder="Courriel">
i18n-placeholder placeholder="Courriel">
<mat-error *ngIf="email?.hasError('required')">{{ REQUIRED }}</mat-error>
<mat-error *ngIf="email?.hasError('email')">{{ WRONG_EMAIL }}</mat-error>
</mat-form-field>

<mat-form-field color="primary">
<input formControlName="phone" autocapitalize="off" autofocus spellcheck="false" required matInput
placeholder="Téléphone">
i18n-placeholder placeholder="Téléphone">
<mat-error *ngIf="phone?.hasError('required')">{{ REQUIRED }}</mat-error>
<mat-error *ngIf="phone?.hasError('pattern')">
<ul>{{ WRONG_PHONE }}
Expand All @@ -87,42 +87,42 @@
<form [formGroup]="formAddress" class="flex-column">
<mat-form-field color="accent">
<input id="registerInput2" formControlName="companyName" autocapitalize="off" autofocus spellcheck="false"
matInput placeholder="Nom de l'entreprise">
matInput i18n-placeholder placeholder="Nom de l'entreprise">
<mat-icon matSuffix>business</mat-icon>
</mat-form-field>

<mat-form-field color="primary" *ngIf="companyName?.value?.trim().length">
<input formControlName="ideId" autocapitalize="off" autofocus spellcheck="false" matInput
placeholder="N° IDE">
<mat-error *ngIf="ideId?.hasError('pattern')">Mauvais format du numéro IDE, accepté : CHE-012.345.678
i18n-placeholder placeholder="N° IDE">
<mat-error *ngIf="ideId?.hasError('pattern')" i18n>Mauvais format du numéro IDE, accepté : CHE-012.345.678
</mat-error>
</mat-form-field>

<mat-form-field color="primary">
<input formControlName="street" autocapitalize="off" autofocus spellcheck="false" required matInput
placeholder="Adresse (utilisée pour la facturation)">
i18n-placeholder placeholder="Adresse (utilisée pour la facturation)">
<mat-error *ngIf="street?.hasError('required')">{{ REQUIRED }}</mat-error>
</mat-form-field>

<mat-form-field color="primary">
<input formControlName="street2" autocapitalize="off" autofocus spellcheck="false" matInput
placeholder="Complément d'adresse">
i18n-placeholder placeholder="Complément d'adresse">
</mat-form-field>

<mat-form-field color="primary">
<input formControlName="postcode" autocapitalize="off" autofocus spellcheck="false" required matInput
placeholder="Code postal">
i18n-placeholder placeholder="Code postal">
<mat-error *ngIf="postcode?.hasError('required')">{{ REQUIRED }}</mat-error>
</mat-form-field>

<mat-form-field color="primary">
<input formControlName="city" autocapitalize="off" autofocus spellcheck="false" required matInput
placeholder="Ville">
i18n-placeholder placeholder="Ville">
<mat-error *ngIf="city?.hasError('required')">{{ REQUIRED }}</mat-error>
</mat-form-field>

<mat-form-field color="primary">
<mat-select formControlName="country" placeholder="Pays">
<mat-select formControlName="country" i18n-placeholder placeholder="Pays">
<mat-option [value]="'Suisse'">
Suisse
</mat-option>
Expand All @@ -133,15 +133,15 @@
</mat-form-field>

<mat-form-field color="primary" *ngIf="!companyName?.value?.trim().length">
<mat-label>Date de naissance si adresse hors canton de Neuchâtel</mat-label>
<mat-label i18n>Date de naissance si adresse hors canton de Neuchâtel</mat-label>
<input matInput [matDatepicker]="picker" formControlName="birthDay">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker startView="multi-year" [startAt]="startDate"></mat-datepicker>
</mat-form-field>

<mat-label>
En vous inscrivant sur le géoshop, vous vous soumettez aux conditions générales d'utilisation
<a mat-icon-button aria-label="Ouvrir les conditions générales d'utilisation" color="primary"
<span i18n>En vous inscrivant sur le géoshop, vous vous soumettez aux conditions générales d'utilisation</span>
<a mat-icon-button i18n-aria-label aria-label="Ouvrir les conditions générales d'utilisation" color="primary"
href="https://sitn.ne.ch/geoshop2_media/documents/contrat_sitn.pdf" target="_blank">
<mat-icon>open_in_new</mat-icon>
</a>
Expand All @@ -150,12 +150,12 @@

<div class="bottom-container">
<button color="primary" mat-button matStepperPrevious> {{ PREVIOUS }}</button>
<button mat-button color="warn" (click)="stepper.reset()">Remettre à zéro</button>
<button mat-button color="warn" (click)="stepper.reset()" i18n>Remettre à zéro</button>
<button class="form-login-button" color="primary" mat-button type="submit" (click)="submit()" [disabled]="
formAddress.invalid || formAddress.pristine ||
formContact.invalid || formContact.pristine ||
formCredentials.invalid || formCredentials.pristine
"> Créer
" i18n> Créer
</button>
</div>
</mat-step>
Expand Down
Loading

0 comments on commit f9bd33b

Please sign in to comment.