* 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>
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>
It seems that File::Slurp::edit_file is not thread safe?
Not sure what's happening here but I end up with corrupted file, or
getting the same error "write_file: No such file or directory"
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
There was a race condition, edit_file trying to open it while it was not
fully written by prettier (?) This is a dirty fix but it seems to do the
trick.
The error was:
edit_file 'koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc' - write_file: No such file or directory at misc/devel/tidy.pl line 149.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
For an unknown reason the script is not idempotent (!)
Decided to run it twice for now, and have a look at this problem later.
It might be related to the length of the line
Version 0
<div>
<div class="page-section clearfix">
<div class="listgroup">
<h4>
<span>Statuses</span>
[% IF foo %]
[% IF ( ITEM_DAT.withdrawn ) %]<span>Withdrawn</span>[% END %]
[% IF ITEM_DAT.bookable == 1 %] Yes [% ELSIF ITEM_DAT.bookable == 0 %] No [% ELSE %] Follow item type [% END %]
[% IF ITEM_DAT.bookable == 1 %] [% t('Yes') %] [% ELSIF ITEM_DAT.bookable == 0 %] [% t('No') %] [% ELSE %] [% t('Follow item type') %] [% END %]
[% END %]
</h4>
</div>
</div>
</div>
Version 1
<div>
<div class="page-section clearfix">
<div class="listgroup">
<h4>
<span>Statuses</span>
[% IF foo %]
[% IF ( ITEM_DAT.withdrawn ) %]<span
>Withdrawn</span
>[% END %]
[% IF ITEM_DAT.bookable == 1 %]Yes[% ELSIF ITEM_DAT.bookable == 0 %]No[% ELSE %]Follow
item type[% END %]
[% IF ITEM_DAT.bookable == 1 %][% t('Yes') %][% ELSIF ITEM_DAT.bookable == 0 %][% t('No') %][% ELSE %][% t('Follow item type') %][% END %]
[% END %]
</h4>
</div>
</div>
</div>
Version 2
div>
<div class="page-section clearfix">
<div class="listgroup">
<h4>
<span>Statuses</span>
[% IF foo %]
[% IF ( ITEM_DAT.withdrawn ) %]
<span>Withdrawn</span>
[% END %]
[% IF ITEM_DAT.bookable == 1 %]
Yes
[% ELSIF ITEM_DAT.bookable == 0 %]
No
[% ELSE %]
Follow item type
[% END %]
[% IF ITEM_DAT.bookable == 1 %][% t('Yes') %][% ELSIF ITEM_DAT.bookable == 0 %][% t('No') %][% ELSE %][% t('Follow item type') %][% END %]
[% END %]
</h4>
</div>
</div>
</div>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Finally got an error with the translation script:
$ gulp po:update --lang fr-FR --task opac-bootstrap
[13:05:23] Using gulpfile /kohadevbox/koha/gulpfile.js
[13:05:23] Starting 'po:update'...
[13:05:23] Starting 'po_update_opac'...
[13:05:24] 'po_update_opac' errored after 975 ms
[13:05:24] Error: Command failed: misc/translator/xgettext.pl --charset=UTF-8 -F -o /tmp/koha-6wJN1E/Koha-opac-bootstrap.pot -f /tmp/koha-6wJN1E/files
Can't use an undefined value as a HASH reference at misc/translator/xgettext.pl line 131, <$INPUT> line 122.
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at ChildProcess.emit (node:domain:552:15)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:303:5)
at Process.callbackTrampoline (node:internal/async_hooks:128:17)
[13:05:24] 'po:update' errored after 980 ms
The problem is coming from the '>' within the TT condition.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Also pass "wide_full" parameter to main-container.inc
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Small UI change here but I think it makes sense.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>