Bug 28149

Summary: Improve internationalization and formatting on background jobs page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jamespfk, jonathan.druart, kyle, testopia
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26080
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.04
Circulation function:
Bug Depends on: 27277    
Bug Blocks:    
Attachments: Bug 28149: Improve internationalization and formatting on background jobs page
Bug 28149: Improve internationalization and formatting on background jobs page
Bug 28149: (follow-up) Add string for job status "new"
Bug 28149: Improve internationalization and formatting on background jobs page
Bug 28149: (follow-up) Add string for job status "new"
Bug 28149: Improve internationalization and formatting on background jobs page
Bug 28149: (follow-up) Add string for job status "new"

Description Owen Leonard 2021-04-14 17:49:57 UTC
On the background jobs page, English strings are passed from the script and output directly to the template. These need to be handled in a way that is translatable.

Also, dates should be output according to the dateformat system preference.
Comment 1 Owen Leonard 2021-04-14 18:24:00 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2021-08-09 20:53:13 UTC
I'd like to sign this one but it does not apply anymore because of changes on breadcrumbs.
Comment 3 Owen Leonard 2021-08-10 11:11:39 UTC Comment hidden (obsolete)
Comment 4 Fridolin Somers 2021-08-17 05:33:24 UTC
It looks great.
Just missing the job status "new".
It appears when job is added with koha-worker stopped.
Comment 5 Owen Leonard 2021-08-17 10:19:33 UTC Comment hidden (obsolete)
Comment 6 Fridolin Somers 2021-08-19 23:22:29 UTC Comment hidden (obsolete)
Comment 7 Fridolin Somers 2021-08-19 23:22:46 UTC
Created attachment 123984 [details] [review]
Bug 28149: (follow-up) Add string for job status "new"

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 8 Joonas Kylmälä 2021-09-05 14:35:13 UTC
Created attachment 124517 [details] [review]
Bug 28149: Improve internationalization and formatting on background jobs page

This patch adds some logic to the background jobs template in order to
make job status and job type translatable. Output of dates has been
changed to use the KohaDates plugin, using the "with_hours" flag.

This patch also modifies the page title and breadcrumbs so that if one
is viewing the details of a background job the page title and
breadcrumbs reflect this.

I've also added inclusion of the preferences search form in the header,
the default for administration pages which don't have their own search.

To test, apply the patch and go to Administration -> Background jobs.

 - If there are no background jobs listed, submit at least one batch of
   bibliograhpic records and at least one batch of authorty records for
   modification (Tools -> Batch record modification).
   - In the table of background jobs, the status should be shown
     correctly. If you see it capitalized ("Finished") you're seeing the
     new string in the template which will be used for translation.
   - In the "Type" column, you should see either "Batch authority record
     modification" or "Batch bibliographic record modification"
   - In the "Queued," "Started," and "Ended" columns the date should be
     formatted according to your system's dateformat system preference,
     including the time.
  - View the details of a background job. The same changes to status and
    type should be seen on this page, as well as the date formatting of
    the date fields.
    - In the breadcrumbs, confirm that it shows a link to the
      background jobs page followed by "Details if job #X".

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 9 Joonas Kylmälä 2021-09-05 14:35:17 UTC
Created attachment 124518 [details] [review]
Bug 28149: (follow-up) Add string for job status "new"

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 10 Jonathan Druart 2021-09-09 09:00:44 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 11 Kyle M Hall (khall) 2021-09-10 12:21:06 UTC
Pushed to 21.05.x for 21.05.04
Comment 12 Fridolin Somers 2021-09-16 08:01:50 UTC
Does not apply easily on 20.11.x