@@ -56,8 +56,8 @@ const visibleErrorCount = ref(ERROR_PREVIEW_COUNT)
5656const visibleWarningCount = ref (ERROR_PREVIEW_COUNT )
5757const existingUsersOption = ref <' skip' | ' update' >(' skip' )
5858const importTypeOptions = computed <RadioOption []>(() => [
59- { id: ' skip' , label: t (' users.import_type_skip' ) },
60- { id: ' update' , label: t (' users.import_type_overwrite' ) },
59+ { id: ' skip' , label: t (' import. users.import_type_skip' ) },
60+ { id: ' update' , label: t (' import. users.import_type_overwrite' ) },
6161])
6262
6363const errorRows = computed (
@@ -127,16 +127,17 @@ const {
127127 setTimeout (() => {
128128 const resultParts: string [] = []
129129 if (data .created > 0 )
130- resultParts .push (t (' users .import_result_created' , { count: data .created }))
130+ resultParts .push (t (' import .import_result_created' , { count: data .created }))
131131 if (data .updated > 0 )
132- resultParts .push (t (' users .import_result_updated' , { count: data .updated }))
132+ resultParts .push (t (' import .import_result_updated' , { count: data .updated }))
133133 if (data .skipped > 0 )
134- resultParts .push (t (' users.import_result_skipped' , { count: data .skipped }))
135- if (data .failed > 0 ) resultParts .push (t (' users.import_result_failed' , { count: data .failed }))
134+ resultParts .push (t (' import.import_result_skipped' , { count: data .skipped }))
135+ if (data .failed > 0 )
136+ resultParts .push (t (' import.import_result_failed' , { count: data .failed }))
136137
137138 notificationsStore .createNotification ({
138139 kind: ' success' ,
139- title: t (' users.users_imported' ),
140+ title: t (' import. users.users_imported' ),
140141 description: capitalize (resultParts .join (' , ' )),
141142 })
142143 }, 500 )
@@ -228,12 +229,12 @@ function onValidate() {
228229 fileValidationError .value = ' '
229230
230231 if (! csvFile .value ) {
231- fileValidationError .value = t (' users .import_no_file_selected' )
232+ fileValidationError .value = t (' import .import_no_file_selected' )
232233 return
233234 }
234235
235236 if (! csvFile .value .name .endsWith (' .csv' ) && csvFile .value .type !== ' text/csv' ) {
236- fileValidationError .value = t (' users .import_file_must_be_csv' )
237+ fileValidationError .value = t (' import .import_file_must_be_csv' )
237238 return
238239 }
239240
@@ -262,22 +263,22 @@ function errorSummaryText(row: ImportRow): string {
262263 return t (' users.import_row_and_name' , { row_number: row .row_number , name })
263264 }
264265 const params = formatErrorParams (issue )
265- const message = t (` users .import_error_${issue .field }_${issue .message }` , params )
266- return t (' users .import_row_and_message' , { row_number: row .row_number , name , message })
266+ const message = t (` import .import_error_${issue .field }_${issue .message }` , params )
267+ return t (' import .import_row_and_message' , { row_number: row .row_number , name , message })
267268}
268269 </script >
269270
270271<template >
271272 <NeModal
272273 :visible =" isShown "
273274 :size =" step === ' preview' ? ' xxl' : ' md' "
274- :title =" $t (' users.import_users' )"
275+ :title =" $t (' import. users.import_users' )"
275276 :close-aria-label =" $t (' common.close' )"
276277 :cancel-label =" $t (' common.cancel' )"
277278 :primary-label ="
278279 step === ' upload'
279- ? $t (' users.import_validate ' )
280- : $t (' users.import_confirm' , { count: importCount })
280+ ? $t (' import.validate ' )
281+ : $t (' import. users.import_confirm' , { count: importCount })
281282 "
282283 :primary-button-disabled ="
283284 step === ' upload' ? validateLoading : confirmLoading || importCount === 0
@@ -291,20 +292,22 @@ function errorSummaryText(row: ImportRow): string {
291292 >
292293 <!-- ===== STEP 1: UPLOAD ===== -->
293294 <div v-if =" step === 'upload'" class =" space-y-6" >
294- <p class =" text-sm text-gray-500 dark:text-gray-400" >{{ $t('users.import_description') }}</p >
295+ <p class =" text-sm text-gray-500 dark:text-gray-400" >
296+ {{ $t('import.users.import_description') }}
297+ </p >
295298 <div class =" space-y-1.5" >
296299 <NeFileInput
297300 ref="fileInputRef"
298301 v-model =" csvFile "
299- :label =" $t (' users .import_file_label' )"
302+ :label =" $t (' import .import_file_label' )"
300303 :dropzone-label =" $t (' ne_file_input.drag_and_drop_or_click_to_upload' )"
301304 :invalid-message =" fileValidationError "
302305 accept=".csv ,text/csv"
303306 :disabled =" validateLoading "
304307 @select =" onFileSelect "
305308 />
306309 <i18n-t
307- keypath =" users .import_to_get_started"
310+ keypath =" import .import_to_get_started"
308311 tag =" p"
309312 class =" text-gray-500 dark:text-gray-400"
310313 >
@@ -315,26 +318,26 @@ function errorSummaryText(row: ImportRow): string {
315318 :disabled =" downloadingTemplate"
316319 @click =" downloadTemplate"
317320 >
318- {{ $t('users .download_the_template') }}
321+ {{ $t('import .download_the_template') }}
319322 </button >
320323 </template >
321324 </i18n-t >
322325 </div >
323326 <NeInlineNotification
324327 v-if =" validateError "
325328 kind="error"
326- :title =" $t (' users .import_validation_failed' )"
329+ :title =" $t (' import .import_validation_failed' )"
327330 >
328331 <template #description >
329- <i18n-t keypath =" users .import_validation_error_message" tag =" p" >
332+ <i18n-t keypath =" import .import_validation_error_message" tag =" p" >
330333 <template #link >
331334 <button
332335 type =" button"
333336 class =" underline hover:text-rose-800 dark:hover:text-rose-50"
334337 :disabled =" downloadingTemplate"
335338 @click =" downloadTemplate"
336339 >
337- {{ $t('users .download_the_template_lc') }}
340+ {{ $t('import .download_the_template_lc') }}
338341 </button >
339342 </template >
340343 </i18n-t >
@@ -351,38 +354,44 @@ function errorSummaryText(row: ImportRow): string {
351354 <NeRadioSelection
352355 v-model =" existingUsersOption "
353356 :options =" importTypeOptions "
354- :label =" $t (' users.import_existing_users_label' )"
357+ :label =" $t (' import. users.import_existing_users_label' )"
355358 >
356359 <template #tooltip >
357360 <NeTooltip >
358361 <template #content >
359- {{ $t('users.import_existing_users_tooltip') }}
362+ {{ $t('import. users.import_existing_users_tooltip') }}
360363 </template >
361364 </NeTooltip >
362365 </template >
363366 </NeRadioSelection >
364367
365368 <!-- summary -->
366369 <div class =" text-sm text-gray-600 dark:text-gray-300" >
367- <NeFormItemLabel >{{ $t('users.import_summary') }}</NeFormItemLabel >
368- <p >{{ $t('users.import_summary_detected', { count: validationResult.total_rows }) }}</p >
370+ <NeFormItemLabel >{{ $t('import.users.import_summary') }}</NeFormItemLabel >
371+ <p >
372+ {{ $t('import.users.import_summary_detected', { count: validationResult.total_rows }) }}
373+ </p >
369374 <ul class =" mt-1 ml-5 list-disc space-y-0.5" >
370- <li >{{ $t('users.import_summary_valid', { count: validationResult.valid_rows }) }}</li >
375+ <li >
376+ {{ $t('import.users.import_summary_valid', { count: validationResult.valid_rows }) }}
377+ </li >
371378 <li
372379 v-if =" validationResult.error_rows + validationResult.ambiguous_rows > 0"
373380 class =" text-rose-700 dark:text-rose-500"
374381 >
375382 {{
376- $t('users.import_summary_errors', {
383+ $t('import. users.import_summary_errors', {
377384 count: validationResult.error_rows + validationResult.ambiguous_rows,
378385 })
379386 }}
380387 </li >
381388 <li v-if =" validationResult.warning_rows > 0" class =" text-amber-700 dark:text-amber-500" >
382389 {{
383390 existingUsersOption === 'skip'
384- ? $t('users.import_summary_warnings_skip', { count: validationResult.warning_rows })
385- : $t('users.import_summary_warnings_update', {
391+ ? $t('import.users.import_summary_warnings_skip', {
392+ count: validationResult.warning_rows,
393+ })
394+ : $t('import.users.import_summary_warnings_update', {
386395 count: validationResult.warning_rows,
387396 })
388397 }}
@@ -394,7 +403,7 @@ function errorSummaryText(row: ImportRow): string {
394403 <NeInlineNotification
395404 v-if =" errorRows .length > 0 "
396405 kind="error"
397- :title =" $t (' users.import_rows_with_errors' , { count: errorRows .length })"
406+ :title =" $t (' import. users.import_rows_with_errors' , { count: errorRows .length })"
398407 >
399408 <template #description >
400409 <ul class =" ml-4 list-disc space-y-0.5" >
@@ -419,8 +428,8 @@ function errorSummaryText(row: ImportRow): string {
419428 kind="warning"
420429 :title ="
421430 existingUsersOption === ' skip'
422- ? $t (' users.import_rows_with_warnings_skip' , { count: warningRows .length })
423- : $t (' users.import_rows_with_warnings_update' , { count: warningRows .length })
431+ ? $t (' import. users.import_rows_with_warnings_skip' , { count: warningRows .length })
432+ : $t (' import. users.import_rows_with_warnings_update' , { count: warningRows .length })
424433 "
425434 >
426435 <template #description >
@@ -444,7 +453,7 @@ function errorSummaryText(row: ImportRow): string {
444453 <NeInlineNotification
445454 v-if =" confirmError "
446455 kind="error"
447- :title =" $t (' users.import_confirm_failed' )"
456+ :title =" $t (' import. users.import_confirm_failed' )"
448457 :description =" (confirmError as Error ).message "
449458 />
450459 </div >
0 commit comments