Ckeditor5: Is the \n character in PO files used correctly?

Created on 12 Jan 2018  路  4Comments  路  Source: ckeditor/ckeditor5

A typical PO files looks like this:

# Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
msgid ""
msgstr ""
"Language: fi\n"
"Language-Team: Finnish (https://www.transifex.com/ckeditor/teams/11143/fi/)\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgctxt "Toolbar button tooltip for the Undo feature."
msgid "Undo"
msgstr "Peru"

msgctxt "Toolbar button tooltip for the Redo feature."
msgid "Redo"
msgstr "Tee uudelleen"

What are those \n in Language, Language-Team and Plural-Forms? Also, what is that empty msgid at the beginning (I feel that I asked about this already)?

dev invalid

Most helpful comment

Wow... what a great format :D

All 4 comments

cc @ma2ciek

Looks like standard output from xgettext produces something like this and all examples on the web have those \n.

Also, what is that empty msgid at the beginning (I feel that I asked about this already)?

"An empty untranslated-string is reserved to contain the header entry with the meta information (see Header Entry). This header entry should be the first entry of the file. The empty untranslated-string is reserved for this purpose and must not be used anywhere else." - https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html

What are those n in Language, Language-Team and Plural-Forms

Those \n must end every header, AFAIR to split them. See https://docs.transifex.com/formats/gettext#sample-data

Wow... what a great format :D

Was this page helpful?
0 / 5 - 0 ratings