fix(content-management): static pages editor reads supported locales instead of hardcoding en/ru/hy
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user