[Bug 7327] New: Translation script doesn't like concatenated javascript strings
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7327 Bug #: 7327 Summary: Translation script doesn't like concatenated javascript strings Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 - low Component: I18N/L10N AssignedTo: frederic@tamil.fr ReportedBy: katrin.fischer@bsz-bw.de QAContact: ian.walls@bywatersolutions.com I noticed that some alerts are (no longer?) translated. Example: cat-toolbar.inc is_confirmed= alert(_('There are [ '+ count +' ] item(s) attached to this record \n You must delete all items before deleting this record.')); This string doesn't get translated at all now. Also the \n is not good because it causes problems in Pootle. The only solution to make this translatable seems to be: is_confirmed= alert(_("There are [ ") + count + _(" ] item(s) attached to this record.") + "\n" + _("You must delete all items before deleting this record." By splitting it up into several part the sentence is very hard to translate. Also small pieces like "Delete" or "There are" are difficult, because you might want to use different words for it in your translation. It would be better if we can make the translation script deal with those strings and make it put in placeholders. So you would end up with: is_confirmed= alert(_('There are [ '+ count +' ] item(s) attached to this record \n You must delete all items before deleting this record.')); Output in po-file: There are [ %s ] item(s) attached to this record. ... I think this is a bug now, because those alerts don't get translated at all. Splitting them up is one solution, but fixing the translation scripts would be much better. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|frederic@tamil.fr |chrish@catalyst.net.nz -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7327 Aleksa <aleksa@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff AssignedTo|chrish@catalyst.net.nz |aleksa@catalyst.net.nz --- Comment #1 from Aleksa <aleksa@catalyst.net.nz> 2012-01-30 22:54:55 UTC --- Created attachment 7392 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7392 Translate scripts now handle javascript variables inside strings. The translation scripts now convert variables into '%s' when generating or reading from .po files, and convert '%s' into variables when creating translated .tt files. This means that it should work when creating, updating, or installing a language. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7327 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> 2012-02-07 17:26:50 UTC --- What is a test plan for this? Is it necessary to edit the .po file to test? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7327 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #3 from Liz Rea <wizzyrea@gmail.com> 2012-02-07 18:21:16 UTC --- I was testing this and noted some anomalies - namely that the javascript menus were broken after running the new translation scripts. I would have to spend some time looking at po files that were right before I could determine whether or not the script is working correctly - things looked mighty strange in there to me. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I can reproduce the problems with javascript Liz noted. This is my test plan: 1) Applied the patch 2) Ran perl translate update <langcode> on 2 languages (de-DE, it-IT) 3) Ran perl translate install <langcode) on my 2 languages 4) Turned on those languages in systempreferences 5) Checked - normal templates - javascript toolbars (example: circulation? - XSLT translation (OPAC, staff) - javascript error messages (cataloging, trying to delete record with items) Examples for found problems: - Toolbar in patron account in staff (circulation) - OPAC deatail page - item tabs and more searches -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED Resolution|--- |DUPLICATE --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** This bug has been marked as a duplicate of bug 12138 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org