Bugzilla – Attachment 172767 Details for
Bug 38164
Translation process is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38164: Skip fuzzy translations
Bug-38164-Skip-fuzzy-translations.patch (text/plain), 2.07 KB, created by
Jonathan Druart
on 2024-10-15 08:57:25 UTC
(
hide
)
Description:
Bug 38164: Skip fuzzy translations
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-10-15 08:57:25 UTC
Size:
2.07 KB
patch
obsolete
>From dff6d5d163a76166dcbd375b9feb6c3658055d62 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 14 Oct 2024 09:52:14 -0300 >Subject: [PATCH] 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> >--- > misc/translator/po2json | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/misc/translator/po2json b/misc/translator/po2json >index a04d85949fe..81202820d92 100755 >--- a/misc/translator/po2json >+++ b/misc/translator/po2json >@@ -72,6 +72,8 @@ sub main > > foreach my $po (@$pos) > { >+ next if $po->fuzzy; >+ > my $qmsgid1 = $po->msgid; > my $msgid1 = $po->dequote( $qmsgid1 ); > >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38164
:
172714
|
172715
|
172756
|
172757
|
172758
|
172759
|
172760
|
172761
|
172762
|
172766
| 172767