fix: display the menu description in the Marketplace when there is no the i18nKey (#511)

This commit is contained in:
Fine0830
2025-10-29 14:18:39 +08:00
committed by GitHub
parent abb332745a
commit 30927258d6
3 changed files with 6 additions and 5 deletions

View File

@@ -127,7 +127,8 @@ const titles = {
self_observability_satellite_desc:
"Satellite: an open-source agent designed for the cloud-native infrastructures, which provides a low-cost, high-efficient, and more secure way to collect telemetry data. It is the recommended load balancer for telemetry collecting.",
self_observability_banyandb: "Servidor BanyanDB",
self_observability_banyandb_desc: "Proporcione la monitorización de BanyanDB a través del receptor Prometheus de OpenTelemetry.",
self_observability_banyandb_desc:
"Proporcione la monitorización de BanyanDB a través del receptor Prometheus de OpenTelemetry.",
self_observability_java_agent: "SkyWalking Java Agent",
self_observability_java_agent_desc:
"La auto-observabilidad de SkyWalking Java Agent, que proporciona la capacidad de medir el rendimiento del trazado y las estadísticas de errores de los plugins.",

View File

@@ -159,14 +159,14 @@ export const appStore = defineStore({
const t = `${d.title.replace(/\s+/g, "-")}`;
d.name = `${t}-${index}`;
d.path = `/${t}`;
d.descKey = `${d.i18nKey}_desc`;
d.descKey = d.i18nKey ? `${d.i18nKey}_desc` : "";
if (d.subItems && d.subItems.length) {
d.hasGroup = true;
d.subItems = d.subItems.map((item: SubItem, sub: number) => {
const id = `${item.title.replace(/\s+/g, "-")}`;
item.name = `${id}-${index}${sub}`;
item.path = `/${t}/${id}`;
item.descKey = `${item.i18nKey}_desc`;
item.descKey = item.i18nKey ? `${item.i18nKey}_desc` : "";
return item;
});
}

View File

@@ -37,7 +37,7 @@ limitations under the License. -->
{{ te(menu.i18nKey) ? t(menu.i18nKey) : menu.title }}
</div>
</router-link>
<div class="mt-10"> {{ te(menu.descKey) ? t(menu.descKey) : "" }} </div>
<div class="mt-10"> {{ te(menu.descKey) ? t(menu.descKey) : menu.description }} </div>
<el-link :href="menu.documentLink" target="_blank" class="link" v-show="menu.documentLink">
<el-button class="mt-10" size="small" type="primary"> {{ t("document") }} </el-button>
</el-link>
@@ -50,7 +50,7 @@ limitations under the License. -->
{{ te(item.i18nKey) ? t(item.i18nKey) : item.title }}
</div>
</router-link>
<div class="mt-10"> {{ te(item.descKey) ? t(item.descKey) : "" }} </div>
<div class="mt-10"> {{ te(item.descKey) ? t(item.descKey) : item.description }} </div>
<el-link :href="item.documentLink" target="_blank" class="link" v-show="item.documentLink">
<el-button class="mt-10" size="small" type="primary"> {{ t("document") }} </el-button>
</el-link>