fix(i18n): translate hardcoded UI labels in Step1 ontology panel
Replace hardcoded English strings (GENERATED ENTITY TYPES, ATTRIBUTES, EXAMPLES, etc.) and the Uploading message with i18n keys. Add corresponding translations to all 4 locale files (ca/en/zh/es). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7d172b9eec
commit
a6437df335
|
|
@ -31,7 +31,7 @@
|
||||||
<div v-if="selectedOntologyItem" class="ontology-detail-overlay">
|
<div v-if="selectedOntologyItem" class="ontology-detail-overlay">
|
||||||
<div class="detail-header">
|
<div class="detail-header">
|
||||||
<div class="detail-title-group">
|
<div class="detail-title-group">
|
||||||
<span class="detail-type-badge">{{ selectedOntologyItem.itemType === 'entity' ? 'ENTITY' : 'RELATION' }}</span>
|
<span class="detail-type-badge">{{ selectedOntologyItem.itemType === 'entity' ? $t('step1.labelEntity') : $t('step1.labelRelation') }}</span>
|
||||||
<span class="detail-name">{{ selectedOntologyItem.name }}</span>
|
<span class="detail-name">{{ selectedOntologyItem.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="close-btn" @click="selectedOntologyItem = null">×</button>
|
<button class="close-btn" @click="selectedOntologyItem = null">×</button>
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
<!-- Attributes -->
|
<!-- Attributes -->
|
||||||
<div class="detail-section" v-if="selectedOntologyItem.attributes?.length">
|
<div class="detail-section" v-if="selectedOntologyItem.attributes?.length">
|
||||||
<span class="section-label">ATTRIBUTES</span>
|
<span class="section-label">{{ $t('step1.labelAttributes') }}</span>
|
||||||
<div class="attr-list">
|
<div class="attr-list">
|
||||||
<div v-for="attr in selectedOntologyItem.attributes" :key="attr.name" class="attr-item">
|
<div v-for="attr in selectedOntologyItem.attributes" :key="attr.name" class="attr-item">
|
||||||
<span class="attr-name">{{ attr.name }}</span>
|
<span class="attr-name">{{ attr.name }}</span>
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
<!-- Examples (Entity) -->
|
<!-- Examples (Entity) -->
|
||||||
<div class="detail-section" v-if="selectedOntologyItem.examples?.length">
|
<div class="detail-section" v-if="selectedOntologyItem.examples?.length">
|
||||||
<span class="section-label">EXAMPLES</span>
|
<span class="section-label">{{ $t('step1.labelExamples') }}</span>
|
||||||
<div class="example-list">
|
<div class="example-list">
|
||||||
<span v-for="ex in selectedOntologyItem.examples" :key="ex" class="example-tag">{{ ex }}</span>
|
<span v-for="ex in selectedOntologyItem.examples" :key="ex" class="example-tag">{{ ex }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
<!-- Source/Target (Relation) -->
|
<!-- Source/Target (Relation) -->
|
||||||
<div class="detail-section" v-if="selectedOntologyItem.source_targets?.length">
|
<div class="detail-section" v-if="selectedOntologyItem.source_targets?.length">
|
||||||
<span class="section-label">CONNECTIONS</span>
|
<span class="section-label">{{ $t('step1.labelConnections') }}</span>
|
||||||
<div class="conn-list">
|
<div class="conn-list">
|
||||||
<div v-for="(conn, idx) in selectedOntologyItem.source_targets" :key="idx" class="conn-item">
|
<div v-for="(conn, idx) in selectedOntologyItem.source_targets" :key="idx" class="conn-item">
|
||||||
<span class="conn-node">{{ conn.source }}</span>
|
<span class="conn-node">{{ conn.source }}</span>
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
<!-- Generated Entity Tags -->
|
<!-- Generated Entity Tags -->
|
||||||
<div v-if="projectData?.ontology?.entity_types" class="tags-container" :class="{ 'dimmed': selectedOntologyItem }">
|
<div v-if="projectData?.ontology?.entity_types" class="tags-container" :class="{ 'dimmed': selectedOntologyItem }">
|
||||||
<span class="tag-label">GENERATED ENTITY TYPES</span>
|
<span class="tag-label">{{ $t('step1.labelEntityTypes') }}</span>
|
||||||
<div class="tags-list">
|
<div class="tags-list">
|
||||||
<span
|
<span
|
||||||
v-for="entity in projectData.ontology.entity_types"
|
v-for="entity in projectData.ontology.entity_types"
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
|
|
||||||
<!-- Generated Relation Tags -->
|
<!-- Generated Relation Tags -->
|
||||||
<div v-if="projectData?.ontology?.edge_types" class="tags-container" :class="{ 'dimmed': selectedOntologyItem }">
|
<div v-if="projectData?.ontology?.edge_types" class="tags-container" :class="{ 'dimmed': selectedOntologyItem }">
|
||||||
<span class="tag-label">GENERATED RELATION TYPES</span>
|
<span class="tag-label">{{ $t('step1.labelRelationTypes') }}</span>
|
||||||
<div class="tags-list">
|
<div class="tags-list">
|
||||||
<span
|
<span
|
||||||
v-for="rel in projectData.ontology.edge_types"
|
v-for="rel in projectData.ontology.edge_types"
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ const handleNewProject = async () => {
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
currentPhase.value = 0
|
currentPhase.value = 0
|
||||||
ontologyProgress.value = { message: 'Uploading and analyzing docs...' }
|
ontologyProgress.value = { message: t('step1.analyzingDocs') }
|
||||||
addLog('Starting ontology generation: Uploading files...')
|
addLog('Starting ontology generation: Uploading files...')
|
||||||
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,14 @@
|
||||||
"creating": "Creant...",
|
"creating": "Creant...",
|
||||||
"enterEnvSetup": "Entra a la configuració de l'entorn",
|
"enterEnvSetup": "Entra a la configuració de l'entorn",
|
||||||
"createSimulationFailed": "Error en crear la simulació: {error}",
|
"createSimulationFailed": "Error en crear la simulació: {error}",
|
||||||
"createSimulationException": "Excepció en crear la simulació: {error}"
|
"createSimulationException": "Excepció en crear la simulació: {error}",
|
||||||
|
"labelEntityTypes": "TIPUS D'ENTITAT GENERATS",
|
||||||
|
"labelRelationTypes": "TIPUS DE RELACIÓ GENERATS",
|
||||||
|
"labelEntity": "ENTITAT",
|
||||||
|
"labelRelation": "RELACIÓ",
|
||||||
|
"labelAttributes": "ATRIBUTS",
|
||||||
|
"labelExamples": "EXEMPLES",
|
||||||
|
"labelConnections": "CONNEXIONS"
|
||||||
},
|
},
|
||||||
"step2": {
|
"step2": {
|
||||||
"simInstanceInit": "Inicialització de la instància de simulació",
|
"simInstanceInit": "Inicialització de la instància de simulació",
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,14 @@
|
||||||
"creating": "Creating...",
|
"creating": "Creating...",
|
||||||
"enterEnvSetup": "Enter Environment Setup",
|
"enterEnvSetup": "Enter Environment Setup",
|
||||||
"createSimulationFailed": "Failed to create simulation: {error}",
|
"createSimulationFailed": "Failed to create simulation: {error}",
|
||||||
"createSimulationException": "Simulation creation error: {error}"
|
"createSimulationException": "Simulation creation error: {error}",
|
||||||
|
"labelEntityTypes": "GENERATED ENTITY TYPES",
|
||||||
|
"labelRelationTypes": "GENERATED RELATION TYPES",
|
||||||
|
"labelEntity": "ENTITY",
|
||||||
|
"labelRelation": "RELATION",
|
||||||
|
"labelAttributes": "ATTRIBUTES",
|
||||||
|
"labelExamples": "EXAMPLES",
|
||||||
|
"labelConnections": "CONNECTIONS"
|
||||||
},
|
},
|
||||||
"step2": {
|
"step2": {
|
||||||
"simInstanceInit": "Simulation Instance Initialization",
|
"simInstanceInit": "Simulation Instance Initialization",
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,14 @@
|
||||||
"creating": "Creando...",
|
"creating": "Creando...",
|
||||||
"enterEnvSetup": "Entrar a configuración del entorno",
|
"enterEnvSetup": "Entrar a configuración del entorno",
|
||||||
"createSimulationFailed": "Error al crear simulación: {error}",
|
"createSimulationFailed": "Error al crear simulación: {error}",
|
||||||
"createSimulationException": "Excepción al crear simulación: {error}"
|
"createSimulationException": "Excepción al crear simulación: {error}",
|
||||||
|
"labelEntityTypes": "TIPOS DE ENTIDAD GENERADOS",
|
||||||
|
"labelRelationTypes": "TIPOS DE RELACIÓN GENERADOS",
|
||||||
|
"labelEntity": "ENTIDAD",
|
||||||
|
"labelRelation": "RELACIÓN",
|
||||||
|
"labelAttributes": "ATRIBUTOS",
|
||||||
|
"labelExamples": "EJEMPLOS",
|
||||||
|
"labelConnections": "CONEXIONES"
|
||||||
},
|
},
|
||||||
"step2": {
|
"step2": {
|
||||||
"simInstanceInit": "Inicialización de instancia de simulación",
|
"simInstanceInit": "Inicialización de instancia de simulación",
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,14 @@
|
||||||
"creating": "创建中...",
|
"creating": "创建中...",
|
||||||
"enterEnvSetup": "进入环境搭建",
|
"enterEnvSetup": "进入环境搭建",
|
||||||
"createSimulationFailed": "创建模拟失败: {error}",
|
"createSimulationFailed": "创建模拟失败: {error}",
|
||||||
"createSimulationException": "创建模拟异常: {error}"
|
"createSimulationException": "创建模拟异常: {error}",
|
||||||
|
"labelEntityTypes": "生成的实体类型",
|
||||||
|
"labelRelationTypes": "生成的关系类型",
|
||||||
|
"labelEntity": "实体",
|
||||||
|
"labelRelation": "关系",
|
||||||
|
"labelAttributes": "属性",
|
||||||
|
"labelExamples": "示例",
|
||||||
|
"labelConnections": "连接"
|
||||||
},
|
},
|
||||||
"step2": {
|
"step2": {
|
||||||
"simInstanceInit": "模拟实例初始化",
|
"simInstanceInit": "模拟实例初始化",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue