feat: Add translation on 3 languages for sight page

This commit is contained in:
2025-06-01 00:34:59 +03:00
parent 0d9bbb140f
commit 87386c6a73
22 changed files with 768 additions and 732 deletions

View File

@@ -53,7 +53,7 @@ class ArticlesStore {
const response = await authInstance.get(`/sight/${id}/article`);
runInAction(() => {
editSightStore.sightInfo[languageStore.language].right = response.data;
editSightStore.sight[languageStore.language].right = response.data;
});
};
@@ -66,10 +66,14 @@ class ArticlesStore {
};
getArticleByArticleId = computed(() => {
if (editSightStore.sightInfo.left_article) {
return this.articles[languageStore.language].find(
(a) => a.id == editSightStore.sightInfo.left_article
if (editSightStore.sight.common.left_article) {
const language = languageStore.language;
const foundArticle = this.articles[language].find(
(a) => a.id == editSightStore.sight.common.left_article
);
editSightStore.sight[language].left.heading = foundArticle?.heading ?? "";
editSightStore.sight[language].left.body = foundArticle?.body ?? "";
return foundArticle;
}
return null;
});