Bugzilla – Attachment 190550 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
bb1d90d.patch (text/plain), 1.62 KB, created by
Julian Maurice
on 2025-12-16 15:33:28 UTC
(
hide
)
Description:
Bug 26547: Fix msgctxt in pref PO file for blocks without a pref name
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2025-12-16 15:33:28 UTC
Size:
1.62 KB
patch
obsolete
>From bb1d90dd73ca0afc28c67bd2fd8baa5f7e5a2583 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 e4b20d59b3f..663de2de883 100755 >--- a/misc/translator/xgettext-pref >+++ b/misc/translator/xgettext-pref >@@ -116,17 +116,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' or $key eq 'multiple_sortable'; > 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.47.3 >
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
|
190539
|
190540
|
190541
|
190542
|
190548
|
190549
| 190550 |
190551
|
190613