The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield"
Created attachment 45394 [details] [review] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield" To test: - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code
Your patch works as described. But the UI change a little bit. Without your patch, the 'Transferred items' table on branchtransfers.pl page contains 7 columns: Title, Author, Barcode, Shelving location, Call number, Type, To With your patch, the same table contains 6 columns: Title, Author, Barcode, Shelving location, Call number, Item type, Collection code, Destination Without your patch, the 'Type' labelled column contains the item type specified in syspref BranchTransferLimitsType (ccode or item type). With you patch, both column are simply displayed. It's not an issue from my perspective. It could even be intersting to display both info there. But it could be perceived as a regression by some libraries that don't use CCODE for example. The use of Administration > Configure columns functionalities could be a solution in the long run. But in the meantime, couldn't you just add "id" to the table <th> and <td> tags in order to allow hiding them with JS?
Created attachment 45486 [details] [review] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield" To test: - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code (Amended to add ids to table and 8 columns, see comment #2)
Frédéric, I added ids to the th and td tags of the 8 columns only, please let me know if the table itself needs an id as well.
(In reply to Marc Véron from comment #4) > Frédéric, I added ids to the th and td tags of the 8 columns only, please > let me know if the table itself needs an id as well. No, its perfect. Just one important detail: it is necessary to have 'class' argument for 'td' tag, and 'id' for 'th'. I can do it if you want. This way 'ccode' column could be hidden with that js: $('#circ_branchtransfers').ready(function() { $('.ccode').hide(); $('#ccode').hide(); });
Created attachment 45487 [details] [review] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield" To test: - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code (Amended to add ids to table and 8 columns, see comment #2) (Amended for comment #5)
Created attachment 45488 [details] [review] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield" To test: - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code (Amended to add ids to table and 8 columns, see comment #2) (Amended for comment #5) Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Comment on attachment 45488 [details] [review] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence Review of attachment 45488 [details] [review]: ----------------------------------------------------------------- ::: circ/branchtransfers.pl @@ +203,4 @@ > my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} ); > $err{tbr} = $branches->{ $tbr }->{'branchname'}; > $err{code} = $typecode; > + $err{codeType} = C4::Context->preference("BranchTransferLimitsType"); Retrieve it from the template using Koha.Preference ::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ +175,4 @@ > <table> > <caption>Transferred items</caption> > <tr> > + <th id="title">Title</th> Why do you id an id here? title, author, ccode, etc. are too much generic. A class name should be enough (th.title/td.title).
Created attachment 45506 [details] [review] Bug 15301: (followup) Translatability: branchtransfers.tt Followup for comment #8
Created attachment 45507 [details] [review] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield" To test: - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code (Amended to add ids to table and 8 columns, see comment #2) (Amended for comment #5) Followup for comment #8 Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Marc, I've merged your follow-up with the initial patch for readability purpose.
(In reply to Frédéric Demians from comment #11) > Marc, I've merged your follow-up with the initial patch for readability > purpose. That's perfect, thanks!
Created attachment 45516 [details] [review] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield" To test: - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code (Amended to add ids to table and 8 columns, see comment #2) (Amended for comment #5) Followup for comment #8 Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 46036 [details] [review] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield" To test: - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code (Amended to add ids to table and 8 columns, see comment #2) (Amended for comment #5) Followup for comment #8 Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Pushed to master - thanks