Commit graph

56861 commits

Author SHA1 Message Date
c5f598d874
Bug 39044: Pass budgets to template
This simply copies the fetch of budgets from the acqui/histsearch.pl script.

We should in the future make this a template or other method to avoid code duplication,
but we should fix the functionality first.

To test:
1 - Go to Acqusitions
2 - See the dropdown "Fund: All funds" in the order search section
3 - Click it
4 - Feel disappointed
5 - Apply patch and restart all
6 - Reload and click the dropdown
7 - Options! Feel warm and fuzzy

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-13 15:31:00 +01:00
58ec1ed304
Bug 39022: Display the current previous patron list before updating stored values
This patch just reverses the order so we display the list, then update it.

To test:
 1 - Enable showLastPatron system preference and set showLastPatronCount to 1
 2 - Go to a patron, say Ronnie Ballard
 3 - Note you have a link to 'Last patron' - hover or click split dropdown and see it is the patron you are viewing
 4 - Search for another patron, Edna Acosta
 5 - Note the 'Last patron' links point to Edna, and not Ronnie
 6 - Apply patch
 7 - Reload Edna, note last patron lists Edna
 8 - Search for Ronnie
 9 - Confirm previous patron is linked to Edna
10 - Click the link to go to Edna
11 - Confirm last patron now links to Ronnie
12 - Instead of following link, click on another tab for patron
13 - Now the link is updated to current patron, this was behaviour before 21246 as well
14 - Sign off.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-13 15:30:59 +01:00
7752b0e7cf
Bug 39132: Fix dbic: Revert changes to Schema.pm
It's autogenerated and checksum protected so should be touch only by
dbic.

JD amended patch: just the revert to Koha/Schema.pm here
Koha/Schema.pm will be skipped on bug 39115 (otherwise I will have to
rebase)
original title: Bug 39132: Fix dbic: Revert changes to Schema.pm and add it to denylist

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-13 15:30:59 +01:00
9cbc606697
Bug 38988: Make the polling use case be normal in about page
This patch makes choosing `polling` for the `JobsNotificationMethod`
system preference not be considered problematic or different than
`STOMP`.

To test:
1. In `KTD` make sure you have `STOMP` selected
2. Make sure rabbitmq is running:
   $ ktd --shell
  k$ sudo -s
   $ service rabbitmq-server start
3. Go to the about page, 'Server information'
=> SUCCESS: 'Using RabbitMQ' displayed
4. Stop rabbit
   $ service rabbitmq-server stop
5. Repeat 3
=> SUCCESS: Using Rabbit but fallback to polling
6. Go to the 'System information' tab
=> SUCCESS: Error message about the broker not functional
7. Choose 'polling'
8. Repeat 3
=> FAIL: It says 'Using SQL polling' but in bold face <.<
9. Repeat 6
=> FAIL: There's an error about the broker, which we explicitly asked
not to use <.<
10. Apply this patch
11. Repeat 3
=> SUCCESS: Nothing weird, 'Using SQL polling' displayed.
12. Repeat 6
=> SUCCESS: No weird error about the broker.
13. Switch to 'STOMP'
=> SUCCESS: Behavior is the same with/without rabbit running
14. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-13 15:30:58 +01:00
bf14a89382
Bug 39112: Force the response on a single line
We don't need an empty blank line.

Might not have been caused by the tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-13 15:30:58 +01:00
6e0b7413e9
Bug 39112: Fix item search results error
This patch updates the template which generates item search JSON (for
use by the DataTable) to add a 'collapse' FILTER around it. This
eliminates whitespace which causes the JSON to be invalid.

To test, apply the patch and perform an item search in the staff
interface. It should return results without error.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-13 15:30:57 +01:00
2ebf61c174
Bug 39126: tidy - Show error if stderr_buf is empty
If yarn is not installed:
Tidying file 1/1 (koha-tmpl/intranet-tmpl/prog/fr-FR/modules/intranet-main.tt)
Warning: something's wrong at misc/devel/tidy.pl line 79.

There is the error hidden in $error_message
open3: exec of yarn --silent run prettier --write koha-tmpl/intranet-tmpl/prog/fr-FR/modules/intranet-main.tt failed: No such file or directory

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-13 15:30:56 +01:00
796bfddf87
Bug 39056: Do not copy preferred_name to new patron when using Duplicate
It looks like this was a type/copy paste error, template fixed

