Koha-clms/misc/translator
Tomas Cohen Arazi 3c84a93e36 Bug 38164: Skip fuzzy translations
This patch was envisioned by Julian Maurice.

Test plan:
0. Apply the 1st patch (the revert)
1. Go to `misc/translator/po`
2. es-ES-messages-js.po
3. Mark "Edit" string as fuzzy (around line 48). It should look like:

```
msgid "Edit"
msgstr "Editar"
```

4. Edit ./intranet-main.tt and add the following lines at the bottom,
   inside the `$(document).ready` block:

```javascript
  console.log(_("Edit"));
  console.log(__("Edit"));
```

5. Install the templates
  k$ koha-translate --install es-ES --dev kohadev && restart_all
6. Enable *es-ES* by searching for `language` in the sysprefs and switch
   to it for the staff interface.
7. Go to the Koha home page, open the browser console
=> FAIL: Notice that the second log in the console is displaying the
fuzzy string (i.e. is being translated when it shouldn't)
8. Apply this patch
9. Re-install the translated templates:
  k$ koha-translate --update es-ES --dev kohadev && restart_all
10. Repeat 7
=> SUCCESS: With this patch applied both logs show the English version of the
string.
11. Remove the fuzzy flag on `es-ES-messages-js.po`
12. Repeat 9 and 10
=> SUCCESS: The results are similar to step 7, but in this case they are
expected as the string is not marked fuzzy.
13. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5102f708a5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-10-23 22:51:09 +00:00
..
LangInstaller.pm Bug 38164: Revert "Bug 37303: Replace po2json with a JS version" 2024-10-23 22:51:09 +00:00
TmplTokenizer.pm Bug 35043: Use Locale::PO->quote 2023-10-27 16:45:52 -03:00
VerboseWarnings.pm Bug 17600: Fix tests 2021-07-16 09:47:01 +02:00
po2json Bug 38164: Skip fuzzy translations 2024-10-23 22:51:09 +00:00
tmpl_process3.pl Bug 36516: Fix useless warning from translation script 2024-04-05 11:51:19 +02:00
translate Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
xgettext-installer Bug 31292: Untranslatable string in sample_notices.yaml 2022-08-08 13:10:56 -03:00
xgettext-pref Bug 28154: Fix encoding issues on Koha-pref.pot 2021-04-16 13:53:54 +02:00
xgettext-tt2 Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
xgettext.pl Bug 36845: Do not loop over the content attribute 2024-05-22 16:18:07 +02:00