Changed everything to use translate pipeline instead of hardcoded text and added german translations
This commit is contained in:
1 parent
5c7f0074f3
commit
cfa971f856
33 files changed
+758
-321
No files matched your search
@@ -8,12 +8,12 @@
|
||||
<!-- Article Content -->
|
||||
<div class="article-content" [innerHTML]="article.content"></div>
|
||||
|
||||
<a href="/blog"><button>Back to Overview</button></a>
|
||||
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
|
||||
<!-- Article Metadata -->
|
||||
<div class="article-meta">
|
||||
<p><strong>Author:</strong> {{ article.authorName}}</p>
|
||||
<p><strong>Views:</strong> {{ article.views }}</p><br><button (click)="copyLink()" [ngStyle]="{'background-color':copied ? '#22b34b' : ''}">{{ copied ? 'Copied' : 'Share' }}</button>
|
||||
<p><strong>Created At:</strong> {{ article.createdAt | date:'MMM dd, yyyy, HH:mm' }}</p>
|
||||
<p><strong>{{ 'CREATED_AT' | translate }}</strong> {{ article.createdAt | date:'MMM dd, yyyy, HH:mm' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -26,8 +26,8 @@
|
||||
<ng-template #error>
|
||||
<div class="error-message" *ngIf="!loading && error">
|
||||
<h1>404</h1>
|
||||
<p>Article not found!</p>
|
||||
<a href="/blog"><button>Back to Overview</button></a>
|
||||
<p>{{ 'ARTICLE_NOTFOUND' | translate }}</p>
|
||||
<a href="/blog"><button>{{ 'ARTICLE_BACK' | translate }}</button></a>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
@@ -5,6 +5,7 @@ import {VantaBackgroundService} from '../../shared/services/vanta-background.ser
|
||||
import {ArticleService} from '../../shared/services/article.service';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {TranslatePipe} from '@ngx-translate/core';
|
||||
|
||||
interface Article {
|
||||
id: number;
|
||||
@@ -23,7 +24,8 @@ interface Article {
|
||||
imports: [
|
||||
NgIf,
|
||||
DatePipe,
|
||||
NgStyle
|
||||
NgStyle,
|
||||
TranslatePipe
|
||||
],
|
||||
templateUrl: './article-page.component.html',
|
||||
styleUrl: './article-page.component.css'
|
||||
|
||||
Reference in new issue
Block a user