[Koha-translate] [Koha-devel] Translation annoyances

Chris Cormack chrisc at catalyst.net.nz
Mon Dec 2 08:42:32 CET 2013


* Kallinen Pasi (Pasi.Kallinen at pttk.fi) wrote:
> 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.
> 

Great ideas, 

I will be more than happy to do sign off on your patches implementing
them.

Chris

-- 
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand


More information about the Koha-translate mailing list