Skip to content

Commit 8a6e79e

Browse files
committed
Improve National Language Support
1 parent f7bcd73 commit 8a6e79e

36 files changed

+101
-94
lines changed

client/src/components/ActivityBar/ActivityItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const meta = computed(() => store.metaForId(props.id));
9494
</span>
9595
<FontAwesomeIcon :icon="icon" />
9696
</div>
97-
<TextShort v-if="title" :text="title" class="nav-title" />
97+
<TextShort v-if="title" :text="localize(title)" class="nav-title" />
9898
</b-nav-item>
9999
</template>
100100
<div class="text-center px-2 py-1">

client/src/components/Common/ListHeader.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ defineExpose({
7979

8080
<div class="list-header-filters">
8181
<div v-if="showSortOptions">
82-
Sort by:
82+
<span v-localize>Sort by:</span>
8383
<GButtonGroup>
8484
<GButton
8585
id="sortby-name"
@@ -91,7 +91,7 @@ defineExpose({
9191
outline
9292
@click="onSort('name')">
9393
<FontAwesomeIcon v-show="sortBy === 'name'" :icon="sortDesc ? faAngleDown : faAngleUp" />
94-
Name
94+
<span v-localize>Name</span>
9595
</GButton>
9696

9797
<GButton
@@ -104,7 +104,7 @@ defineExpose({
104104
outline
105105
@click="onSort('update_time')">
106106
<FontAwesomeIcon v-show="sortBy === 'update_time'" :icon="sortDesc ? faAngleDown : faAngleUp" />
107-
Update time
107+
<span v-localize>Update time</span>
108108
</GButton>
109109
</GButtonGroup>
110110
</div>
@@ -113,12 +113,12 @@ defineExpose({
113113
</div>
114114

115115
<div v-if="showViewToggle">
116-
Display:
116+
<span v-localize>Display:</span>
117117
<GButtonGroup>
118118
<GButton
119119
id="view-grid"
120120
tooltip
121-
title="Grid view"
121+
:title="localize('Grid view')"
122122
size="small"
123123
:pressed="currentListViewMode === 'grid'"
124124
outline
@@ -130,7 +130,7 @@ defineExpose({
130130
<GButton
131131
id="view-list"
132132
tooltip
133-
title="List view"
133+
:title="localize('List view')"
134134
size="small"
135135
:pressed="currentListViewMode === 'list'"
136136
outline

client/src/components/Form/Elements/FormBoolean.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ const label = computed(() => (currentValue.value ? "Yes" : "No"));
2525

2626
<template>
2727
<b-form-checkbox v-model="currentValue" class="no-highlight" switch>
28-
<span v-if="!props.noLabel">{{ label }}</span>
28+
<span v-if="!props.noLabel" v-localize>{{ label }}</span>
2929
</b-form-checkbox>
3030
</template>

client/src/components/Form/FormCard.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<span
77
v-if="collapsible"
88
v-b-tooltip.hover.bottom
9-
title="Collapse/Expand"
9+
:title="localize('Collapse/Expand')"
1010
variant="link"
1111
size="sm"
1212
class="float-right">
@@ -16,8 +16,8 @@
1616
</div>
1717
<span class="portlet-title">
1818
<span v-if="icon" :class="['portlet-title-icon fa mr-1', icon]" />
19-
<b class="portlet-title-text" itemprop="name">{{ title }}</b>
20-
<span class="portlet-title-description" itemprop="description">{{ description }}</span>
19+
<b class="portlet-title-text" itemprop="name">{{ localize(title) }}</b>
20+
<span class="portlet-title-description" itemprop="description">{{ localize(description) }}</span>
2121
</span>
2222
</div>
2323
<div v-show="expanded" class="portlet-content">

client/src/components/Form/FormInputs.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
:class="{ 'bordered-input': syncWithGraph && activeNodeId === index }">
77
<div v-if="input.type == 'conditional'" class="ui-portlet-section mt-3">
88
<div class="portlet-header">
9-
<b>{{ input.test_param.label || input.test_param.name }}</b>
9+
<b>{{ localize(input.test_param.label || input.test_param.name) }}</b>
1010
</div>
1111
<div class="portlet-content">
1212
<FormElement
1313
:id="conditionalPrefix(input, input.test_param.name)"
1414
v-model="input.test_param.value"
1515
:type="input.test_param.type"
16-
:help="input.test_param.help"
16+
:help="localize(input.test_param.help)"
1717
:help-format="input.test_param.help_format"
1818
:refresh-on-change="false"
1919
:disabled="sustainConditionals"
@@ -39,9 +39,9 @@
3939
@swap="(a, b) => repeatSwap(input, a, b)" />
4040
</div>
4141
<div v-else-if="input.type == 'section'">
42-
<FormCard :title="input.title || input.name" :expanded.sync="input.expanded" :collapsible="true">
42+
<FormCard :title="localize(input.title || input.name)" :expanded.sync="input.expanded" :collapsible="true">
4343
<template v-slot:body>
44-
<div v-if="input.help" class="my-2" data-description="section help">{{ input.help }}</div>
44+
<div v-if="input.help" class="my-2" data-description="section help">{{ localize(input.help) }}</div>
4545
<FormNode v-bind="$props" :inputs="input.inputs" :prefix="getPrefix(input.name)" />
4646
</template>
4747
</FormCard>
@@ -50,11 +50,11 @@
5050
v-else
5151
:id="getPrefix(input.name)"
5252
v-model="input.value"
53-
:title="input.label || input.name"
53+
:title="localize(input.label || input.name)"
5454
:type="input.type"
5555
:error="input.error"
5656
:warning="input.warning"
57-
:help="input.help"
57+
:help="localize(input.help)"
5858
:help-format="input.help_format"
5959
:refresh-on-change="input.refresh_on_change"
6060
:attributes="input.attributes || input"

client/src/components/Form/FormRepeat.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ const { keyObject } = useKeyedObjects();
114114
<template>
115115
<div>
116116
<div v-if="!props.sustainRepeats || props.input.cache?.length > 0">
117-
<div class="font-weight-bold mb-2">{{ props.input.title }}</div>
118-
<div v-if="props.input.help" class="mb-2" data-description="repeat help">{{ props.input.help }}</div>
117+
<div class="font-weight-bold mb-2">{{ localize(props.input.title) }}</div>
118+
<div v-if="props.input.help" class="mb-2" data-description="repeat help">{{ localize(props.input.help) }}</div>
119119
</div>
120120

121121
<FormCard

client/src/components/History/CurrentHistory/HistoryCounter.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ onMounted(() => {
150150
<div class="history-size my-1 d-flex justify-content-between">
151151
<GButton
152152
tooltip
153-
title="History Size"
153+
:title="localize('History Size')"
154154
transparent
155155
size="small"
156156
color="blue"
@@ -166,7 +166,7 @@ onMounted(() => {
166166
<BButton
167167
v-if="config && config.object_store_allows_id_selection && !isAnonymous"
168168
:id="`history-storage-${history.id}`"
169-
title="Manage Preferred History Storage"
169+
:title="localize('Manage Preferred History Storage')"
170170
variant="link"
171171
size="sm"
172172
class="rounded-0 text-decoration-none"
@@ -184,7 +184,7 @@ onMounted(() => {
184184
<BButtonGroup>
185185
<BButton
186186
v-b-tooltip.hover
187-
title="Show active"
187+
:title="localize('Show active')"
188188
variant="link"
189189
size="sm"
190190
class="rounded-0 text-decoration-none"
@@ -197,7 +197,7 @@ onMounted(() => {
197197
<BButton
198198
v-if="numItemsDeleted"
199199
v-b-tooltip.hover
200-
title="Include deleted"
200+
:title="localize('Include deleted')"
201201
variant="link"
202202
size="sm"
203203
class="rounded-0 text-decoration-none"
@@ -211,7 +211,7 @@ onMounted(() => {
211211
<BButton
212212
v-if="numItemsHidden"
213213
v-b-tooltip.hover
214-
title="Include hidden"
214+
:title="localize('Include hidden')"
215215
variant="link"
216216
size="sm"
217217
class="rounded-0 text-decoration-none"

client/src/components/History/CurrentHistory/HistoryNavigation.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ async function resumePausedJobs() {
161161
:variant="props.minimal ? 'outline-info' : 'link'"
162162
toggle-class="text-decoration-none"
163163
menu-class="history-options-button-menu"
164-
title="History options"
164+
:title="userTitle('History options')"
165165
right
166166
data-description="history options">
167167
<template v-slot:button-content>
@@ -175,7 +175,7 @@ async function resumePausedJobs() {
175175
<span>Fetching histories from server</span>
176176
</div>
177177

178-
<span v-else-if="!props.minimal">You have {{ totalHistoryCount }} histories.</span>
178+
<span v-else-if="!props.minimal">localize("You have") {{ totalHistoryCount }} localize('histories').</span>
179179
<span v-else>Manage History</span>
180180
</BDropdownText>
181181

client/src/components/History/CurrentHistory/HistoryOperations/SelectionOperations.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
All <b>{{ totalItemsInQuery }}</b> selected
77
</span>
88
<span v-else data-test-id="num-active-selected">
9-
<b>{{ selectionSize }}</b> of {{ totalItemsInQuery }} selected
9+
<b>{{ selectionSize }}</b> localize("of") {{ totalItemsInQuery }} localize("selected")
1010
</span>
1111
</template>
1212
<b-dropdown-text>
13-
<span v-localize data-description="selected count">With {{ numSelected }} selected...</span>
13+
<span v-localize data-description="selected count">localize("With") {{ numSelected }} localize("selected")...</span>
1414
</b-dropdown-text>
1515
<b-dropdown-item v-if="canUnhideSelection" v-b-modal:show-selected-content data-description="unhide option">
1616
<span v-localize>Unhide</span>

client/src/components/History/CurrentHistory/HistoryOperations/SelectionStatus.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ function resetSelection() {
2727
<BButton
2828
v-if="hasSelection"
2929
v-b-tooltip.hover
30-
title="Clear selection"
30+
:title="localize('Clear selection')"
3131
variant="link"
3232
data-test-id="clear-btn"
3333
@click="resetSelection">
3434
<span class="fa fa-fw fa-times" />
3535
</BButton>
3636

3737
<BButton v-else variant="link" data-test-id="select-all-btn" @click="selectAll">
38-
<span>Select All</span>
38+
<span v-localize>Select All</span>
3939
</BButton>
4040
</BButtonGroup>
4141
</template>

0 commit comments

Comments
 (0)