88 type TranslationFile ,
99 type TranslationData ,
1010} from ' ~/components/Translation/Table.vue'
11- import type { LanguageWithData } from ' ~/modules/get-info-from-parent'
11+ import type { LanguageWithData } from ' ~~ /modules/get-info-from-parent'
1212
1313interface RawTranslationFile {
1414 fileName: string
@@ -60,12 +60,12 @@ const {
6060 const originalLanguage = await fetchTranslationFiles (props .originalLanguage )
6161 const translation = await fetchTranslationFiles (props .language )
6262 for (const fileName in originalLanguage ) {
63- const rawTranslationFile = originalLanguage [fileName ]
63+ const rawTranslationFile = originalLanguage [fileName ]!
6464 const data: TranslationData = {}
6565 for (const key in rawTranslationFile .data ) {
6666 data [key ] = {
6767 key: key ,
68- originalValue: rawTranslationFile .data [key ],
68+ originalValue: rawTranslationFile .data [key ]! ,
6969 translatedValue: translation [fileName ]?.data [key ] ?? ' ' ,
7070 }
7171 }
@@ -109,10 +109,10 @@ const load = (index: number) => {
109109 const content = event .target ?.result ?.toString ()
110110 if (content && files .value ) {
111111 try {
112- const currentData = files .value [index ].data
112+ const currentData = files .value [index ]! .data
113113 const data = fromJson (content , (key : string ) => currentData [key ]?.originalValue )
114- files .value [index ].data = data
115- files .value [index ].complete = checkComplete (data )
114+ files .value [index ]! .data = data
115+ files .value [index ]! .complete = checkComplete (data )
116116 }
117117 catch (ex ) {
118118 console .error (ex )
@@ -131,7 +131,7 @@ const download = (index: number) => {
131131 if (! files .value ) {
132132 return
133133 }
134- const translationFile = files .value [index ]
134+ const translationFile = files .value [index ]!
135135 const element = document .createElement (' a' )
136136 element .setAttribute (' href' , ' data:application/json;charset=utf-8,' + encodeURIComponent (generateJson (translationFile .data )))
137137 element .setAttribute (' download' , translationFile .fileName )
@@ -191,7 +191,7 @@ const download = (index: number) => {
191191 <b-button
192192 class =" w-100 w-md-auto"
193193 variant =" primary"
194- :disabled =" !files[index].complete"
194+ :disabled =" !files[index]! .complete"
195195 @click =" openTranslationModal(files[index])"
196196 >
197197 <icon name =" bi:check-lg" />
0 commit comments