From d4c60cb4503b47d8e18298f83dea936eb9a733bc Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Mon, 27 Feb 2017 09:32:24 +0000 Subject: [PATCH] BUG 18110 : Correct display and syspref AddFormat Add a field FR to the syspref AddressFormat Testplan 1 - Apply patch 2 - Check if there is a field FR in the syspref AddressFormat, enable it 3 - Create a new borrower and check the order of the fields for the address 4 - Check if it's address appears in a propper manner 27/02/17 : Fixed the display --- installer/data/mysql/sysprefs.sql | 2 +- .../en/includes/member-alt-address-style-fr.inc | 148 +++++++++++++++++++++ .../en/includes/member-alt-contact-style-fr.inc | 112 ++++++++++++++++ .../includes/member-display-address-style-fr.inc | 21 +++ .../member-display-alt-address-style-fr.inc | 21 +++ .../en/includes/member-main-address-style-fr.inc | 125 +++++++++++++++++ .../en/modules/admin/preferences/i18n_l10n.pref | 1 + 7 files changed, 429 insertions(+), 1 deletion(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-fr.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-fr.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index c9c86a2..871aa01 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -6,7 +6,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), -('AddressFormat','us','','Choose format to display postal addresses', 'Choice'), +('AddressFormat','us','us | de | fr','Choose format to display postal addresses', 'Choice'), ('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'), ('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option. Example: eng|fre|ita','Textarea'), ('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc new file mode 100644 index 0000000..9c000fa --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc @@ -0,0 +1,148 @@ +
+Alternate address
    + +[% UNLESS noB_streetnumber %] +
  1. + [% IF ( mandatoryB_streetnumber ) %] +
  2. +[% END %] + +[% IF roadtypes %] +
  3. + [% IF ( mandatoryB_streettype ) %] +
  4. +[% END %] + +[% UNLESS noB_address %] +
  5. + [% IF ( mandatoryB_address ) %] +
  6. +[% END %] + +[% UNLESS noB_address2 %] +
  7. + [% IF ( mandatoryB_address2 ) %] +
  8. +[% END %] +[% UNLESS noB_zipcode %] +
  9. + [% IF ( mandatoryB_zipcode ) %] +
  10. +[% END %] +[% UNLESS noB_city %] +
  11. + [% IF ( mandatoryB_city ) %] +
  12. +[% END %] +[% UNLESS noB_state %] +
  13. + [% IF ( mandatoryB_state ) %] +
  14. +[% END %] +[% UNLESS noB_country %] +
  15. + [% IF ( mandatoryB_country ) %] +
  16. +[% END %] +[% UNLESS noB_phone %] +
  17. + [% IF ( mandatoryB_phone ) %] +
  18. +[% END %] +[% UNLESS noB_email %] +
  19. + [% IF ( mandatoryB_email ) %] +
  20. +[% END %] +[% UNLESS nocontactnote %] +
  21. + [% IF ( mandatorycontactnote ) %] +
  22. + [% END %] +
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc new file mode 100644 index 0000000..38caca0 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc @@ -0,0 +1,112 @@ +
+ Alternate contact
    +[% UNLESS noaltcontactsurname %] +
  1. + [% IF ( mandatoryaltcontactsurname ) %] +
  2. +[% END %] +[% UNLESS noaltcontactfirstname %] +
  3. + [% IF ( mandatoryaltcontactfirstname ) %] +
  4. +[% END %] +[% UNLESS noaltcontactaddress1 %] +
  5. + [% IF ( mandatoryaltcontactaddress1 ) %] +
  6. +[% END %] +[% UNLESS noaltcontactaddress2 %] +
  7. + [% IF ( mandatoryaltcontactaddress2 ) %] +
  8. +[% END %] +[% UNLESS noaltcontactzipcode %] +
  9. + [% IF ( mandatoryaltcontactzipcode ) %] +
  10. +[% END %] +[% UNLESS noaltcontactaddress3 %] +
  11. + [% IF ( mandatoryaltcontactaddress3 ) %] +
  12. +[% END %] +[% UNLESS noaltcontactstate %] +
  13. + [% IF ( mandatoryaltcontactstate ) %] +
  14. +[% END %] +[% UNLESS noaltcontactcountry %] +
  15. + [% IF ( mandatoryaltcontactcountry ) %] +
  16. +[% END %] +[% UNLESS noaltcontactphone %] +
  17. + [% IF ( mandatoryaltcontactphone ) %] +
  18. +[% END %] +
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-fr.inc new file mode 100644 index 0000000..5d4f197 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-fr.inc @@ -0,0 +1,21 @@ +[% IF ( address or address2 ) %] + [% IF ( address ) %] + [% SET roadtype_desc = '' %] + [% IF streettype %] + [% SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', streettype) %] + [% END %] +
  • + [% IF streetnumber %] [% streetnumber %][% END %] + [%IF roadtype_desc %] [% roadtype_desc %][% END %] +
  • +
  • [% address %] +
  • + [% END %] + [% IF ( address2 ) %] +
  • [% address2 %]
  • + [% END %] +[% END %] +[% IF ( city ) %]
  • + [%IF (zipcode ) %][% zipcode %] [% END %][% city %][% IF ( state ) %]
    [% state %][% END %] + [% IF ( country ) %]
    [% country %][% END %]
  • +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-fr.inc new file mode 100644 index 0000000..fa98ba4 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-fr.inc @@ -0,0 +1,21 @@ +[% IF ( B_address or B_address2 ) %] + [% IF ( B_address ) %] + [% SET roadtype_desc = '' %] + [% IF B_streetnumber %] [% B_streetnumber %][% END %] + [% IF B_streettype %] + [% SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', B_streettype) %] + [% END %] +
  • [% B_address %] + [%IF roadtype_desc %] [% roadtype_desc %][% END %] +
  • + [% END %] + [% IF ( B_address2 ) %] +
  • [% B_address2 %]
  • + [% END %] +[% END %] +[% IF ( B_city ) %]
  • + [%IF ( B_zipcode ) %][% B_zipcode %] [% END %] + [% B_city %] + [% IF ( B_state ) %]
    [% B_state %][% END %] + [% IF ( B_country ) %]
    [% B_country %][% END %]
  • +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc new file mode 100644 index 0000000..e666ef9 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc @@ -0,0 +1,125 @@ +
    + Main address
      +[% UNLESS nostreetnumber %] +
    1. + [% IF ( mandatorystreetnumber ) %] +
    2. +[% END %] +[% UNLESS nostreettype %] + [% IF roadtypes %] +
    3. + [% IF ( mandatorystreettype ) %] +
    4. + [% END %] +[% END %] +[% UNLESS noaddress %] +
    5. + [% IF ( mandatoryaddress ) %] +
    6. +[% END %] +[% UNLESS noaddress2 %] +
    7. + [% IF ( mandatoryaddress2 ) %] +
    8. +[% END %] +[% UNLESS nozipcode %] +
    9. + [% IF ( mandatoryzipcode ) %] +
    10. +[% END %] +[% UNLESS nocity %] +
    11. + [% IF ( mandatorycity ) %] +
    12. +[% END %] +[% UNLESS nostate %] +
    13. + [% IF ( mandatorystate ) %] +
    14. +[% END %] +[% UNLESS nocountry %] +
    15. + [% IF ( mandatorycountry ) %] +
    16. +[% END %] +
    +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref index 6f7e60a..0741d3b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref @@ -58,3 +58,4 @@ I18N/L10N: choices: us: US style ([Street number], [Address] - [City], [ZIP/Postal Code], [Country]) de: German style ([Address] [Street number] - [ZIP/Postal Code] [City] - [Country]) + fr: French style ([Street number] [Address] - [ZIP/Postal Code] [City] - [Country]) -- 2.7.4