Bugzilla – Attachment 166571 Details for
Bug 34788
Add the ability to import KBART files to ERM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34788: (follow-up): Fix translations
Bug-34788-follow-up-Fix-translations.patch (text/plain), 8.21 KB, created by
Matt Blenkinsop
on 2024-05-10 14:16:15 UTC
(
hide
)
Description:
Bug 34788: (follow-up): Fix translations
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-05-10 14:16:15 UTC
Size:
8.21 KB
patch
obsolete
>From cd532f1282b8142730aba9e7b39daf69eac7041f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Fri, 10 May 2024 14:14:54 +0000 >Subject: [PATCH] Bug 34788: (follow-up): Fix translations > >--- > Koha/BackgroundJob/ImportKBARTFile.pm | 6 +-- > .../import_from_kbart_file.inc | 10 ++-- > .../ERM/EHoldingsLocalTitlesKBARTImport.vue | 47 ++++++++++--------- > 3 files changed, 34 insertions(+), 29 deletions(-) > >diff --git a/Koha/BackgroundJob/ImportKBARTFile.pm b/Koha/BackgroundJob/ImportKBARTFile.pm >index de9d9606ba..d17dcf502f 100644 >--- a/Koha/BackgroundJob/ImportKBARTFile.pm >+++ b/Koha/BackgroundJob/ImportKBARTFile.pm >@@ -85,9 +85,8 @@ sub process { > > if ( scalar( @{$rows} ) == 0 ) { > push @messages, { >- code => 'job_failed', >+ code => 'no_rows', > type => 'error', >- error_message => 'No valid rows were found in this file. Please check the file formatting.', > }; > $self->status('failed')->store; > } >@@ -115,9 +114,8 @@ sub process { > my $formatted_title = format_title($new_title); > if ( !$formatted_title->{publication_title} ) { > push @messages, { >- code => 'title_failed', >+ code => 'no_title_found', > type => 'error', >- error_message => "No publication_title found for title_id: ", > title => '(Unknown)', > title_id => $formatted_title->{external_id} > }; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/import_from_kbart_file.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/import_from_kbart_file.inc >index 04032e0f43..2cc00b2002 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/import_from_kbart_file.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background_jobs/import_from_kbart_file.inc >@@ -28,7 +28,7 @@ > <td>[% report.failed_imports | html %]</td> > </tr> > </table> >- <a href="/cgi-bin/koha/erm/eholdings/local/packages/[% report.package_id | $raw %]">Click here to see the package</a> >+ <a href="/cgi-bin/koha/erm/eholdings/local/packages/[% report.package_id | $raw %]">Package</a> > [% ELSIF job.status == 'started' %] > <p id="jobactionlabel"></p> > [% END %] >@@ -57,10 +57,12 @@ > [% SWITCH m.code %] > [% CASE 'title_already_exists' %] > <span><strong>[% m.title | html %]</strong> already exists and was not created.</span> >+ [% CASE 'no_title_found' %] >+ <span><strong>Title [% m.title_id | html %]</strong> did not have a publication title and was not imported.</span> > [% CASE 'title_failed' %] >- <span><strong>[% m.title | html %]</strong> failed to import - [% m.error_message | html %][% IF m.title_id %][% m.title_id | html %][% END %]</span> >- [% CASE 'job_failed' %] >- <span>Job failed - [% m.error_message | html %]</span> >+ <span><strong>Title [% m.title_id | html %]</strong> failed to import with the following error: [% m.error_message | html %]</span> >+ [% CASE 'no_rows' %] >+ <span>No valid rows were found in this file. Please check the file formatting.</span> > [% END %] > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesKBARTImport.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesKBARTImport.vue >index cc18bb1d18..22b275da86 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesKBARTImport.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesKBARTImport.vue >@@ -12,8 +12,8 @@ > ) > }} > <ol> >- <li>Column headings row</li> >- <li>Title data row</li> >+ <li>{{ $__("Column headings row") }}</li> >+ <li>{{ $__("Title data row") }}</li> > </ol> > </li> > </ul> >@@ -141,36 +141,41 @@ export default { > let message = "" > if (success.job_ids) { > if (success.job_ids.length > 1) { >- message += this.$__( >- "<p style='font-weight: normal; font-size: medium; margin-top: 1em;'>Your file was too large to process in one job, the file has been split into %s jobs to meet the maximum size limits.</p>" >- ).format(success.job_ids.length) >+ message += `<p style='font-weight: normal; font-size: medium; margin-top: 1em;'>${this.$__( >+ "Your file was too large to process in one job, the file has been split into %s jobs to meet the maximum size limits." >+ ).format(success.job_ids.length)}</p>` > } > success.job_ids.forEach((job, i) => { >- message += this.$__( >- '<li>Job %s for uploaded file has been queued, <a href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=%s" target="_blank">click here</a> to check its progress.</li>' >- ).format(i + 1, job) >+ message += `<li>${this.$__( >+ "Job %s for uploaded file has been queued" >+ ).format( >+ i + 1, >+ job >+ )}, <a href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=%s" target="_blank">${this.$__( >+ "see progress" >+ )}</a></li>` > }) > this.setMessage(message, true) > } > if (success.warnings.invalid_columns) { >- message += this.$__( >- "<p style='font-weight: normal; font-size: medium; margin-top: 1em;'>Information:</p>" >- ) >- message += this.$__( >- "<p>Additional columns were detected in your report, please see the list below:</p>" >- ) >+ message += `<p style='font-weight: normal; font-size: medium; margin-top: 1em;'>${this.$__( >+ "Information:" >+ )}</p>` >+ message += `<p>${this.$__( >+ "Additional columns were detected in your report, please see the list below:" >+ )}</p>` > success.warnings.invalid_columns.forEach(column => { >- message += this.$__(`<li>%s</li>`).format(column) >+ message += `<li>${column}</li>` > }) >- message += this.$__( >- "<p style='margin-top: 0.1em;'>The data in these columns will not be imported.</p>" >- ) >+ message += `<p style='margin-top: 0.1em;'>${this.$__( >+ "The data in these columns will not be imported." >+ )}</p>` > this.setMessage(message, true) > } > if (success.invalid_filetype) { >- message += this.$__( >- "<p>The file must be in .tsv or .csv format, please convert your file and try again.</p>" >- ) >+ message += `<p>${this.$__( >+ "The file must be in .tsv or .csv format, please convert your file and try again." >+ )}</p>` > setWarning(message) > } > }, >-- >2.37.1 (Apple Git-137.1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34788
:
161379
|
161380
|
161381
|
161382
|
161383
|
161384
|
161391
|
165189
|
165190
|
165191
|
165192
|
165193
|
165194
|
165195
|
165196
|
165197
|
165837
|
165887
|
165888
|
165889
|
165890
|
165891
|
165892
|
165893
|
165894
|
166420
|
166433
|
166434
|
166435
|
166436
|
166437
|
166438
|
166439
|
166440
|
166441
| 166571 |
166645