PoItem::formatSingular doesn't add linebreak on untranslated strings

Created on 3 May 2022, about 3 years ago
Updated 28 April 2025, 16 days ago

Problem/Motivation

When using PoItem to export translation strings, the linebreak output differs between translated and untranslated strings.

Steps to reproduce

$untranslated = new PoItem();
$untranslated->setSource("");

// msgid ""
// msgstr ""
$untranslated->__toString():

$translated = new PoItem();
$translated->setSource("");
$translated->setTranslation("");

// msgid ""
// msgstr ""
//
$translated->__toString();

Proposed resolution

Append line break to singular untranslated string output for consistency with other cases.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component

locale.module

Created by

πŸ‡¨πŸ‡¦Canada gapple

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024