Skip to content

Commit

Permalink
fix: translation bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
bayang committed Dec 23, 2024
1 parent 1536ac0 commit ac37e6c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/jelu-ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ const collapseDropdown = () => {
<input
v-model="searchQuery"
type="text"
placeholder="Search…"
:placeholder="t('labels.search_query')"
class="input input-accent join-item"
@focus="showAdvanced = true"
@blur="hideAdvanced"
Expand Down Expand Up @@ -322,7 +322,7 @@ const collapseDropdown = () => {
class="font-sans text-xl capitalize"
:to="{ name: 'random' }"
>
{{ "Random" }}
{{ t('nav.random') }}
</router-link>
</li>
<li>
Expand Down Expand Up @@ -399,7 +399,7 @@ const collapseDropdown = () => {
<input
v-model="searchQuery"
type="text"
placeholder="Search…"
:placeholder="t('labels.search_query')"
class="input input-accent join-item"
@focus="showAdvanced = true"
@blur="hideAdvanced"
Expand Down
6 changes: 3 additions & 3 deletions src/jelu-ui/src/components/AddBook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1034,23 +1034,23 @@ let displayDatepicker = computed(() => {
>
<div class="form-control">
<label class="label cursor-pointer justify-center gap-2">
<span class="label-text">From web</span>
<span class="label-text">{{ t('labels.upload_from_web') }}</span>
<input
v-model="uploadType"
type="radio"
name="radio-10"
class="radio radio-primary"
value="web"
>
<span class="label-text">From computer</span>
<span class="label-text">{{ t('labels.upload_from_computer') }}</span>
<input
v-model="uploadType"
type="radio"
name="radio-10"
class="radio radio-primary"
value="computer"
>
<span class="label-text">From Jelu server</span>
<span class="label-text">{{ t('labels.upload_from_server') }}</span>
<input
v-model="uploadType"
type="radio"
Expand Down
2 changes: 1 addition & 1 deletion src/jelu-ui/src/components/AdminBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ useTitle('Jelu | User page')
const store = useStore(key)
const items = ref([{ name:t('settings.profile'), tooltip:t('settings.my_profile'), icon:"bx-user", href:"/profile" },
{ name:t('settings.settings'), icon:"bxs-cog", href:"/profile/settings", tooltip: t('settings.profile') },
{ name:t('settings.settings'), icon:"bxs-cog", href:"/profile/settings", tooltip: t('settings.settings') },
{ name:t('settings.authors'), icon:"bxs-user-account", href:"/profile/admin/authors", tooltip: t('settings.author_management') },
{ name:t('settings.imports'), icon:"bxs-file-plus", href:"/profile/imports", tooltip: t('settings.csv_import') },
{ name:t('settings.messages'), icon:"bxs-message-alt-detail", href:"/profile/messages" },
Expand Down
7 changes: 3 additions & 4 deletions src/jelu-ui/src/components/Imports.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ watch(file, (newVal, oldVal) => {
<o-field
horizontal
:label="t('csv_import.import_source') + ' : '"
class="capitalize"
>
<o-radio
v-model="importSource"
Expand All @@ -135,7 +134,7 @@ watch(file, (newVal, oldVal) => {
name="source"
native-value="ISBN_LIST"
>
List of ISBN in a file
{{ t('csv_import.isbn_list') }}
</o-radio>
</o-field>
</div>
Expand All @@ -152,7 +151,7 @@ watch(file, (newVal, oldVal) => {
v-model="fetchMetadata"
:disabled="store != null && !store.getters.getMetadataFetchEnabled"
>
{{ fetchMetadata }}
{{ fetchMetadata ? t('labels.yes'):t('labels.no') }}
</o-checkbox>
</o-field>
</div>
Expand All @@ -168,7 +167,7 @@ watch(file, (newVal, oldVal) => {
v-model="fetchCovers"
:disabled="fetchCoversDisabled"
>
{{ fetchCovers }}
{{ fetchCovers ? t('labels.yes'):t('labels.no') }}
</o-checkbox>
</o-field>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/jelu-ui/src/components/UserStats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ const getAllStats = () => {
datasets: [
{
type: 'line',
label: 'pages read',
label: t('stats.pages_read'),
backgroundColor: '#3abff8',
borderColor: '#3abff8',
borderWidth: 2,
yAxisID: 'y2',
data: res.map(r => r.pageCount)
},
{
label: 'finished',
label: t('stats.finished'),
yAxisID: 'y1',
backgroundColor: '#bbbbbb',
data: res.map(r => r.finished)
},
{
label: 'dropped',
label: t('stats.dropped'),
yAxisID: 'y1',
backgroundColor: '#f87979',
data: res.map(r => r.dropped)
Expand Down Expand Up @@ -81,21 +81,21 @@ const getYearStats = () => {
datasets: [
{
type: 'line',
label: 'pages read',
label: t('stats.pages_read'),
backgroundColor: '#3abff8',
borderColor: '#3abff8',
borderWidth: 2,
yAxisID: 'y2',
data: res.map(r => r.pageCount)
},
{
label: 'finished',
label: t('stats.finished'),
backgroundColor: '#bbbbbb',
yAxisID: 'y1',
data: res.map(r => r.finished)
},
{
label: 'dropped',
label: t('stats.dropped'),
backgroundColor: '#f87979',
yAxisID: 'y1',
data: res.map(r => r.dropped)
Expand Down
9 changes: 7 additions & 2 deletions src/jelu-ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@
"export_ok" : "Your export request has been saved. You can leave this page, the report will be available in the messages section.",
"export_ko" : "An error happened and you export request has probably not been registered.",
"import_help" : "First choose the type of file you want to import, then pick a file below and finally click the import button. Once the import is launched you can leave this page and go to the messages section.",
"import_ok" : "Your import request has been saved. You can leave this page, the import result will be available in the messages section."
"import_ok" : "Your import request has been saved. You can leave this page, the import result will be available in the messages section.",
"isbn_list" : "List of ISBN in a file"
},
"login" : {
"login" : "login",
Expand Down Expand Up @@ -305,7 +306,11 @@
"stats" : {
"all_time" : "All time stats",
"yearly_stats" : "Yearly stats",
"choose_year" : "Choose a year"
"choose_year" : "Choose a year",
"pages_read" : "pages read",
"finished" : "finished",
"dropped" : "dropped"

},
"history" : {
"years" : "years"
Expand Down

0 comments on commit ac37e6c

Please sign in to comment.