To test:
1 - Find a patron, ensure preferred_name is populated
2 - Duplicate
3 - Note preferred_name is carried over
4 - Apply patch
5 - Cancel and duplicate again
6 - Preferred name is blank!

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 15:28:18 +01:00
Baptiste Wojtkowski
b65eb561e9
Bug 38847: Fix error when renewing an expired child patron without a guarantor
This fixes an internal server error when renewing an expired
child patron without a guarantor, when the ChildNeedsGuarantor
is set to "must have".

Test plan:
1. Create or edit a child patron:
   - Don't add a guarantor.
   - Set the "Expiry date" to a date in the past.
2. Set the ChildNeedsGuarantor system preference to "must have".
3. Refresh or view the patron's check out or details page, and
   select the "Renew" link under the attention heading -
   this generates an internal server error message.
4. Apply patch.
5. Repeat step 3, you will now get a standard error message
   "This patron could not be renewed: they need a guarantor."
6. Add a guarantor for the patron.
7. Repeat step 3, and click "Renew" - the patron is now renewed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 15:28:17 +01:00
9a1e7654e5
Bug 34971: (QA follow-up) Op is now cud-reopen
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 15:28:17 +01:00
Baptiste Wojtkowski
7298dc064f
Bug 34971: Fix permission to close a serial subscription (edit)
Note: there is a minor bug I had to correct, I don't split into two
patches since it is very minor and necessary to test that one.

Patch 1 - (this one) When a user is on serial collection information, the subscription is
not passed to the template, and therefore not passed to serials-toolbar.inc.
This makes sense if collection information is called with a biblionumber
but not if collection information is called with a subscription id.
Consequently, subscription.closed is always false and it is not possible
to reopen a basket.

Patch 2 - User with incorrect permission can close serials, they just
need to access to the page. This is due to serials-toolbar.inc expecting
a variable named "cannotedit", which is provided by
"subscription-details.pl" and not by "serials-collection.pl"

TEST PLAN:
Before applying patches :
1 - log in as a user with only receive_serial permission
2 - Open two pages one on
  /serials-collection.pl?subscriptionid=ID_A, another on
  /serials-collection.pl?subscriptionid=ID_B
3 - On serial A's collection page, check you can close the serial (wrong
  behaviour), note you can close it again but not reopen it
4 - Apply first patch
5 - Check you can reopen the serial (wrong behaviour) keep the page open
6 - On serial B's collection page, close the serial, keep the page open
7 - Apply second patch
8 - On page left open on 3 -, click on close, you are redirected to a
  login page.
8 - Go back to serial A's collection page -> there is no close button
  anymore
9 - On page left open on 4 -, click on reopen, you are redirected to a
  login page
10 - Go back to serial B's collection page -> there is no close button
  anymore

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 15:28:16 +01:00
Baptiste Wojtkowski
268d725eab
Bug 34971: Fix reopen button display on serial-collection
Patch 1 - (this one) When a user is on serial collection information, the subscription is
not passed to the template, and therefore not passed to serials-toolbar.inc.
This makes sense if collection information is called with a biblionumber
but not if collection information is called with a subscription id.
Consequently, subscription.closed is always false and it is not possible
to reopen a basket.

Patch 2 - User with incorrect permission can close serials, they just
need to access to the page. This is due to serials-toolbar.inc expecting
a variable named "cannotedit", which is provided by
"subscription-details.pl" and not by "serials-collection.pl"

TEST PLAN:
Before applying patches :
1 - log in as a user with only receive_serial permission
2 - Open two pages one on
  /serials-collection.pl?subscriptionid=ID_A, another on
  /serials-collection.pl?subscriptionid=ID_B
3 - On serial A's collection page, check you can close the serial (wrong
  behaviour), note you can close it again but not reopen it
4 - Apply first patch
5 - Check you can reopen the serial (wrong behaviour) keep the page open
6 - On serial B's collection page, close the serial, keep the page open
7 - Apply second patch
8 - On page left open on 3 -, click on close, you are redirected to a
  login page.
8 - Go back to serial A's collection page -> there is no close button
  anymore
9 - On page left open on 4 -, click on reopen, you are redirected to a
  login page
10 - Go back to serial B's collection page -> there is no close button
  anymore

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 15:28:16 +01:00
6a24b67031
Bug 39000: Restore bg-danger color
In ktd 369 will show the "Encoding error" block:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=369

The background color has changed this the bootstrap update and now looks
ugly.

