Bugzilla – Attachment 100345 Details for
Bug 24262
Translate installer data in YAML format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24262: (followup) admit null values on labels
Bug-24262-followup-admit-null-values-on-labels.patch (text/plain), 1.78 KB, created by
Jonathan Druart
on 2020-03-09 12:18:54 UTC
(
hide
)
Description:
Bug 24262: (followup) admit null values on labels
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-09 12:18:54 UTC
Size:
1.78 KB
patch
obsolete
>From 70b7d674b348d7af4c31be9d16f3042d2412e713 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Thu, 5 Mar 2020 10:23:53 -0300 >Subject: [PATCH] Bug 24262: (followup) admit null values on labels > >This patch adds handling of null values on translatable >labels. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > misc/translator/LangInstaller.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm >index ef5dd3d6c3..7b5e23648b 100644 >--- a/misc/translator/LangInstaller.pm >+++ b/misc/translator/LangInstaller.pm >@@ -523,7 +523,7 @@ sub get_po_from_target { > } > } > } else { >- if ( length($row->{$field}) > 1 # discard small strings >+ if ( defined $row->{$field} and length($row->{$field}) > 1 # discard null values and small strings > and not $po->{ $row->{$field} } ) { > my $msg = new Locale::PO( > -msgid => $row->{$field}, -msgstr => '', >@@ -653,6 +653,7 @@ sub translate_yaml { > } > } > } else { >+ next unless defined $row->{$field}; # next if null value > my $po = $po_ref->{"\"$row->{$field}\""}; # quoted key > if ( $po and not defined( $po->fuzzy() ) # not fuzzy > and length( $po->msgid() ) > 2 # not empty msgid >-- >2.20.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 24262
:
96538
|
96540
|
96593
|
96626
|
98506
|
99396
|
100194
|
100344
| 100345