Bugzilla – Attachment 111699 Details for
Bug 26547
Move context from msgid to msgctxt in pref PO files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26547: Fix msgctxt in pref PO file for blocks without a pref name
Bug-26547-Fix-msgctxt-in-pref-PO-file-for-blocks-w.patch (text/plain), 1.59 KB, created by
Julian Maurice
on 2020-10-15 10:14:38 UTC
(
hide
)
Description:
Bug 26547: Fix msgctxt in pref PO file for blocks without a pref name
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-10-15 10:14:38 UTC
Size:
1.59 KB
patch
obsolete
>From 3f1bed6f14294c45feb2e18ecab271f8f3be5ea5 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 15 Oct 2020 11:38:52 +0200 >Subject: [PATCH] Bug 26547: Fix msgctxt in pref PO file for blocks without a > pref name > >Example in enhanced_content.pref: > >Enhanced content: > Adlibris: > - > - <strong>NOTE:</strong> Using resources such as external > images might leak sensitive data to third parties. >--- > misc/translator/xgettext-pref | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/misc/translator/xgettext-pref b/misc/translator/xgettext-pref >index 9b6190260f..97c986fb9e 100755 >--- a/misc/translator/xgettext-pref >+++ b/misc/translator/xgettext-pref >@@ -118,17 +118,18 @@ sub add_prefs { > } > } > for my $element (@$pref) { >+ my $new_context = $pref_name ? "$context > $pref_name" : $context; > if ( ref($element) eq 'HASH' ) { > while ( my ( $key, $value ) = each(%$element) ) { > next unless $key eq 'choices' or $key eq 'multiple'; > next unless ref($value) eq 'HASH'; > for my $ckey ( keys %$value ) { >- add_po( $file, "$context > $pref_name", $value->{$ckey} ); >+ add_po( $file, $new_context, $value->{$ckey} ); > } > } > } > elsif ($element) { >- add_po( $file, "$context > $pref_name", $element ); >+ add_po( $file, $new_context, $element ); > } > } > } >-- >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 26547
:
110777
|
111557
|
111697
|
111698
| 111699 |
111700