This patch reuse the same color (#f2dede) we had before the upgrade

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 15:28:15 +01:00
a76a1f0073
Bug 38664: The auto-rebase script - Create parent directory if missing
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 12:12:16 +01:00
Hammat Wele
2f9b826a55
Bug 38892: Show correct error message when we attempt to add guarantor as a child
When we attempt to add child as guarantor the error message shown is 'A guarantor cannot be a guarantee.' it doesn't make sense

To recreate:
1. Go to Patrons
2. Click 'New patron' > 'Kid'
3. Fill out surname and cardnumber
4. Under Patron guarantor, click Add guarantor
5. Search for category = Kid and choose one of the patrons
6. Choose the relationship
7. Click 'Save'
   --> Error A guarantor cannot be a guarantee.
8. Apply the patch
9. repeat previous steps
10. After clicking Save
   --> the error message shown is «Child patron cannot be a guarantor.»

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-12 12:12:15 +01:00
86ea12f369
Bug 38664: Revert changes to errorpage.tt
This patch reverts the changes from bug 38718 made to errorpage.tt

It fixes Auth/csrf.ts cypress test, but most important restores the
correct UI on the error page when there is a CSRF error.

This was caused by the STOP from blocking_errors, that is introduced by
messages.inc included by main-container.inc
2025-02-12 07:05:51 +01:00
60c71484ba
Bug 38664: Fix updatedatabase.pl
This patch fixes the following error:
sort (...) interpreted as function at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 25950.

sort @words and sort { $a cmp $b } @words are functionally identical because
Perl's default sort behavior is string-wise ascending order (which is exactly
what { $a cmp $b } specifies).
2025-02-12 06:39:59 +01:00
a1d1d40155
Bug 38664: Add +x to xt/tt_tidy.t 2025-02-12 06:39:58 +01:00
6daf09496a
Bug 38664: Add a xt test for TT files 2025-02-11 23:39:26 +01:00
c3f94f3d54
Bug 38664: xt/find-missing-filters.t
I have NO idea why this has been caught by the tidy patch!
2025-02-11 22:31:29 +01:00
6836c428f4
Bug 38664: Fix xt/author/valid-templates.t
There was a missing END in basket/basket.tt (it should have been raised
by the tidy that something wrong happened, to investigate later)

The branch-selector change is a trick to make the test pass, or it fails
with:
  # undef error - WHILE loop terminated (> 1000 iterations)
2025-02-11 22:31:28 +01:00
bd3e07c756
Bug 38664: Revert changse made to t/db_dependent/misc/translator/sample.tt
We don't want to comment the whole block or it won't be parsed by the
translator tool.

This has been done initially to make the prettier plugin happy but it
didn't handle TT comments correctly. Now with version 2.0.2 it should be
better.

This patch fixes t/db_dependent/misc/translator/xgettext-tt2.t
2025-02-11 22:31:27 +01:00
cfec07a55b
Bug 38664: Update yarn.lock 2025-02-11 22:31:26 +01:00
70cbed2da9
Bug 38664: Bump the version of the prettier plugin
It improves the parsing of TT comments, as well as correctly supporting
prettier-ignore within TT comments
2025-02-11 22:31:25 +01:00
2b6598f01a
Bug 38664: prettier-ignore virtualshelves/tables/shelves_results.tt
You must have the version 2.0.2 of the prettier plugin!
2025-02-11 22:31:25 +01:00
58548ad0e6
Bug 38664: Revert changes for virtualshelves/tables/shelves_results.tt 2025-02-11 22:31:24 +01:00
aea905f704
Bug 38664: Fix the auto_rebase script
I had the tidy.pl script with correct +x permission during my testing
session. Now we retrieve it from main, write its content into a
temporary file. It does not have the +x bit.
2025-02-11 22:31:23 +01:00
93eda45a9e
Update debian/control
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:29 +01:00
e1615b250c
Bug 38664: Update yarn.lock
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:28 +01:00
a731f3c279
Bug 38664: Add Test::PerlTidy to the dependency list
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:28 +01:00
0c1d5faf3f
Bug 38664: Add @babel/core back to package.json
It's a dependency for prettier-plugin-template-toolkit

warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax@1.1.0" has unmet peer dependency "@babel/core@^7.0.0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-jest@29.7.0" has unmet peer dependency "@babel/core@^7.8.0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-jest@29.6.3" has unmet peer dependency "@babel/core@^7.0.0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-bigint@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-async-generators@7.8.4" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-class-properties@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-class-static-block@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-import-attributes@7.26.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-import-meta@7.10.4" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-logical-assignment-operators@7.10.4" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-json-strings@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-nullish-coalescing-operator@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-numeric-separator@7.10.4" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-optional-chaining@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-object-rest-spread@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-optional-catch-binding@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-private-property-in-object@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@koha-community/prettier-plugin-template-toolkit > babel-preset-current-node-syntax > @babel/plugin-syntax-top-level-await@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:27 +01:00
9a631e77a8
Bug 38664: Add Git::Wrapper to the dependency list
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:27 +01:00
fa10e13691
Bug 38664: Manual revert
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:26 +01:00
23370390b0
Bug 38664: Fix some tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:26 +01:00
8fb8590600
Bug 38664: (re)Tidy the .vue files - 'semi: true'
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:25 +01:00
aa24f1e6d1
Bug 38664: Treat .vue files like other JS files
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:25 +01:00
Koha Development Team
d659526b5a
Bug 38664: Tidy the whole codebase
This commit is generated using:
  % perl misc/devel/tidy.pl
*within* ktd, to get the same version of perltidy than what will be used
by our CI (currently v20230309).

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:24 +01:00
6e79bc2dd4
Bug 38664: prettier-ignore country-list.inc
Or everything will be on a single line

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:23 +01:00
a3c5620cc6
Bug 38664: The tidy script: remove blank line after SWITCH
The prettier plugin does not deal correctly with SWITCH
https://gitlab.com/koha-community/prettier-plugin-template-toolkit/-/issues/2

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:22 +01:00
616102740a
Bug 38664: The tidy script - Implement --no-write and --silent
To ease comparisons, from the QA script

Bug 38664: Fix perltidyrc option

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:22 +01:00
d8aae1ab89
Bug 38664: Ignore pre tag in merge-patrons.tt
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:21 +01:00
693b4dc0eb
Bug 38664: Use our own prettier plugin - @koha-community/prettier-plugin-template-toolkit
https://www.npmjs.com/package/@koha-community/prettier-plugin-template-toolkit

https://gitlab.com/koha-community/prettier-plugin-template-toolkit
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:21 +01:00
287cb328bc
Bug 38664: Move prettier options to .prettierrc.js
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:20 +01:00
c531081d86
Bug 38664: The auto-rebase script - use misc/devel/tidy.pl from the target branch
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:20 +01:00
9fe7434eaa
Bug 38664: Remove 'keep tidy' for JS files
We now want to check (almost) all JS files

On the tidy branch:
xt/js_tidy.t .. ok
All tests successful.
Files=1, Tests=175, 129 wallclock secs ( 0.07 usr  0.01 sys + 103.69 cusr 37.68 csys = 141.45 CPU)
Result: PASS

real    2m8.187s
user    1m43.806s
sys     0m37.730s

xt/vue_tidy.t .. ok
All tests successful.
Files=1, Tests=75, 60 wallclock secs ( 0.04 usr  0.01 sys + 53.80 cusr 17.22 csys = 71.07 CPU)
Result: PASS

real    1m0.137s
user    0m53.891s
sys     0m17.286s

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:19 +01:00
b9affd17cf
Bug 38664: htmlWhitespaceSensitivity: 'strict' - Whitespace (or the lack of it) around all tags is considered significant
https://prettier.io/docs/en/options.html#html-whitespace-sensitivity
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:19 +01:00
54cbdcc951
Bug 38664: Revert "Bug 38664: WIP trim msgid"
This reverts commit c54b476d80961f7d81f23c6be686309fed7ecbbc.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:18 +01:00
c00809a1c2
Bug 38664: WIP trim msgid
* Test the translation process
    * Confirm that the changes make sense
```
-                    <option value="r" selected="selected">Remote-sensing image</option>
+                    <option value="r" selected="selected">
+                        Remote-sensing image
+                    </option>
```
=> Generate
```
+#: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt:89
+#, fuzzy, c-format
+msgid "Remote-sensing image "
+msgstr "Image de télédétection"
```

Added a "trim" commit, and it actually fixes some problem with the current script:
```
+#. For the first occurrence,
 #. SCRIPT
-#: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt:114
+#: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt:139
 msgid "b- Large print"
 msgstr "b- Gros caractères"

-#. SCRIPT
-#: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_007.tt:114
-msgid "b- Large print "
-msgstr "b- Gros caractères "
```
Is that enough?

OR we modify prettier's default behaviour: https://prettier.io/docs/en/options.html#html-whitespace-sensitivity

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:18 +01:00
bb9d2284fb
Bug 38664: extend printWidth for template files
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:17 +01:00
a5fb573d99
Bug 38664: Adjust xt/perltidy.t
We want to test the files from the git index only

On my laptop:
real    3m54.692s
user    3m51.466s
sys     0m0.994s

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:17 +01:00