Go to file
Julian Maurice 3cfc2ec7bd Bug 25067: Move PO file manipulation code into gulp tasks
misc/translator/translate was doing three different things:
- extract translatable strings
- create or update PO files
- install translated templates

This patch separates responsibilities by moving the string extraction
code into several 'xgettext-like' scripts and adds gulp tasks to
automate string extraction and PO files update

This has several benefits:

- gulp runs tasks in parallel, so it's a lot faster (updating all PO
  files is at least 10 times faster with my 4-cores CPU)

- there is no need for $KOHA_CONF to be defined
  LangInstaller.pm relied on $KOHA_CONF to get the different paths
  needed. I'm not sure why, since string extraction and PO update should
  work on source files, not installed files

- string extraction code can be more easily tested

This patch also brings a couple of fixes and improvements:

- TT string extraction (strings wrapped in [% t(...) %]) was done with
  Template::Parser and PPI, which was extremely slow, and had some
  problems (see bug 24797).
  This is now done with Locale::XGettext::TT2 (new dependency) which is
  a lot faster, and fixes bug 24797

- Fix header in 4 PO files

For backward compatibility, 'create' and 'update' commands of
misc/translator/translate can still be used and will execute the
corresponding gulp task

Test plan:
1. Run `yarn install` and install Locale::XGettext::TT2
2. Run `gulp po:update`
3. Verify the contents of updated PO files
4. Run `cd misc/translator && ./translate install <lang>`
5. Verify that all (templates, sysprefs, xslt, installer files) is
   correctly translated
6. Run `gulp po:create --lang <lang>` and verify that it created all PO
   files for that language
7. Run `prove t/misc/translator`

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Need to install yarn & gulp, no errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 09:46:11 +01:00
C4 Bug 14708: Skip AnonymousPatron in GetBorrowersToExpunge 2020-11-06 09:40:25 +01:00
Koha Bug 14708: (QA follow-up) Add tests 2020-11-06 09:40:26 +01:00
acqui Bug 26584: Remove unused C4::Acquisition::CloseBasket function 2020-11-05 15:24:20 +01:00
admin Bug 26908: (follow-up) Alter template check 2020-11-05 15:24:20 +01:00
api Bug 26718: Rename "reading history" to "checkout history" 2020-11-04 12:59:33 +01:00
authorities Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
basket Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
bin Bug 20582: Turn Koha into a Mojolicious application 2020-10-06 12:00:04 +02:00
catalogue Bug 26032: (follow-up) show 'is new' filter only if items.new_status is used 2020-11-04 12:59:32 +01:00
cataloguing Bug 26605: Correctly URI-encode query string in call number browse plugin 2020-11-02 11:03:09 +01:00
circ Bug 18170: Show damaged status in table of checkins 2020-10-15 12:56:31 +02:00
clubs Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
course_reserves Bug 25898: Fix new occurrences 2020-10-15 13:56:41 +02:00
debian Bug 21111: Add --exclude-indexes to koha-run-backups 2020-11-04 12:59:34 +01:00
docs Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
errors Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
etc Bug 26310: Allow setting trace_to parameter in Elaasticsearch config 2020-11-04 12:59:33 +01:00
ill Bug 23173: (follow-up) Small improvements in efficiency 2020-04-06 11:05:09 +01:00
installer Bug 25334: DBRev 20.06.00.060 2020-11-05 15:24:20 +01:00
koha-tmpl Bug 26727: (follow-up) More markup corrections 2020-11-06 09:40:27 +01:00
labels Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
members Bug 14708: (QA follow-up) Use try/catch blocks when calling delete() on a patron 2020-11-06 09:40:25 +01:00
misc Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
offline_circ Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
opac Bug 22806: (QA follow-up) 2020-11-02 11:03:08 +01:00
patron_lists Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
patroncards Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
plugins Bug 26751: Fix fatal exception if only one repo defined 2020-10-22 10:23:55 +02:00
pos Bug 26418: Fix translatability of REFUND credit type 2020-09-28 15:07:27 +02:00
reports Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
reserve Bug 22806: (QA follow-up) 2020-11-02 11:03:08 +01:00
reviews Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
rotating_collections Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
serials Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
services Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
skel
…
suggestion Bug 26738: (bug 24819 follow-up) Fix manager selection 2020-11-04 12:59:32 +01:00
svc Bug 19351: Add items.copynumber to the checkouts table 2020-11-04 12:59:34 +01:00
t Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
tags Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
tmp/modified_authorities
…
tools Bug 25167: (QA follow-up) Don't add a new variable 2020-11-03 10:57:35 +01:00
virtualshelves Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
xt Bug 24972: Remove de-DE installer data 2020-10-26 00:14:42 +01:00
.editorconfig Bug 24774: Set JSON indentation of 2 spaces in .editorconfig 2020-03-19 09:24:52 +00:00
.eslintrc.json Bug 23834: Add default ESLint configuration 2019-11-03 08:02:39 +00:00
.gitignore Bug 20427: Convert OPAC LESS to SCSS 2018-08-09 15:17:07 +00:00
.htaccess
…
.mailmap Bug 26621: Adjust .mailmap to reduce the number of invalid authors 2020-10-15 12:56:30 +02:00
.perlcriticrc Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
.scss-lint.yml Bug 21237: Clean up staff client SCSS 2018-08-24 16:23:25 +00:00
INSTALL Bug 26617: Update INSTALL file to include koha-testing-docker and Gitlab links 2020-10-15 12:56:30 +02:00
Koha.pm Bug 25334: DBRev 20.06.00.060 2020-11-05 15:24:20 +01:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 20582: Map app.psgi file and bin directory in Makefile.PL 2020-10-06 18:14:30 +02:00
README
…
README.md Bug 15465: Fix typo in bugs.k-c.org 2017-05-26 11:45:31 -03:00
README.robots
…
about.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
app.psgi Bug 20582: Fix PSGI file when behind a reverse proxy 2020-10-06 12:00:04 +02:00
changelanguage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
cpanfile Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
fix-perl-path.PL Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
gulpfile.js Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
help.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
koha_perl_deps.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
kohaversion.pl Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
mainpage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
package.json Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
rewrite-config.PL Bug 26290: Make Makefile.PL aware of SMTP configs 2020-10-02 15:27:18 +02:00
yarn.lock Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo