Bug 505307 - po files generated from *.md files have unnecessary \n at end
Summary: po files generated from *.md files have unnecessary \n at end
Status: RESOLVED NOT A BUG
Alias: None
Product: i18n
Classification: Translations
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-07 13:19 UTC by Guo Yunhe
Modified: 2025-06-09 01:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2025-06-07 13:19:48 UTC
SUMMARY

Markdown files use \n for paragraph. But I think generated po/pot files shouldn't contain ending \n because it adds more difficulties for translators. And it is more likely to make mistake (forgot \n at end) and SVN will reject it. Scripts can easily handle ending \n so can we improve the script and remove \n from po/pot files?

trunk/l10n-kf5/templates/messages/websites-glaxnimate-org/glaxnimate-org.pot

```
#: content/_index.md:0
msgid "You can use Python to manipulate animations and create plugins.\n"
```

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Albert Astals Cid 2025-06-08 19:45:42 UTC
Phu? Carl?
Comment 2 Phu H. Nguyen 2025-06-09 01:17:28 UTC
In general, we don't add newlines to strings gotten from Markdown content. The one you are showing here is from the frontmatter of the Markdown file, which is YAML, and because it's denoted with "|", it contains a newline.