From f4e2e0e8cc96cc081c0dd7a8c4e921892b080b96 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Tue, 14 Feb 2017 09:58:23 +0000 Subject: [PATCH] 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 https://bugs.koha-community.org/show_bug.cgi?id=18110 --- installer/data/mysql/sysprefs.sql | 3 +- .../en/includes/member-alt-address-style-fr.inc | 147 +++++++++++++++++++++ .../en/includes/member-alt-contact-style-fr.inc | 112 ++++++++++++++++ .../includes/member-display-address-style-fr.inc | 19 +++ .../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, 427 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 8329720..d588195 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'), @@ -234,6 +234,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('LinkerModule','Default','Default|FirstMatch|LastMatch','Chooses which linker module to use (see documentation).','Choice'), ('LinkerOptions','','','A pipe-separated list of options for the linker.','free'), ('LinkerRelink','1',NULL,'If ON the authority linker will relink headings that have previously been linked every time it runs.','YesNo'), +('LoadSearchHistoryToTheFirstLoggedUser', '1', NULL, 'If ON, the next user will automatically get the last seaches in his history', 'YesNo'), ('LocalCoverImages','0','1','Display local cover images on intranet details pages.','YesNo'), ('LocalHoldsPriority', '0', NULL, 'Enables the LocalHoldsPriority feature', 'YesNo'), ('LocalHoldsPriorityItemControl', 'holdingbranch', 'holdingbranch|homebranch', 'decides if the feature operates using the item''s home or holding library.', '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..7d0d5de --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc @@ -0,0 +1,147 @@ +
+Alternate address
    +[% UNLESS noB_address %] +
  1. + [% IF ( mandatoryB_address ) %] +
  2. +[% END %] + +[% UNLESS noB_streetnumber %] +
  3. + [% IF ( mandatoryB_streetnumber ) %] +
  4. +[% END %] + +[% IF roadtypes %] +
  5. + [% IF ( mandatoryB_streettype ) %] +
  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..36c1437 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-fr.inc @@ -0,0 +1,19 @@ +[% 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..21e4d17 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc @@ -0,0 +1,125 @@ +fieldset class="rows" id="memberentry_mainaddress"> + 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