Bug 505307

Summary: po files generated from *.md files have unnecessary \n at end
Product: [Translations] i18n Reporter: Guo Yunhe <i>
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED NOT A BUG    
Severity: normal CC: carl, phu.nguyen
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.