Hi,
I know that things are not perfect for translating Koha, but we have
already fixed a lot of issues since I started translating it a few years
ago and we keep improving. It's not easy and it can only be done by
people dedicating time and work.
I have added some notes and comments to the points you raised:
> 1) String concatenation is BAD.
> For example, this line of code:
> var disabledForCurrent = _("Disabled for") + ' ' + $branch;
> turns into this translatable string:
> msgid "Disabled for"
There is a bug for that:
Bug 7327 - Translation script doesn't like concatenated javascript strings
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7327
> 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}"
I think this method looks good and I have seen something similar being
used in the newer code for translating the datatable toolbars:
#. For the first occurrence,
#. SCRIPT
#: intranet-tmpl/prog/en/includes/datatables-strings.inc:1
#: intranet-tmpl/prog/en/includes/datatables.inc:2
msgid "(filtered from _MAX_ total entries)"
So this looks like something we could do, but fixing all existing
strings will take a lot of work and testing.
> 2) Consistency would be good.
> msgid "EAN:"
> msgid "EAN: "
> msgid "EAN :"
We already fixed a gazillion of those small inconsistencies when we
cleaned up the templates after agreeing on some capitalization rules.
Some things like this still remain, also often we will have a term with
and without :. For an additional space like this a patch would be really
easy.
> 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."
Agreed. Also, sentences should not be 'constructed' with
if-else-constructs where it can be avoided.
I think this problem here especially shows when there is a link in the
string, because the scripts look for html tags. It might be possible to
improve that.
> 4) Is it a verb or a noun?
> msgid "Copy"
I am not sure how to improve that - do you have a suggestion? Often it
helps to look at the list of files a string appears in to make a bit
more sense of it. In Pootle you can see the list when you hover over the
'Comment:' bit on the left.
> 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.
I've sent it to the koha-translate list earlier, but repeating it for
koha-devel - there are some bugs related to this:
Bug 7934 - Separate po file for help pages
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7934
Bug 7939 - Separate po files for different MARC dialects
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7939
> 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 %]"
Are you suggesting to replace the %s with the real variable names? This
could be a bit easier to read. We got comments in Pootle showing you
what %s stands for what, but I admit that with a lot of %s in a string
it gets a bit hard.
> 7) Exclude URLs. Those are not content that should be translatable.
In some cases I have wanted to change URLs in translation. For example I
am linking to the German Firefox Plugin page for the offline-circulation
plugin on the circulation home page:
#: intranet-tmpl/prog/en/modules/help/offline_circ/list.tt:5
#, c-format
msgid "https://addons.mozilla.org/en/firefox/addon/koct/"
msgstr "https://addons.mozilla.org/de/firefox/addon/koct/"
Hope it helps,
Katrin
_______________________________________________
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/