https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39202

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Jonathan Druart <[email protected]> ---
> 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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to