Skip to content

Commit

Permalink
Merge pull request #2 from laravelcm/add-locale
Browse files Browse the repository at this point in the history
Add locale
  • Loading branch information
mckenziearts authored Oct 13, 2022
2 parents 9a11eb4 + bc276cc commit 3550c36
Show file tree
Hide file tree
Showing 18 changed files with 1,150 additions and 88 deletions.
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

0 comments on commit 3550c36

Please sign in to comment.