From Pasi.Kallinen at pttk.fi Mon Dec 2 08:37:02 2013 From: Pasi.Kallinen at pttk.fi (Kallinen Pasi) Date: Mon, 2 Dec 2013 07:37:02 +0000 Subject: [Koha-translate] Translation annoyances Message-ID: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> 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 pasi.kallinen at pttk.fi L?nsikatu 15 80110 Joensuu Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi From chrisc at catalyst.net.nz Mon Dec 2 08:42:32 2013 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Mon, 2 Dec 2013 20:42:32 +1300 Subject: [Koha-translate] [Koha-devel] Translation annoyances In-Reply-To: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> References: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> Message-ID: <20131202074232.GJ24930@rorohiko.wgtn.cat-it.co.nz> * 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 From maolins at gmail.com Mon Dec 2 08:47:28 2013 From: maolins at gmail.com (Anthony Mao) Date: Mon, 2 Dec 2013 15:47:28 +0800 Subject: [Koha-translate] [Koha-devel] Translation annoyances In-Reply-To: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> References: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> Message-ID: Hi Kallinen, I can not but agree with you. 2013/12/2 Kallinen Pasi : > 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 > pasi.kallinen at pttk.fi > L?nsikatu 15 > 80110 Joensuu > > Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > 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/ -- Wishing you all the best. . . . Anthony Mao ??? ?886 2 29052334 (voice) + 886 2 29017405 (FAX) From fridolin.somers at biblibre.com Wed Dec 4 11:05:04 2013 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Wed, 04 Dec 2013 11:05:04 +0100 Subject: [Koha-translate] Translation annoyances In-Reply-To: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> References: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> Message-ID: <529EFE50.6080003@biblibre.com> 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 > pasi.kallinen at pttk.fi > L?nsikatu 15 > 80110 Joensuu > > Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi > _______________________________________________ > Koha-translate mailing list > Koha-translate at lists.koha-community.org > 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 fridolin.somers at biblibre.com From fridolin.somers at biblibre.com Wed Dec 4 11:11:01 2013 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Wed, 04 Dec 2013 11:11:01 +0100 Subject: [Koha-translate] Translation annoyances In-Reply-To: <529EFE50.6080003@biblibre.com> References: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> <529EFE50.6080003@biblibre.com> Message-ID: <529EFFB5.7010107@biblibre.com> Also, I would be great to have a PO specific to help pages. Because they are huge and maybe less important than TT translation. And also a PO specific to XSLTs. Regards, Le 04/12/2013 11:05, Fridolin SOMERS a ?crit : > 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 >> pasi.kallinen at pttk.fi >> L?nsikatu 15 >> 80110 Joensuu >> >> Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi >> _______________________________________________ >> Koha-translate mailing list >> Koha-translate at lists.koha-community.org >> 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 fridolin.somers at biblibre.com From Katrin.Fischer.83 at web.de Wed Dec 4 12:13:16 2013 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 04 Dec 2013 12:13:16 +0100 Subject: [Koha-translate] WG: Translation annoyances In-Reply-To: <028B1A54D03E7B4482CDCA4EC8F06BFD01626B4C@Bodensee.bsz-bw.de> References: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net><529EFE50.6080003@biblibre.com> <529EFFB5.7010107@biblibre.com> <028B1A54D03E7B4482CDCA4EC8F06BFD01626B4C@Bodensee.bsz-bw.de> Message-ID: <529F0E4C.2000006@web.de> Hi Fridolin, I am not sure about the XSLT files, but there are bug reports for the help files and for the MARC specific files: 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 Katrin > -----Urspr?ngliche Nachricht----- > Von: koha-translate-bounces at lists.koha-community.org im Auftrag von > Fridolin SOMERS > Gesendet: Mi 04.12.2013 11:11 > An: koha-translate at lists.koha-community.org > Betreff: Re: [Koha-translate] Translation annoyances > > Also, I would be great to have a PO specific to help pages. Because they > are huge and maybe less important than TT translation. > > And also a PO specific to XSLTs. > > Regards, > From Katrin.Fischer.83 at web.de Wed Dec 4 12:43:24 2013 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 04 Dec 2013 12:43:24 +0100 Subject: [Koha-translate] Translation annoyances In-Reply-To: <028B1A54D03E7B4482CDCA4EC8F06BFD01626B4B@Bodensee.bsz-bw.de> References: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> <529EFE50.6080003@biblibre.com> <028B1A54D03E7B4482CDCA4EC8F06BFD01626B4B@Bodensee.bsz-bw.de> Message-ID: <529F155C.2090006@web.de> 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: koha-translate-bounces at lists.koha-community.org im Auftrag von > Fridolin SOMERS > Gesendet: Mi 04.12.2013 11:05 > An: koha-translate at lists.koha-community.org > 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 >> pasi.kallinen at pttk.fi >> L?nsikatu 15 >> 80110 Joensuu >> >> Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi >> _______________________________________________ >> Koha-translate mailing list >> Koha-translate at lists.koha-community.org >> 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 > fridolin.somers at biblibre.com > _______________________________________________ > Koha-translate mailing list > Koha-translate at lists.koha-community.org > 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 > > > From Pasi.Kallinen at pttk.fi Wed Dec 4 13:14:47 2013 From: Pasi.Kallinen at pttk.fi (Kallinen Pasi) Date: Wed, 4 Dec 2013 12:14:47 +0000 Subject: [Koha-translate] Translation annoyances Message-ID: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E5D8@KS0105.ad.pohjoiskarjala.net> >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 foobar 7) Ignore XSLT foobar 8) If msgid is nothing but placeholders (and spaces), do not use it. -- Yst?v?llisin terveisin Pasi Kallinen ICT-asiantuntija p. 0400-139747 pasi.kallinen at pttk.fi L?nsikatu 15 80110 Joensuu Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi ________________________________________ From: koha-translate-bounces at lists.koha-community.org [koha-translate-bounces at lists.koha-community.org] on behalf of Katrin Fischer [Katrin.Fischer.83 at web.de] Sent: Wednesday, December 04, 2013 13:43 To: koha-translate at lists.koha-community.org 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: koha-translate-bounces at lists.koha-community.org im Auftrag von > Fridolin SOMERS > Gesendet: Mi 04.12.2013 11:05 > An: koha-translate at lists.koha-community.org > 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 >> pasi.kallinen at pttk.fi >> L?nsikatu 15 >> 80110 Joensuu >> >> Pohjois-Karjalan Tietotekniikkakeskus Oy - www.pttk.fi >> _______________________________________________ >> Koha-translate mailing list >> Koha-translate at lists.koha-community.org >> 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 > fridolin.somers at biblibre.com > _______________________________________________ > Koha-translate mailing list > Koha-translate at lists.koha-community.org > 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 Koha-translate at lists.koha-community.org 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 From Katrin.Fischer.83 at web.de Wed Dec 4 13:48:29 2013 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Wed, 04 Dec 2013 13:48:29 +0100 Subject: [Koha-translate] [Koha-devel] Translation annoyances In-Reply-To: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> References: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> Message-ID: <529F249D.5050405@web.de> 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 From bgkriegel at gmail.com Thu Dec 5 02:26:36 2013 From: bgkriegel at gmail.com (Bernardo Gonzalez Kriegel) Date: Wed, 4 Dec 2013 23:26:36 -0200 Subject: [Koha-translate] WG: Translation annoyances In-Reply-To: <529F0E4C.2000006@web.de> References: <25DCE6EB7C29A24A8ABC913AEB608972BAA1E06B@KS0105.ad.pohjoiskarjala.net> <529EFE50.6080003@biblibre.com> <529EFFB5.7010107@biblibre.com> <028B1A54D03E7B4482CDCA4EC8F06BFD01626B4C@Bodensee.bsz-bw.de> <529F0E4C.2000006@web.de> Message-ID: Hi, > Bug 7934 - Separate po file for help pages > http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7934 > > I submitted a patch for this. Perhaps someone can test it Bernardo -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.begin at inLibro.com Mon Dec 9 18:05:55 2013 From: eric.begin at inLibro.com (=?ISO-8859-1?Q?Eric_B=E9gin?=) Date: Mon, 09 Dec 2013 12:05:55 -0500 Subject: [Koha-translate] [Koha-devel] Issue with boostrap translation in 3.14 In-Reply-To: <52A5E41B.7080002@inLibro.com> References: <52A5E41B.7080002@inLibro.com> Message-ID: <52A5F873.8020305@inLibro.com> Hi, It seems that the script was not the problem. We had a flaw in our work flow. We were not retrieving the new version of the .po file from the right location (that doesn't help) :) I'm glad to see that it was not a major issue :) Eric B?gin Solutions inLibro inc. On 2013-12-09 10:39, Philippe Blouin wrote: > (posted to both koha-translate and koha-devl) > > Hol? koha! > > Anyone else has issue with boostrap translation in 3.14? Seems a lot > of strings are not picked up by "translate update" anymore, due to not > being "obvious" to the tool anymore. > > For example: > opac-tmpl/bootstrap/en/includes/masthead.inc : 131 >