Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Problem/Motivation
Trying to set header (Plural-Forms specifically) from a current PO header using PoHeader::setFromString but the key returned for Plural-Forms is "\"Plural-Forms" (with the extra double quote).
Steps to reproduce
Create a new PoHeader.
$header1 = new PoHeader();
$header2 = new PoHeader();
$header2->setFromString($header1);
$header2 Plural-Forms is not properly set.
Proposed resolution
Fix the parseHeader function.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#4 | unterdiff-3_4.txt | 625 bytes | gauravvvv |
#4 | 3217436-4.patch | 601 bytes | gauravvvv |
#2 | core-fix-po-header-parse-header-3217436-2.patch | 599 bytes | duncancm |
Comments
Comment #2
duncancm CreditAttribution: duncancm as a volunteer commentedComment #3
cilefen CreditAttribution: cilefen commentedComment #4
gauravvvv CreditAttribution: gauravvvv at OpenSense Labs commentedRe-rolled the patch, attached interdiff for same
Comment #8
mstrelan CreditAttribution: mstrelan at PreviousNext commentedCan we get a failing test for this? Possibly we can add something to
\Drupal\Tests\Component\Gettext\PoHeaderTest
.