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>
This commit is contained in:
Jonathan Druart 2025-01-09 22:47:53 +01:00 committed by Katrin Fischer
parent bb9d2284fb
commit c00809a1c2
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ sub string_canon {
my $s = shift;
# Fold all whitespace into single blanks
$s =~ s/\s+/ /g;
$s =~ s/^\s+//g;
$s =~ s/^\s+|\s+$//g;
return $s;
}