4 Mar
2025
4 Mar
'25
11:07 a.m.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39202
Jonathan Druart <jonathan.druart@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jonathan.druart@gmail.com
--- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> ---
> I suspect we don't want this.
I want this. At least we wanted it during the "tidy all".
It has been advertised and explained during the work, and is in the document
https://koha-hedgedoc.servers.llownd.net/Bug-38664_Tidy-the-whole-codebase,
section "The translation process".
After the tidy we have:
```
- <option value="r" selected="selected">Remote-sensing
image</option>
+ <option value="r" selected="selected">
+ Remote-sensing image
+ </option>
```
It will generate the following changes in the .po files:
```
+#:
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"
```
I have tried to fix this in the translation script, see commit "WIP trim
msgid". 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 "
```
Was it enough?
No it was not, we were loosing important spaces in some places.
SOLUTION - we modified prettier's default behaviour:
https://prettier.io/docs/en/options.html#html-whitespace-sensitivity
Using "htmlWhitespaceSensitivity: 'strict'" in `.prettierrc.js` fixes the
problem by splitting the tags themselves
```
+ [% IF m.version == ( mm.version )
%]
+ <ul
+
><li><strong>Mentor:</strong> [% INCLUDE person p=mm %]</li></ul
+ >
+ [% END %]
```
So we don't always need to split the tags. We could manually fix, but it needs
to be done on a case-by-case basis.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.