Browse Source

Setup i18n

pull/1139/head
Thomas 3 years ago
parent
commit
06beb198c2
  1. 10
      angular.json
  2. 4
      apps/client/src/app/pages/about/changelog/changelog-page.html
  3. 2
      apps/client/src/app/pages/about/privacy-policy/privacy-policy-page.html
  4. 2
      apps/client/src/app/pages/landing/landing-page.html
  5. 4
      apps/client/src/assets/site.webmanifest
  6. 14
      apps/client/src/index.html
  7. 2278
      apps/client/src/locales/messages.de.xlf
  8. 2278
      apps/client/src/locales/messages.xlf
  9. 3
      package.json

10
angular.json

@ -114,6 +114,7 @@
"output": "./" "output": "./"
} }
], ],
"localize": ["en"],
"styles": ["apps/client/src/styles.scss"], "styles": ["apps/client/src/styles.scss"],
"scripts": ["node_modules/marked/marked.min.js"], "scripts": ["node_modules/marked/marked.min.js"],
"vendorChunk": true, "vendorChunk": true,
@ -188,6 +189,15 @@
"outputs": ["coverage/apps/client"] "outputs": ["coverage/apps/client"]
} }
}, },
"i18n": {
"locales": {
"de": {
"baseHref": "/de/",
"translation": "apps/client/src/locales/messages.de.xlf"
}
},
"sourceLocale": "en"
},
"tags": [] "tags": []
}, },
"client-e2e": { "client-e2e": {

4
apps/client/src/app/pages/about/changelog/changelog-page.html

@ -4,7 +4,7 @@
<h3 class="mb-3 text-center" i18n>Changelog</h3> <h3 class="mb-3 text-center" i18n>Changelog</h3>
<mat-card class="changelog"> <mat-card class="changelog">
<mat-card-content> <mat-card-content>
<markdown [src]="'assets/CHANGELOG.md'"></markdown> <markdown [src]="'./assets/CHANGELOG.md'"></markdown>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> </div>
@ -15,7 +15,7 @@
<h3 class="mb-3 text-center" i18n>License</h3> <h3 class="mb-3 text-center" i18n>License</h3>
<mat-card> <mat-card>
<mat-card-content> <mat-card-content>
<markdown [src]="'assets/LICENSE'"></markdown> <markdown [src]="'./assets/LICENSE'"></markdown>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> </div>

2
apps/client/src/app/pages/about/privacy-policy/privacy-policy-page.html

@ -2,7 +2,7 @@
<div class="mb-5 row"> <div class="mb-5 row">
<div class="col"> <div class="col">
<h3 class="mb-3 text-center" i18n>Privacy Policy</h3> <h3 class="mb-3 text-center" i18n>Privacy Policy</h3>
<markdown [src]="'assets/privacy-policy.md'"></markdown> <markdown [src]="'./assets/privacy-policy.md'"></markdown>
</div> </div>
</div> </div>
</div> </div>

2
apps/client/src/app/pages/landing/landing-page.html

@ -183,7 +183,7 @@
href="https://play.google.com/store/apps/details?id=ch.dotsilver.ghostfolio.twa" href="https://play.google.com/store/apps/details?id=ch.dotsilver.ghostfolio.twa"
title="Get Ghostfolio on Google Play" title="Get Ghostfolio on Google Play"
> >
<img alt="Google Play Badge" src="assets/badge-en-google-play.png" /> <img alt="Google Play Badge" src="./assets/badge-en-google-play.png" />
</a> </a>
</div> </div>
</div> </div>

4
apps/client/src/assets/site.webmanifest

@ -6,12 +6,12 @@
"icons": [ "icons": [
{ {
"sizes": "192x192", "sizes": "192x192",
"src": "/assets/android-chrome-192x192.png", "src": "/en/assets/android-chrome-192x192.png",
"type": "image/png" "type": "image/png"
}, },
{ {
"sizes": "512x512", "sizes": "512x512",
"src": "/assets/android-chrome-512x512.png", "src": "/en/assets/android-chrome-512x512.png",
"type": "image/png" "type": "image/png"
} }
], ],

14
apps/client/src/index.html

@ -21,7 +21,7 @@
/> />
<meta <meta
name="twitter:image" name="twitter:image"
content="https://www.ghostfol.io/assets/cover.png" content="https://ghostfol.io/en/assets/cover.png"
/> />
<meta <meta
name="twitter:title" name="twitter:title"
@ -37,10 +37,10 @@
content="Ghostfolio – Open Source Wealth Management Software" content="Ghostfolio – Open Source Wealth Management Software"
/> />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:url" content="https://www.ghostfol.io" /> <meta property="og:url" content="https://ghostfol.io" />
<meta <meta
property="og:image" property="og:image"
content="https://www.ghostfol.io/assets/cover.png" content="https://ghostfol.io/en/assets/cover.png"
/> />
<meta property="og:updated_time" content="2022-05-28T00:00:00+00:00" /> <meta property="og:updated_time" content="2022-05-28T00:00:00+00:00" />
<meta <meta
@ -51,21 +51,21 @@
<link <link
rel="apple-touch-icon" rel="apple-touch-icon"
sizes="180x180" sizes="180x180"
href="/assets/apple-touch-icon.png" href="./assets/apple-touch-icon.png"
/> />
<link <link
rel="icon" rel="icon"
type="image/png" type="image/png"
sizes="32x32" sizes="32x32"
href="/assets/favicon-32x32.png" href="./assets/favicon-32x32.png"
/> />
<link <link
rel="icon" rel="icon"
type="image/png" type="image/png"
sizes="16x16" sizes="16x16"
href="/assets/favicon-16x16.png" href="./assets/favicon-16x16.png"
/> />
<link rel="manifest" href="/assets/site.webmanifest" /> <link rel="manifest" href="./assets/site.webmanifest" />
</head> </head>
<body> <body>
<gf-root></gf-root> <gf-root></gf-root>

2278
apps/client/src/locales/messages.de.xlf

File diff suppressed because it is too large

2278
apps/client/src/locales/messages.xlf

File diff suppressed because it is too large

3
package.json

@ -13,7 +13,7 @@
"affected:lint": "nx affected:lint", "affected:lint": "nx affected:lint",
"affected:test": "nx affected:test", "affected:test": "nx affected:test",
"angular": "node --max_old_space_size=32768 ./node_modules/@angular/cli/bin/ng", "angular": "node --max_old_space_size=32768 ./node_modules/@angular/cli/bin/ng",
"build:all": "nx run api:build:production && nx run client:build:production && yarn replace-placeholders-in-build", "build:all": "nx run api:build:production && nx run client:build:production --localize && yarn replace-placeholders-in-build",
"build:dev": "nx run api:build && nx run client:build && yarn replace-placeholders-in-build", "build:dev": "nx run api:build && nx run client:build && yarn replace-placeholders-in-build",
"build:storybook": "nx run ui:build-storybook", "build:storybook": "nx run ui:build-storybook",
"clean": "rimraf dist", "clean": "rimraf dist",
@ -29,6 +29,7 @@
"database:validate": "prisma validate", "database:validate": "prisma validate",
"dep-graph": "nx dep-graph", "dep-graph": "nx dep-graph",
"e2e": "ng e2e", "e2e": "ng e2e",
"extract-locales": "ng extract-i18n --output-path ./apps/client/src/locales",
"format": "nx format:write", "format": "nx format:write",
"format:check": "nx format:check", "format:check": "nx format:check",
"format:write": "nx format:write", "format:write": "nx format:write",

Loading…
Cancel
Save