-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from camptocamp/i18n
Finalize i18n setup
- Loading branch information
Showing
7 changed files
with
526 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { TranslateLoader } from '@ngx-translate/core' | ||
import { Observable, map, of } from 'rxjs' | ||
import en_MEL from '../../assets/i18n/en_MEL.json' | ||
import fr_MEL from '../../assets/i18n/fr_MEL.json' | ||
import en from 'node_modules/geonetwork-ui/translations/en.json' | ||
import fr from 'node_modules/geonetwork-ui/translations/fr.json' | ||
import { dropEmptyTranslations } from 'geonetwork-ui' | ||
|
||
export class MelEmbeddedTranslateLoader implements TranslateLoader { | ||
getTranslation(lang: string): Observable<any> { | ||
const langs = { en: { ...en, ...en_MEL }, fr: { ...fr, ...fr_MEL } } | ||
const translations = langs[lang.substring(0, 2)] | ||
return of(translations).pipe(map(dropEmptyTranslations)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"mel.common.header.title": "", | ||
"mel.datahub.home.title": "", | ||
"mel.datahub.search.title": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"mel.common.header.title": "Data platform", | ||
"mel.datahub.home.title": "Métropole Européenne Lille", | ||
"mel.datahub.search.title": "Catalogue de jeux de données" | ||
} |
Oops, something went wrong.