Added i18n translations

This commit is contained in:
2024-03-10 00:14:00 +03:00
parent a9436a5af7
commit 90582949d5
15 changed files with 191 additions and 20 deletions

View File

@@ -1,10 +1,10 @@
<div class="panel">
<span>Info</span>
<span>{{ modal_title | translate }}</span>
<div class="btns">
<fa-icon [icon]="faMenu"></fa-icon>
<fa-icon [icon]="faClose"></fa-icon>
</div>
</div>
<div class="content">
<h1>Hello</h1>
<h1>{{ modal_text | translate }}</h1>
</div>

View File

@@ -1,18 +1,21 @@
import { CommonModule } from "@angular/common";
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { Component } from "@angular/core";
import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
import { faBars, faXmark } from "@fortawesome/free-solid-svg-icons";
import { DialogRef } from "@ngneat/dialog";
import { TranslationPipe } from "../../pipes/translation.pipe";
@Component({
selector: "app-window",
standalone: true,
imports: [CommonModule, FontAwesomeModule],
imports: [CommonModule, FontAwesomeModule, TranslationPipe],
templateUrl: "./window.component.html",
styleUrls: ["./window.component.less"],
changeDetection: ChangeDetectionStrategy.OnPush,
// changeDetection: ChangeDetectionStrategy.OnPush,
})
export class WindowComponent {
modal_text = "MODAL_TEXT";
modal_title = "MODAL_TITLE";
faClose = faXmark;
faMenu = faBars;
constructor(public ref: DialogRef) {}