Skip to content

Commit 3092725

Browse files
authored
fix: display the menu description in the Marketplace when there is no the i18nKey (#511)
1 parent abb3327 commit 3092725

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/locales/lang/menus/es.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ const titles = {
127127
self_observability_satellite_desc:
128128
"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.",
129129
self_observability_banyandb: "Servidor BanyanDB",
130-
self_observability_banyandb_desc: "Proporcione la monitorización de BanyanDB a través del receptor Prometheus de OpenTelemetry.",
130+
self_observability_banyandb_desc:
131+
"Proporcione la monitorización de BanyanDB a través del receptor Prometheus de OpenTelemetry.",
131132
self_observability_java_agent: "SkyWalking Java Agent",
132133
self_observability_java_agent_desc:
133134
"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.",

src/store/modules/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ export const appStore = defineStore({
159159
const t = `${d.title.replace(/\s+/g, "-")}`;
160160
d.name = `${t}-${index}`;
161161
d.path = `/${t}`;
162-
d.descKey = `${d.i18nKey}_desc`;
162+
d.descKey = d.i18nKey ? `${d.i18nKey}_desc` : "";
163163
if (d.subItems && d.subItems.length) {
164164
d.hasGroup = true;
165165
d.subItems = d.subItems.map((item: SubItem, sub: number) => {
166166
const id = `${item.title.replace(/\s+/g, "-")}`;
167167
item.name = `${id}-${index}${sub}`;
168168
item.path = `/${t}/${id}`;
169-
item.descKey = `${item.i18nKey}_desc`;
169+
item.descKey = item.i18nKey ? `${item.i18nKey}_desc` : "";
170170
return item;
171171
});
172172
}

src/views/Marketplace.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ limitations under the License. -->
3737
{{ te(menu.i18nKey) ? t(menu.i18nKey) : menu.title }}
3838
</div>
3939
</router-link>
40-
<div class="mt-10"> {{ te(menu.descKey) ? t(menu.descKey) : "" }} </div>
40+
<div class="mt-10"> {{ te(menu.descKey) ? t(menu.descKey) : menu.description }} </div>
4141
<el-link :href="menu.documentLink" target="_blank" class="link" v-show="menu.documentLink">
4242
<el-button class="mt-10" size="small" type="primary"> {{ t("document") }} </el-button>
4343
</el-link>
@@ -50,7 +50,7 @@ limitations under the License. -->
5050
{{ te(item.i18nKey) ? t(item.i18nKey) : item.title }}
5151
</div>
5252
</router-link>
53-
<div class="mt-10"> {{ te(item.descKey) ? t(item.descKey) : "" }} </div>
53+
<div class="mt-10"> {{ te(item.descKey) ? t(item.descKey) : item.description }} </div>
5454
<el-link :href="item.documentLink" target="_blank" class="link" v-show="item.documentLink">
5555
<el-button class="mt-10" size="small" type="primary"> {{ t("document") }} </el-button>
5656
</el-link>

0 commit comments

Comments
 (0)