Skip to content

Commit

Permalink
Merge pull request #913 from pereorga/fix/po-encoding
Browse files Browse the repository at this point in the history
Other (translations):  The generated `*.po` files will include the "Content-Type" header with the charset set as `UTF-8` to avoid issues while processing non-ASCII characters across systems.
  • Loading branch information
pomek authored Aug 18, 2023
2 parents 10edd90 + 5cbbe28 commit b0fe2a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ module.exports = function cleanPoFileContent( poFileContent, options = {} ) {
po.headers = {
Language: po.headers.Language,
'Language-Team': po.headers[ 'Language-Team' ],
'Plural-Forms': po.headers[ 'Plural-Forms' ]
'Plural-Forms': po.headers[ 'Plural-Forms' ],
'Content-Type': 'text/plain; charset=UTF-8'
};

const copyright = po.comments.find( comment => comment.includes( 'Copyright' ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ msgstr ""
"Language: ast\\n"
"Language-Team: Asturian (https://www.transifex.com/ckeditor/teams/11143/ast/)\\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
msgctxt "Label for the url input in the Link dialog."
msgid "Link URL"
Expand All @@ -48,6 +49,7 @@ msgstr ""
"Language: ast\\n"
"Language-Team: Asturian (https://www.transifex.com/ckeditor/teams/11143/ast/)\\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
msgctxt "Label for the url input in the Link dialog."
msgid "Link URL"
Expand All @@ -70,6 +72,7 @@ msgstr ""
"Language: ast\\n"
"Language-Team: Asturian (https://www.transifex.com/ckeditor/teams/11143/ast/)\\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
msgctxt "Label for the url input in the Link dialog."
msgid "Link URL"
Expand All @@ -93,6 +96,7 @@ msgstr ""
"Language: ast\\n"
"Language-Team: Asturian (https://www.transifex.com/ckeditor/teams/11143/ast/)\\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
msgctxt "Label for the url input in the Link dialog."
msgid "Link URL"
Expand All @@ -114,6 +118,7 @@ msgstr ""
"Language: ast\\n"
"Language-Team: Asturian (https://www.transifex.com/ckeditor/teams/11143/ast/)\\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
msgctxt "Label for the url input in the Link dialog."
msgid "Link URL"
Expand All @@ -131,6 +136,7 @@ msgstr ""
"Language: ast\\n"
"Language-Team: Asturian (https://www.transifex.com/ckeditor/teams/11143/ast/)\\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\\n"
"Content-Type: text/plain; charset=UTF-8\\n"
msgctxt "Label for the url input in the Link dialog."
msgid "Link URL"
Expand Down

0 comments on commit b0fe2a5

Please sign in to comment.