Commit Graph

677 Commits

Author SHA1 Message Date
Victor Grousset/tuxayo 3769728d3a Fix translations for Koha 21.05.21
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-12-01 00:44:57 +01:00
Koha translators 695cc30e16 Translation updates for Koha 21.05.21
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-11-30 22:10:06 +01:00
Victor Grousset/tuxayo dd75ad9e4e Fix translations for Koha 21.05.20
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-24 18:05:08 +02:00
Koha translators e7e5b0ac37 Translation updates for Koha 21.05.20
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-10-24 18:05:07 +02:00
Victor Grousset/tuxayo 465f0f4d00 Fix translations for Koha 21.05.19
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-27 14:03:02 +02:00
Koha translators 2d418e077f Translation updates for Koha 21.05.19
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-09-27 11:30:25 +02:00
Victor Grousset/tuxayo 35e1303ace Fix translations for Koha 21.05.18
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-27 01:57:42 +02:00
Koha translators fa8889dcb9 Translation updates for Koha 21.05.18
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-08-26 22:32:27 +02:00
Victor Grousset/tuxayo 8600aa556f Fix translations for Koha 21.05.17
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-26 01:50:36 +02:00
Koha translators be1d070d85 Translation updates for Koha 21.05.17
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-07-25 21:12:25 +02:00
Victor Grousset/tuxayo 339e310a27 Fix translations for Koha 21.05.16
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-27 16:45:26 +02:00
Koha translators b831476463 Translation updates for Koha 21.05.16
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-06-27 14:34:46 +02:00
Andrew Fuerste-Henry b3d2f6fb0b Fix translations for Koha 21.05.15
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-05-29 16:18:02 +00:00
Andrew Fuerste-Henry 9e9be0aeb5 Translation fixes for 21.05.15 2022-05-29 16:16:59 +00:00
Koha translators 22bff19194 Translation updates for Koha 21.05.15
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-05-29 13:02:08 -03:00
Andrew Fuerste-Henry a02fcb7689 Translation fixes for 21.05.14
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-04-26 12:37:30 +00:00
Koha translators cb51b6a195 Translation updates for Koha 21.05.14
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-04-26 09:09:36 -03:00
Andrew Fuerste-Henry a04e83fa9d Fix translations for Koha 21.05.13
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-03-24 18:41:45 +00:00
Koha translators 112a81fd4c Translation updates for Koha 21.05.13
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-03-24 15:18:08 -03:00
Andrew Fuerste-Henry 6ce58b04fd Fix translations for Koha 21.05.11
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-02-21 17:34:53 +00:00
Koha translators c1ab52400a Translation updates for Koha 21.05.11
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-02-21 14:13:36 -03:00
Andrew Fuerste-Henry e822170d84 Fix translations for Koha 21.05.09
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-01-31 16:57:45 +00:00
Koha translators d8d02aaf73 Translation updates for Koha 21.05.09
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2022-01-31 12:38:03 -03:00
Andrew Fuerste-Henry d8bf745d93 Translation fixes for 21.05.08
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-12-23 15:28:01 +00:00
Koha translators 4b05bff27a Translation updates for Koha 21.05.08
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-12-23 11:53:12 -03:00
Kyle M Hall dff2949304 Fix translations for Koha 21.05.06
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2021-11-26 06:39:11 -05:00
Koha translators 06212a3ea3 Translation updates for Koha 21.05.06 2021-11-26 08:32:51 -03:00
Kyle M Hall 855fe1f9a7 Fix translations for Koha 21.05.05
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2021-10-28 08:27:56 -04:00
Koha translators bcf404e9d9 Translation updates for Koha 21.05.05 2021-10-27 15:34:07 -03:00
Kyle Hall 13405e11e6 Fix translations for Koha 21.05.04
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
2021-09-23 09:46:21 -04:00
Koha translators 1871da99ce Translation updates for Koha 21.05.04 2021-09-23 10:21:12 -03:00
Kyle M Hall bd3dc3f758 Fix translations for Koha 21.05.03
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2021-08-24 09:51:21 -04:00
Koha translators 00903f4e5d Translation updates for Koha 21.05.03 2021-08-24 09:51:21 -04:00
Kyle M Hall eb93f8e04e Fix translations for Koha 21.05.02 2021-07-30 08:14:21 -04:00
Koha translators e6c3ce192f Translation updates for Koha 21.05.02 2021-07-26 08:46:50 -03:00
Nick Clemens e06935d71a Translation fixes for 21.05.01 release
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2021-06-24 12:15:11 -04:00
Koha translators b0c07f7c1c Translation updates for Koha 21.05.01
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2021-06-24 12:15:11 -04:00
Andrew Nugged a93f45ecc9 Add and fix few messages in second plural form for pl, be, ru languages
Fixed missed "singular" message which had word "one" instead of "{count}" for uk and ru because it should be used not only for "1" but also for "21, 31, ...".

