You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/12/23 19:12:46 UTC

[jira] [Commented] (ISIS-1070) Add header and handle double quotes in translations.pot file

    [ https://issues.apache.org/jira/browse/ISIS-1070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15069983#comment-15069983 ] 

ASF subversion and git services commented on ISIS-1070:
-------------------------------------------------------

Commit 047e5ef015248a5cf654993c14c3bd407e5b3e87 in isis's branch refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=047e5ef ]

ISIS-1070: translations.po header and escape quotes.


> Add header and handle double quotes in translations.pot file 
> -------------------------------------------------------------
>
>                 Key: ISIS-1070
>                 URL: https://issues.apache.org/jira/browse/ISIS-1070
>             Project: Isis
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: core-1.8.0
>            Reporter: Jeroen van der Wal
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: 1.11.0
>
>
> Some translation services are more picky about the format of the .pot file than others. I encountered two issues when trying a different service:
> 1. Add compliant header
> More about headers in this paper [1]  and the gettext documentation [2]. I've successfully managed to upload a .pot file to a translation service by adding this header: 
> {code}
> msgid ""
> msgstr ""
> "Project-Id-Version: \n"
> "POT-Creation-Date: 2015-03-04 12:52+0100\n"
> "MIME-Version: 1.0\n"
> "Content-Type: text/plain; charset=UTF-8\n"
> "Content-Transfer-Encoding: 8bit\n"
> "Plural-Forms: nplurals=2; plural=n != 1;\n"
> {code}
> 2. Escape quotes
> Some services can't deal with quotes in the translatable string:
> {code}
> msgid "<a href="#">Accept using your data for research</a>"
> {code}
> One could argue that is this particular example the html should not be exposed to the translator but it's imaginable that quotes are used in strings that are presented to the user.
> Escaping with a backslash allowed me to upload the .pot file: 
> {code}
> msgid "<a href=\"#\">Accept using your data for research</a>"
> {code}
>  
> [1] http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html
> [2] https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html#Header-Entry



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)