fix(content-management): static pages editor reads supported locales instead of hardcoding en/ru/hy

This commit is contained in:
sdarbinyan
2026-07-13 08:20:06 +04:00
parent b166920ad7
commit 4d65386052
2 changed files with 2 additions and 1 deletions

View File

@@ -34,7 +34,7 @@
<label><span>{{ 'builder.orderLabel' | translate }}</span><input type="number" [ngModel]="page.order" (ngModelChange)="updatePage(page.id, { order: +$event })" /></label> <label><span>{{ 'builder.orderLabel' | translate }}</span><input type="number" [ngModel]="page.order" (ngModelChange)="updatePage(page.id, { order: +$event })" /></label>
</div> </div>
@for (locale of ['en','ru','hy']; track locale) { @for (locale of locales(); track locale) {
<div class="editor-grid two"> <div class="editor-grid two">
<label> <label>
<span>{{ 'builder.translationTitle' | translate }} {{ locale }}</span> <span>{{ 'builder.translationTitle' | translate }} {{ locale }}</span>

View File

@@ -20,6 +20,7 @@ export class StaticPagesEditorComponent {
readonly bootstrap = this.projectEditor.bootstrap; readonly bootstrap = this.projectEditor.bootstrap;
readonly pages = computed(() => this.contentFacade.pages(this.bootstrap())); readonly pages = computed(() => this.contentFacade.pages(this.bootstrap()));
readonly validation = computed(() => this.contentFacade.validatePages(this.bootstrap())); readonly validation = computed(() => this.contentFacade.validatePages(this.bootstrap()));
readonly locales = computed(() => this.bootstrap()?.localization.supportedLocales ?? ['en']);
createPage(): void { createPage(): void {
const page: ContentPage = { const page: ContentPage = {