@@ -85,7 +85,7 @@ const initSettings = async () => {
8585}
8686
8787const checkDbVersion = async ( settings ) => {
88- globalStatus . status . value = 'Check collection'
88+ globalStatus . status . value = i18n . global . t ( 'Check collection' )
8989
9090 if ( settings . type !== 'OpenNumismat' ) {
9191 globalStatus . error . value = i18n . global . t ( 'wrong_version' ) ;
@@ -110,15 +110,15 @@ function MD5(d){var r = M(V(Y(X(d),8*d.length)));return r.toLowerCase()}function
110110
111111export function useService ( passwordDialogRef ) {
112112 const checkDbPassword = async ( settings ) => {
113- globalStatus . status . value = 'Check password'
113+ globalStatus . status . value = i18n . global . t ( 'Check password' )
114114
115115 if ( MD5 ( '' ) !== settings . password ) {
116116 const enteredPassword = await passwordDialogRef . value . promptPassword ( )
117117 if ( enteredPassword && MD5 ( enteredPassword ) === settings . password ) {
118118 return true
119119 }
120120 else {
121- globalStatus . error . value = 'Wrong password'
121+ globalStatus . error . value = i18n . global . t ( 'Wrong password' )
122122 return false
123123 }
124124 }
@@ -129,7 +129,7 @@ export function useService(passwordDialogRef) {
129129 const getServerFileList = async ( ) => {
130130 let serverFileList = [ ] ;
131131
132- await globalStatus . startLoading ( 'Connect to remote server' ) ;
132+ await globalStatus . startLoading ( i18n . global . t ( 'Connect to remote server' ) ) ;
133133
134134 try {
135135 const response = await api . get ( '/api/filelist' )
@@ -151,7 +151,7 @@ export function useService(passwordDialogRef) {
151151 let collectionFilters = { } ;
152152 let settingsDb = { } ;
153153
154- await globalStatus . startLoading ( 'Open collection' ) ;
154+ await globalStatus . startLoading ( i18n . global . t ( 'Open collection' ) ) ;
155155
156156 try {
157157 const responseSettings = await api . get ( '/api/settings' , { params : { f : file } } )
@@ -185,7 +185,7 @@ export function useService(passwordDialogRef) {
185185 }
186186 }
187187
188- await globalStatus . startLoading ( 'Load collection' ) ;
188+ await globalStatus . startLoading ( i18n . global . t ( 'Load collection' ) ) ;
189189
190190 try {
191191 const responseFilters = await api . get ( '/api/filters' , { params : { f : file } } )
@@ -277,7 +277,7 @@ export function useService(passwordDialogRef) {
277277 const loadCoinsRemote = async ( search , sortBy , reverse , statusFilter , countryFilter , seriesFilter , typeFilter , periodFilter , mintFilter , file ) => {
278278 let coinsList = [ ] ;
279279
280- await globalStatus . startLoading ( 'Load coins' ) ;
280+ await globalStatus . startLoading ( i18n . global . t ( 'Load coins' ) ) ;
281281
282282 try {
283283 const responseCoins = await api . get ( '/api/coins' , { params : {
@@ -474,7 +474,7 @@ export function useService(passwordDialogRef) {
474474 const getDetailsRemote = async ( coinId , file ) => {
475475 let coinData = [ ] ;
476476
477- await globalStatus . startLoading ( 'Request' ) ;
477+ await globalStatus . startLoading ( i18n . global . t ( 'Request' ) ) ;
478478
479479 try {
480480 const response = await api . get ( '/api/coin_data' , { params : { f : file , id : coinId } } )
@@ -491,7 +491,7 @@ export function useService(passwordDialogRef) {
491491 }
492492
493493 const getDetailsLocal = async ( coinId ) => {
494- let coinData = [ ] ;
494+ let coinData ;
495495
496496 const sql = `SELECT ${ infoFields . join ( ',' ) } FROM coins
497497 LEFT JOIN photos AS obverseimg ON coins.obverseimg = obverseimg.id
@@ -513,7 +513,7 @@ export function useService(passwordDialogRef) {
513513 const getPhotosRemote = async ( coinId , file ) => {
514514 let photos = [ ] ;
515515
516- await globalStatus . startLoading ( 'Request' ) ;
516+ await globalStatus . startLoading ( i18n . global . t ( 'Request' ) ) ;
517517
518518 try {
519519 const response = await api . get ( '/api/photos' , { params : { f : file , id : coinId } } )
@@ -530,7 +530,7 @@ export function useService(passwordDialogRef) {
530530 }
531531
532532 const getPhotosLocal = async ( coinId ) => {
533- let photos = [ ] ;
533+ let photos ;
534534
535535 const sql = `SELECT obverseimg.image, reverseimg.image, edgeimg.image, photo1.image, photo2.image, photo3.image, photo4.image FROM coins
536536 LEFT JOIN photos AS obverseimg ON coins.obverseimg = obverseimg.id
@@ -561,7 +561,7 @@ export function useService(passwordDialogRef) {
561561 const getSummaryRemote = async ( file ) => {
562562 let summary = { } ;
563563
564- await globalStatus . startLoading ( 'Request' ) ;
564+ await globalStatus . startLoading ( i18n . global . t ( 'Request' ) ) ;
565565
566566 try {
567567 const response = await api . get ( '/api/summary' , { params : { f : file } } )
0 commit comments