---- Reported by nengard@gmail.com 2010-01-13 13:04:56 ---- In America addresses go 'street number' 'street name' 'street type' -- in France it goes 'street number' 'street type' 'street name' -- in Spain it goes 'street type' 'street name' 'street number'. This is coming across as a display problem on the patron records. So I'm wondering if there is a way that we can set up the templates to display the address in the way that the librarian chooses. Right now there are a few bugs related to the fact that the street number and/order street type doesn't even display - when I went to fix them I realize (with Owen's help) that I might be causing some internationalization issues. There are only 6 ( factorial(3) ) possibilities. A drop-down menu on system preferences? (I18N/L10N?) This is both a bug and an enhancement request I guess - so I don't know how to categorize it. ---- Additional Comments From oleonard@myacpl.org 2010-01-13 13:26:39 ---- Another format to keep in mind: P.O. Boxes. PO Box 627 ---- Additional Comments From nengard@gmail.com 2010-01-13 13:50:52 ---- I'm thinking in the PO Box instance that Address1 is the only field you'd fill in ... right? --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:22 UTC --- This bug was previously known as _bug_ 4041 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4041 Actual time not defined. Setting to 0.0
still relevant, and I think it's more an enhancement than a bugfix. Should be easier with T::T plugins !
We just ran into this again, giving it a little nudge :) In Germany I think it would be: <street name> <street number> <zipcode> <city> We don't use <street type> at the moment, I think often the part that would be street type is already part of the street name (-gasse, -straße). The state is not needed for addresses within Germany.
(In reply to Katrin Fischer from comment #2) > We just ran into this again, giving it a little nudge :) > > In Germany I think it would be: > > <street name> <street number> > <zipcode> <city> > > We don't use <street type> at the moment, I think often the part that would > be street type is already part of the street name (-gasse, -straße). > > The state is not needed for addresses within Germany. This also applies to Finland.
Same for Switzerland.
A possible solution could be to have the address blocks in different include files and to have a preference to choose them as appropriate. I will attach a patch for the staff interface (memberentry.pl) that could be a starting point for this idea. It simply extracts the address blocks to 3 includes (see patch that follows). The behaviour while adding / editing a patron will be the same as before. As a next step, different includes could be added for the different country styles, along with the functionality to select them using the syspref. What do others think of this idea?
Created attachment 35987 [details] [review] Bug 4041 - First step (staff interface): Extract address blocks to include files This patch extracts the address blocks in memberentrygen.tt to include files. To test: The overall functionality should remain the same with this patch. In further steps, more country- or region-dependent includes could be added, along with functionality to select them using a system preference.
Created attachment 35997 [details] [review] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix.
Created attachment 36250 [details] [review] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix.
Updated to make patch "Second Step" apply.
Created attachment 36252 [details] [review] Bug 4041 - First step (staff interface): Extract address blocks to include files This patch extracts the address blocks in memberentrygen.tt to include files. To test: The overall functionality should remain the same with this patch. In further steps, more country- or region-dependent includes could be added, along with functionality to select them using a system preference. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 36253 [details] [review] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Works for me. Not sure about the naming of the styles, maybe something more generic would be possible. »German style« should also move the street number for Main address.
Created attachment 36254 [details] [review] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Patch amended to move street number after address. /Marc
I think my amendement on Patch "Second step" needs a new Sign-off.
Created attachment 36255 [details] [review] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Patch amended to move street number after address. /Marc
Created attachment 36256 [details] [review] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Patch amended to move street number after address. /Marc Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 36352 [details] [review] Bug 4041 - Third step - Display address on patron's pages using the system preference This patch displays the address information in the left column of the patron's pages using the new system preference. The address is formatted in member-display-address-style-us.inc and member-display-address-style-de.inc To test: - Apply patch on top of 1st and 2nd patch - Select 'German style' in system preference 'addressformat' in I18N/L10N - Verify that the address information displays properly in the left column of all patron's pages. - Verify that the address displays properly in the main area of moremember.pl as well (Note: In right column, Alternate address /contact are not yet touched)) - Switch system preference to US style, repeat checks
Created attachment 36353 [details] [review] Bug 4041 - Third step - Display address on patron's pages using the system preference This patch displays the address information in the left column of the patron's pages using the new system preference. The address is formatted in member-display-address-style-us.inc and member-display-address-style-de.inc To test: - Apply patch on top of 1st and 2nd patch - Select 'German style' in system preference 'addressformat' in I18N/L10N - Verify that the address information displays properly in the left column of all patron's pages. - Verify that the address displays properly in the main area of moremember.pl as well (Note: In right column, Alternate address /contact are not yet touched)) - Switch system preference to US style, repeat checks Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Now "street type" is after the address. I would like to see a letter or a syspref to address this problem. We could imagine something like: [streettype] [address] [city] [phone] and in the template: [% FOR field in fields %] [% SWITCH field %] [% CASE 'streettype' %]Street type: [% streettype %] [% CASE 'address' %]Address: [% address %] ... [% END %] [% END %] We would avoid code duplication and it will be more customizable.
(In reply to Jonathan Druart from comment #19) In Germany and Switzerland, Street type is not used as a separate part, and it always would be after the name, often it is contained in the name. We would write: Baslerstrasse 50 for 50, rue de Bâle And we would not make use of the street type (because it is often a part of the street name as Katrin pointed out above). Drojf pointed out www.isotc211.org/address/iso19160.htm with a link to: www.isotc211.org/address/docs/211n3188_Review_Summary_19160_Addressing.pdf Very interesting, e.g.: "The correct order of elements for a French address will not necessarily be correct for a US address, and vice versa. Moreover, many Asian address systems use the opposite order of address elements than European ones (...)". It is almost impossible to cover all of the worldwide variations in a simple way. That's why I choose this approach. A new address format can easily be added (add new choice in preference and copy/edit includes with same postfix. Fallback is always US style). First I was thinking about kind of "configurator" like for "Notices and Slips" but it turned out to be a huge and complicated task (handling not only the display /output of addresses, but the field order for editing them as well including mandatory fields).
Created attachment 37295 [details] [review] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Patch amended to move street number after address. /Marc Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Amended do resolve conflict with updatedatabase.pl /Marc
Created attachment 37297 [details] [review] Bug 4041 - Third step - Display address on patron's pages using the system preference This patch displays the address information in the left column of the patron's pages using the new system preference. The address is formatted in member-display-address-style-us.inc and member-display-address-style-de.inc To test: - Apply patch on top of 1st and 2nd patch - Select 'German style' in system preference 'addressformat' in I18N/L10N - Verify that the address information displays properly in the left column of all patron's pages. - Verify that the address displays properly in the main area of moremember.pl as well (Note: In right column, Alternate address /contact are not yet touched)) - Switch system preference to US style, repeat checks Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> AMending without changes to put this patch at the end of the patch list / Marc
Created attachment 37661 [details] [review] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Patch amended to move street number after address. /Marc Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Amended do resolve conflict with updatedatabase.pl /Marc Rebased for current master /Marc
Created attachment 37667 [details] [review] [PASSED QA] Bug 4041 - First step (staff interface): Extract address blocks to include files This patch extracts the address blocks in memberentrygen.tt to include files. To test: The overall functionality should remain the same with this patch. In further steps, more country- or region-dependent includes could be added, along with functionality to select them using a system preference. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 37668 [details] [review] [PASSED QA] Bug 4041 - Third step - Display address on patron's pages using the system preference This patch displays the address information in the left column of the patron's pages using the new system preference. The address is formatted in member-display-address-style-us.inc and member-display-address-style-de.inc To test: - Apply patch on top of 1st and 2nd patch - Select 'German style' in system preference 'addressformat' in I18N/L10N - Verify that the address information displays properly in the left column of all patron's pages. - Verify that the address displays properly in the main area of moremember.pl as well (Note: In right column, Alternate address /contact are not yet touched)) - Switch system preference to US style, repeat checks Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> AMending without changes to put this patch at the end of the patch list / Marc Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 37669 [details] [review] [PASSED QA] Bug 4041 - Second Step: Add system preference and "German style" address formats for staff To test: Apply patch Do a database update (e.g. by changing version number in kohaversion.pl) Find new system preference 'addressformat' in I18N/L10N Choose 'German style' Go to Patrons and edit a patron / create new patron Verify that Zip code appears above City Change system preference to 'US style' Verify that Zip code appears between State and Country. BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Patch amended to move street number after address. /Marc Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Amended do resolve conflict with updatedatabase.pl /Marc Rebased for current master /Marc Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 37670 [details] [review] [PASSED QA] Bug 4041 [QA Followup] * Convert all tabs to 4 spaces * Tidy block in members/boraccount ( tab ) * Move syspref to it's proper place Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 37671 [details] [review] [PASSED QA] Bug 4041 [QA Followup] - Change addressformat to AddressFormat Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 38187 [details] [review] Bug 4041 [QA Followup] - Change addressformat to AddressFormat Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Amended to resolve easy conflict in installer/data/mysql/sysprefs.sql /MV
Guys, could you please change it so a user who is not used to the "us format" or the "german format" can know what the syspref actually does? I'll make it explicit just in case: Please provide a followup (SYSPREF DESCRIPTION ONLY) so it says something like: US format (Street Nº - City - ...) German format (...) Thanks, looking forward to integrate this one ASAP. Also, there's one patch (the last two) that needs to be deprecated.
Created attachment 38623 [details] [review] [PASSED QA] Bug 4041 [QA Followup] - Change addressformat to AddressFormat Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> ---- Amended to resolve conflict in sysprefs.sql / mveron
Comment on attachment 37670 [details] [review] [PASSED QA] Bug 4041 [QA Followup] Replaced by amended version to make it apply
Created attachment 38625 [details] [review] [Follow-up] Bug 4041 - Explain address format style in system preferences See comment #30 by Tomás Cohen Arazi
Enhancement pushed to master. Thanks Marc!