>Katrin Fischer wrote:
>
>I'd rather keep some additional %s and not lose the context and the

Pity Koha doesn't support msgctxt - the gettext context string!
Translators are not coders, nor vice versa. The variable names will mean 
nothing to the translators - it's good if the translator knows what '%s' means, 
and '%%' will confuse them.


The translation script could be improved somewhat by discarding totally useless 
placeholders.

Some simple(?) improvements:

1) Replace all inline TT code in msgid with a placeholders. (eg "[% 
variable_name|filter %]" => "%s")

2) If the msgid begins with a placeholder that is IF, and ends in a placeholder 
that's either END or ELSE, and there are no other placeholders, do not include 
the placeholders.

3) Do not include the placeholder in the msgid, if it is 'END' or 'ELSE' token 
and is at the beginning of the msgid.

4) Do not include the placeholder in the msgid, if it is 'END' or 'ELSE' token 
and is at the end of the msgid.

5) If there's only one placeholder, and it is a flow control token (IF, ELSE, 
etc), and it is not in the beginning or end of msgid, cut the msgid into two 
msgid's.

6) Ignore XSLT <xsl:attribute name="href">foobar</xsl:attribute>

7) Ignore XSLT <xsl:call-template name="subfieldSelect"><xsl:with-param 
name="codes">foobar</xsl:with-param></xsl:call-template>

8) If msgid is nothing but placeholders (and spaces), do not use it.



--
Ystävällisin terveisin

Pasi Kallinen
ICT-asiantuntija

p. 0400-139747
[email protected]
Länsikatu 15
80110  Joensuu

Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi

________________________________________
From: [email protected] 
[[email protected]] on behalf of Katrin Fischer 
[[email protected]]
Sent: Wednesday, December 04, 2013 13:43
To: [email protected]
Subject: [Koha-translate]  Translation annoyances

Hi,

I'd rather keep some additional %s and not lose the context and the
chance to do grammatically more correct translations. I'd like to give
some examples:

Grouping together related sentences/error messages:

%sNote: your comment contained illegal markup code. It has been saved
with the markup removed, as below. You can edit the comment further, or
cancel to retain the comment as is. %s %sError! Your comment was
entirely illegal markup code. It has NOT been added.%s %sError! You
cannot add an empty comment. Please add content or cancel.%s

%sEdit course%sCreate course%s

Suggestion status:
"%s Pending %s Accepted %s Ordered %s Rejected %s Checked %s %s %s %s "

Import status:
"%s Cleaned %s Imported %s Importing %s Reverted %s Reverting %s Staged
%s %s %s "


Allowing translation of 'constructed' sentences:
"%sEdit%sCreate%s Label layout"

"%s Delete %s %s Update %s %s Move %s %s Copy %s %s %s 1st %s %s field
%s%s$%s%s %s with value "


Also if you only take variables into account, a simple [% IF %] checking
for the existance of a variable could be a problem breakting the
translation string:

#. %1$s:  name
#. %2$s:  IF ( invoice )
#. %3$s:  invoice
#. %4$s:  END
#. %5$s:  ordernumber
#: intranet-tmpl/prog/en/modules/acqui/orderreceive.tt:130
#, c-format
msgid "Receive items from : %s %s[%s] %s (order #%s)"


I think the translation scripts are not so much the problem, but badly
constructed strings in the templates are. I think fixing the templates
would be the better way.

Katrin


Am 04.12.2013 11:34, schrieb Fischer, Katrin:
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected] im Auftrag von
> Fridolin SOMERS
> Gesendet: Mi 04.12.2013 11:05
> An: [email protected]
> Betreff: Re: [Koha-translate] Translation annoyances
>
> I agree, specially on point 6.
> PO shoould only consider  TT vars [% var %], no other TT tag.
>
> I will try to work on it.
>
> Le 02/12/2013 08:37, Kallinen Pasi a écrit :
>> Hello.
>>
>> I've been translating Koha to Finnish for a bit, and I'm really
> starting to hate some of the automagically generated msgid's.
>>
>> 1) String concatenation is BAD.
>> For example, this line of code:
>>     var disabledForCurrent = _("Disabled for") + ' ' + $branch;
>> turns into this translatable string:
>>     msgid "Disabled for"
>>
>> For some languages this is very hard to translate without sounding
> stupid or just plain wrong. jQuery has some string placeholder support
> for javascript, so Koha really should be using those instead!
>> The example above would turn into:
>>
>>     var disabledForCurrent = _("Disabled for {0}");
>>     msgid "Disabled for {0}"
>>
>>
>> 2) Consistency would be good.
>>     msgid "EAN:"
>>     msgid "EAN: "
>>     msgid "EAN :"
>>
>>
>> 3) Sentences should not be cut in pieces.
>>     msgid "Please"
>>     msgid "upload"
>>     msgid "one."
>>
>> The "upload"-text is a link in the sentence. Ideally this should be:
>>     msgid "Please %supload%s one."
>>
>>
>> 4) Is it a verb or a noun?
>>     msgid "Copy"
>>
>>
>> 5) The wiki-like help texts should be in separate po-file. The help
> texts inflate the staff UI po-file immensely, and the help translation
> is not quite as critical as the UI. Having all the help texts
> interspersed between all the actually important strings is irritating.
>>
>>
>> 6) Translation is not programming. Replace all Template Toolkit code
> with placeholders.
>> For example
>>     msgid "Cancel [% IF TransferWhenCancelAllWaitingHolds %]and
> Transfer [% END %]All"
>> and
>>     msgid "Cancel hold and return to : [% overloo.branchname %]"
>>
>>
>> 7) Exclude URLs. Those are not content that should be translatable.
>>
>>
>> --
>> Ystävällisin terveisin
>>
>> Pasi Kallinen
>> ICT-asiantuntija
>>
>> p. 0400-139747
>> [email protected]
>> Länsikatu 15
>> 80110  Joensuu
>>
>> Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi
>> _______________________________________________
>> Koha-translate mailing list
>> [email protected]
>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-translate
>> website: www.koha-community.org
>> git: git.koha-community.org
>> bugs: bugs.koha-community.org
>>
>
> --
> Fridolin SOMERS
> Biblibre - Pôle support
> [email protected]
> _______________________________________________
> Koha-translate mailing list
> [email protected]
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-translate
> website: www.koha-community.org
> git: git.koha-community.org
> bugs: bugs.koha-community.org
>
>
>

_______________________________________________
Koha-translate mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-translate
website: www.koha-community.org
git: git.koha-community.org
bugs: bugs.koha-community.org
_______________________________________________
Koha-devel mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to