Changed everything to use translate pipeline instead of hardcoded text and added german translations

This commit is contained in:
itzMiney committed 2025-06-11 01:08:36 +02:00
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'
+2 -2
View File
@@ -2,7 +2,7 @@
<div class="height-container">
<div class="blog-header" [ngStyle]="{'margin-top': isMobile ? '72px' : '112px'}">
<h1>Blog</h1>
<p class="subtitle">Some (very) irregular updates</p>
<p class="subtitle">{{ 'BLOG_SUB' | translate }}</p>
</div>
<hr class="rounded">
<div class="blog-container">
@@ -15,6 +15,6 @@
</div>
</div>
<ng-template #noArticles>
<h2>No Articles yet!</h2>
<h2>{{ 'ARTICLES_NONE' | translate }}</h2>
</ng-template>
</div>
+3 -1
View File
@@ -6,6 +6,7 @@ import { ArticleService } from '../shared/services/article.service';
import { Router } from '@angular/router';
import {Observable} from 'rxjs';
import {Title} from '@angular/platform-browser';
import {TranslatePipe} from '@ngx-translate/core';
@Component({
selector: 'app-blog',
@@ -15,7 +16,8 @@ import {Title} from '@angular/platform-browser';
DatePipe,
AsyncPipe,
SlicePipe,
NgStyle
NgStyle,
TranslatePipe
],
templateUrl: './blog.component.html',
styleUrl: './blog.component.css'