Koha/misc
Jonathan Druart b9258aa903 Bug 35043: Use Locale::PO->quote
We have our own "quote_po" sub that is stating that Locale::PO::quote
is buggy because it does not deal with quoting new lines correctly.
However it seems that it is fixed now.

Ideally we could use Locale::PO::quote everywhere, but it does not
escape tab characters:
  $string =~ s/\\(?!t)/\\\\/g;           # \t is a tab

This means the following:
msgid "Tabulation (\\t)"
msgstr "Tabulation (\\t)"
become:
-msgid "Tabulation (\t)"
-msgstr "Tabulation (\t)"

And we are seeing the following on Weblate:
https://snipboard.io/BjQmDC.jpg

Note that Locale::PO has not been updated since 2014...

The real problem behind this is that we have 2 methods to quote strings.
At first glance it seems that Locale::PO::quote was not used before, but
with the introduction of the koha-i18n project we will have scripts that
will use Locale::PO->save_file_fromarray, which uses Locale::PO->quote
=> Those scripts will be used on the translation server for post
processing (security reason, marking potential XSS strings as fuzzy).

Test plan:
0. Do not apply the patch
1. gulp po:update --lang LANG # Replace LANG with your favorite language
   code
2. git commit -a -m"init PO files"
3. Apply this patch
4. Repeate 1.
5. git diff
   => The change is about the "Tabulation" and "New line" strings from
      tools/csv-profiles.tt
6. Translate them (replace the \t and \n with %s) and remove the fuzzy
   flag
7. install the template: cd misc/translator && perl translate install
   LANG
8. Enable the language, use it and go to the "Nouveau profil CSV" view
   => Notice that the \t and \n are correctly displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2023-11-08 11:00:50 +01:00
..
admin
bin
cronjobs Bug 35171: (QA follow-up): tidy up POD 2023-11-07 22:42:43 -10:00
devel
interface_customization
maintenance Bug 34505: Patron invalid age in search_for_data_inconsistencies.pl skip expired patrons 2023-08-29 21:17:00 -10:00
migration_tools Bug 32800: Don't embed items for deleted records 2023-04-12 09:26:50 -03:00
release_notes Bug 34954: Fixed typo to 'dateexpiry' 2023-11-07 21:12:40 -10:00
search_tools
translator Bug 35043: Use Locale::PO->quote 2023-11-08 11:00:50 +01:00
workers Bug 35111: Ignore SIGPIPE in background jobs worker 2023-11-02 10:30:01 -10:00
add_date_fields_to_marc_records.pl Bug 23924: Reset the fields to add 2023-05-05 12:13:53 -03:00
add_statistics_borrowers_categorycode.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl
commit_file.pl Bug 15869: Change framework on overlay 2023-02-07 10:32:22 -03:00
export_borrowers.pl
export_records.pl Bug 29811: Add timestamp option on authority record type 2023-11-07 22:20:45 -10:00
exportauth.pl
import_patrons.pl Bug 34743: Fix POD description 2023-09-17 22:19:10 -10:00
koha-install-log
link_bibs_to_authorities.pl Bug 35141: (QA follow-up) Increment the bad count 2023-11-07 21:37:57 -10:00
load_yaml.pl
mod_zebraqueue.pl
perlmodule_ls.pl
perlmodule_rm.pl
process_ill_updates.pl
recreateIssueStatistics.pl
sax_parser_print.pl
sax_parser_test.pl
sip_cli_emulator.pl Bug 34764: Set fee_acknowledged to expect a string 2023-09-17 21:39:02 -10:00
stage_file.pl
z3950_responder.pl