Skip to content

Add locale #2

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

Merged
merged 3 commits into from
Oct 13, 2022
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
15 changes: 15 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
"skipTests": true
}
},
"i18n": {
"sourceLocale": "fr-FR",
"locales": {
"en": {
"translation": "src/locales/messages.en-US.xlf",
"baseHref": "/en/"
}
}
},
"root": "",
"sourceRoot": "src",
"prefix": "admin",
Expand Down Expand Up @@ -66,6 +75,9 @@
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
},
"en": {
"localize": ["en"]
}
},
"defaultConfiguration": "production"
Expand All @@ -78,6 +90,9 @@
},
"development": {
"browserTarget": "admin-cpanel:build:development"
},
"en": {
"browserTarget": "admin-cpanel:build:development,en"
}
},
"defaultConfiguration": "development"
Expand Down
199 changes: 177 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"start:en": "ng serve --configuration=en -- --port 4201",
"extract": "ng extract-i18n --output-path src/locales",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
Expand Down Expand Up @@ -46,6 +48,7 @@
"@angular-eslint/template-parser": "13.5.0",
"@angular/cli": "~13.3.5",
"@angular/compiler-cli": "~13.3.0",
"@angular/localize": "^13.3.11",
"@ngx-env/builder": "^2.2.0",
"@schematics/angular": "^14.2.2",
"@types/jasmine": "~3.10.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div>
<logo-svg class="h-auto w-36 text-slate-900 dark:text-white"></logo-svg>
<h2 class="mt-6 text-3xl font-semibold text-slate-900 dark:text-white">Mot de passe oublié?</h2>
<p class="mt-2 text-sm text-slate-500 dark:text-slate-400">
<h2 class="mt-6 text-3xl font-semibold text-slate-900 dark:text-white" i18n>Mot de passe oublié?</h2>
<p class="mt-2 text-sm text-slate-500 dark:text-slate-400" i18n>
Saisissez votre adresse e-mail et nous vous enverrons un lien pour réinitialiser votre mot de passe.
</p>
</div>
Expand All @@ -16,23 +16,24 @@ <h2 class="mt-6 text-3xl font-semibold text-slate-900 dark:text-white">Mot de pa
<div>
<input-overlaping-label
label="Adresse E-mail"
i18n-label="attr-email"
name="email"
formControlName="email"
></input-overlaping-label>
</div>

<div class="flex items-center justify-end">
<button-primary type="submit" [loading$]="(loading$)">
<button-primary type="submit" [loading$]="(loading$)" i18n>
Envoyer le lien de réinitialisation
</button-primary>
</div>
</form>

<p class="mt-2 text-right">
<a routerLink="/auth/login" class="inline-flex items-center text-sm font-medium leading-5 text-secondary-500 hover:text-secondary-600 hover:underline">
<svg class="w-5 h-5 mr-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
<path d="M6.75 15.75L3 12M3 12L6.75 8.25M3 12H21" />
</svg>
Retournez à la page de connexion
<svg class="w-5 h-5 mr-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
<path d="M6.75 15.75L3 12M3 12L6.75 8.25M3 12H21" />
</svg>
<span i18n>Retournez à la page de connexion</span>
</a>
</p>
Loading