Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: GSGGR-166 add some more translations, fix date format always set to French #85

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {MatDialogRef} from '@angular/material/dialog';
export class ConfirmDialogComponent implements OnInit {

public confirmMessage: string;
public noButtonTitle = 'Non';
public yesButtonTitle = 'Oui';
public noButtonTitle = $localize`Non`;
public yesButtonTitle = $localize`Oui`;

constructor(public dialogRef: MatDialogRef<ConfirmDialogComponent>) {
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/account/new-order/new-order.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- TODO: Create proper layout so navigation buttons will be always in the bottom -->
<mat-horizontal-stepper #stepper [linear]="true">
<mat-step [stepControl]="orderFormGroup" i18n-label label="Détails du mandat">
<form [formGroup]="orderFormGroup">
Expand Down Expand Up @@ -63,7 +64,6 @@
</mat-step>

<mat-step [stepControl]="contactFormGroup" i18n-label label="Facturation / Tiers">

<form class="form-no-full-height" [formGroup]="addressChoiceForm">
<mat-radio-group *ngIf="IsOrderTypePrivate" class="flex-column"
formControlName="addressChoice"
Expand Down
2 changes: 1 addition & 1 deletion src/app/account/new-order/new-order.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

&.form-height-mini {
height: calc(100vh - 64px - 72px - 41px - 24px);
height: calc(100vh - 64px - 72px - 41px - 48px);
}

.mat-mdc-form-field {
Expand Down
2 changes: 1 addition & 1 deletion src/app/account/orders/order/order.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, ComponentFactoryResolver, EventEmitter, Input, OnInit, Output, QueryList, ViewChild, ViewChildren} from '@angular/core';
import {Component, ComponentFactoryResolver, EventEmitter, Inject, Input, LOCALE_ID, OnInit, Output, QueryList, ViewChild, ViewChildren} from '@angular/core';
import {IOrderDowloadLink, IOrderSummary, Order} from '../../../_models/IOrder';
import {IProduct} from '../../../_models/IProduct';
import Map from 'ol/Map';
Expand Down
14 changes: 7 additions & 7 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {BrowserModule} from '@angular/platform-browser';
import { NgModule, APP_INITIALIZER, LOCALE_ID, DEFAULT_CURRENCY_CODE, Inject } from '@angular/core';
import { NgModule, APP_INITIALIZER, DEFAULT_CURRENCY_CODE, Inject } from '@angular/core';
import { registerLocaleData } from '@angular/common';
import localeCH from '@angular/common/locales/fr-CH';
import frCH from '@angular/common/locales/fr-CH';
import deCH from '@angular/common/locales/de-CH';
import enCH from '@angular/common/locales/en-CH';

import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
Expand Down Expand Up @@ -36,7 +38,9 @@ import {CommonModule} from '@angular/common';
import { OidcAuthConfigModule } from './auth/oidc-auth-config.module';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';

registerLocaleData(localeCH);
registerLocaleData(frCH);
registerLocaleData(deCH);
registerLocaleData(enCH);

export function initializeApp(configService: ConfigService, store: Store<AppState>) {
return () => configService.load().then(() => {
Expand Down Expand Up @@ -91,10 +95,6 @@ const MODULES = [
useClass: ErrorInterceptor,
multi: true,
},
{
provide: LOCALE_ID,
useValue: 'fr-CH'
},
{
provide: DEFAULT_CURRENCY_CODE,
useValue: 'CHF'
Expand Down
32 changes: 32 additions & 0 deletions src/locale/messages.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
<trans-unit id="4709450557795328287" datatype="html">
<source>Non</source>
<target>Nein</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/confirm-dialog/confirm-dialog.component.ts</context>
<context context-type="linenumber">12</context>
</context-group>
</trans-unit>
<trans-unit id="7180575964287205441" datatype="html">
<source>Oui</source>
<target>Ja</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/confirm-dialog/confirm-dialog.component.ts</context>
<context context-type="linenumber">13</context>
</context-group>
</trans-unit>
<trans-unit id="confirmation" datatype="html">
<source>Confirmation</source>
<target>Bestätigung</target>
Expand Down Expand Up @@ -582,6 +598,22 @@
<context context-type="linenumber">45</context>
</context-group>
</trans-unit>
<trans-unit id="7079597122499354381" datatype="html">
<source>Acheter maintenant</source>
<target>Jetzt bestellen</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/account/new-order/new-order.component.ts</context>
<context context-type="linenumber">101</context>
</context-group>
</trans-unit>
<trans-unit id="8353026757372386829" datatype="html">
<source>Demander un devis</source>
<target>Kostenvoranschlag anfragen</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/account/new-order/new-order.component.ts</context>
<context context-type="linenumber">102</context>
</context-group>
</trans-unit>
<trans-unit id="order.delete" datatype="html">
<source> Supprimer </source>
<target> Entfernen </target>
Expand Down
14 changes: 14 additions & 0 deletions src/locale/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@
<context context-type="linenumber">1</context>
</context-group>
</trans-unit>
<trans-unit id="4709450557795328287" datatype="html">
<source>Non</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/confirm-dialog/confirm-dialog.component.ts</context>
<context context-type="linenumber">12</context>
</context-group>
</trans-unit>
<trans-unit id="7180575964287205441" datatype="html">
<source>Oui</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/confirm-dialog/confirm-dialog.component.ts</context>
<context context-type="linenumber">13</context>
</context-group>
</trans-unit>
<trans-unit id="help.show" datatype="html">
<source>Voir l&apos;aide</source>
<context-group purpose="location">
Expand Down