Add formula for 2/3 form for Russian (Plural-Forms:...)
and Belarusian and Ukrainian formulas normalized to be the same for all three languages
2021-05-28 13:18:18 +02:00
Jonathan Druart 152733f66c Fix translation issues
sudo apt-get install translate-toolkit
    junitmsgfmt misc/translator/po/*.po
2021-05-28 13:18:15 +02:00
Koha translators 1f80ab7f62 Translation updates for Koha 21.05.00 2021-05-28 09:34:45 +02:00
Julian Maurice 4b65d099d7 Bug 28276: Do not fetch config ($KOHA_CONF) from memcached
memcached address and namespace are in $KOHA_CONF, so it is required to
read it before being able to access the cache. And after that,
configuration is kept in memory forever. Storing this in memcached is
useless and even counter-productive, since Koha reads both the file and
the cache

This patch addresses this issue by removing the cache-related code from
C4::Context->new.
It means that C4::Context->new will always read the configuration file,
so this patch also replaces inappropriate calls to
C4::Context->new->config by appropriate calls to C4::Context->config

It also fixes a bug where C4::Context->new would ignore the filepath
given in parameters if there was something in cache.

It also removes a problematic call to Koha::Caches->get_instance.
Because this call was outside of any subroutine, it would have happened
before the initialization of $C4::Context::context (which happen in
C4::Context::import)

Test plan:
1. Do not apply the patch yet
2. Add the following line at the beginning of Koha::Config::read_from_file
    warn "read_from_file($file)";
   This will allow you to check how many times the file is read.
3. Flush memcached and restart starman
4. Check the logs, you should see "read_from_file" a bunch of times
5. Apply the patch
6. Re-add the line from step 2
7. Flush memcached and restart starman
8. Check the logs, you should see "read_from_file" only once
9. Make sure the memcached config from $KOHA_CONF (memcached_servers,
   memcached_namespace) is taken into account by checking the About page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-10 10:28:04 +02:00
Joonas Kylmälä 67137b3f3e Bug 28291: Make koha-translate script produce valid UTF-8 YAML files
We had two problems in the LangInstaller.pm module:
 1) the PO file was read as bytes instead of as a UTF-8 text stream
 2) The YAML file being outputted was double encoded, once by setting
    the file handle to output UTF-8 and other time in the DumpFile
    function internally

To test:
1. Before applying patch do the following
$ cd misc/translator
$ ./translate update pl-PL
$ ./translate install pl-PL
$ cd -
$ less installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/authorities_normal_marc21.yml
2. Notice the output of the authorities_normal_marc21.yml contains
invalid looking UTF-8 characters
3. $ git clean -d -f # to remove the old translation files
4. Apply patch and repeat the steps and notice the
authorities_normal_marc21.yml contains valid looking UTF-8 characters

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-07 14:44:00 +02:00
Julian Maurice a17134a0d1 Bug 28154: Fix encoding issues on Koha-installer.pot
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 13:53:54 +02:00
Jonathan Druart 10139a2124 Bug 28154: Fix encoding issues on Koha-pref.pot
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 13:53:54 +02:00
James O'Keeffe 2b607d8414 Bug 24000: Some modules do not return 1
This patch adds "1;" to the end of the following perl files:
Koha/Filter/MARC/EmbedItemsAvailability.pm
Koha/Filter/MARC/EmbedSeeFromHeadings.pm
Koha/Filter/MARC/Null.pm
Koha/Item/Search/Field.pm
Koha/SearchEngine.pm
misc/translator/VerboseWarnings.pm
t/lib/Koha/Plugin/Test.pm

This indicates the succesful execution of the initialization code.

Test plan:
Ensure that there are no other perl files that need "1;", but dont have
it.

Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
Jonathan Druart d6d0116950 Bug 22824: Replace YAML::Syck with YAML::XS
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
Jonathan Druart d3acf7bebc Fix translation issues
sudo apt-get install translate-toolkit
junitmsgfmt misc/translator/po/*.po

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-27 16:35:09 +01:00
Koha translators 373835c136 Translation updates for Koha 20.11.00
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-27 16:35:09 +01:00
Jonathan Druart f5017e4ed6 Bug 25067: Fix perlcritic errors
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 17:06:44 +01:00
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