Summary: | Aquisitions from external source not working for non english language | ||
---|---|---|---|
Product: | Koha | Reporter: | Mark Hofstetter <koha> |
Component: | Acquisitions | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, julian.maurice, koha, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
21.11.00,21.05.03
|
Circulation function: | |
Bug Depends on: | 23302 | ||
Bug Blocks: | |||
Attachments: |
Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results
Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results Bug 28773: (QA follow-up) Additional changes |
Description
Mark Hofstetter
2021-07-28 09:46:42 UTC
Created attachment 123244 [details] [review] Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results For translated interface. Using 'Order' (the button text) was not a good idea as the interface can be translated :) This is my try but I am not happy with it. Letting Mark having his try! Honestly - I wouldn't have done it differently, and if so only worse. But I tested it and it works now. On my behalf I'd sign it off, thx a lot Created attachment 123277 [details] [review] Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results For translated interface. Using 'Order' (the button text) was not a good idea as the interface can be translated :) Signed-off-by: Mark Hofstetter <koha@trust-box.at> Marcel, can you QA this one please? (In reply to Jonathan Druart from comment #5) > Marcel, can you QA this one please? Sure (In reply to Jonathan Druart from comment #1) > For translated interface. > > Using 'Order' (the button text) was not a good idea as the interface can > be translated :) Hmm. The problem is not the button text, but the title attribute. Some attributes are also translated: <li><a class="chosen" data-action="order" href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]" title="Bestellung"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a></li> xgettext.pl contains: if ( $a =~ /title|value|alt|content|placeholder|aria-label/ ) { But your patch resolves the bug with another (untranslated) attribute. We only have an existing inconsistency where Order is translated via tp but MARC and Card are going via the regular translation path. WARNING: OUT OF SCOPE Just strolling into I18N, I am seeing this: sub _expand { my ($text, %vars) = @_; my $re = join '|', map { quotemeta $_ } keys %vars; $text =~ s/\{($re)\}/defined $vars{$1} ? $vars{$1} : "{$1}"/ge; Can this be true? Created attachment 123291 [details] [review] Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results For translated interface. Using 'Order' (the button text) was not a good idea as the interface can be translated :) Signed-off-by: Mark Hofstetter <koha@trust-box.at> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Just wait Created attachment 123292 [details] [review] Bug 28773: (QA follow-up) Additional changes The work of the first patch was not yet finished. [1] Similar changes to template for Cataloging and Authorities [2] Made a better distinction now between short title on button and long title on menu and modal [3] The short title parameter removes need for previewed var [4] To keep related code closer, moved the dataPreview hidden code Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Julian, Could you have a look at comment9 ? How do you get the result with defined $x evaluated ? Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.03 Depends on Bug 23302 not in 20.11.x |