Bugzilla – Attachment 61615 Details for
Bug 17762
Ability to translate notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17762: Add the new TranslateNotices syspref
Bug-17762-Add-the-new-TranslateNotices-syspref.patch (text/plain), 4.09 KB, created by
Jonathan Druart
on 2017-03-24 16:30:28 UTC
(
hide
)
Description:
Bug 17762: Add the new TranslateNotices syspref
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-03-24 16:30:28 UTC
Size:
4.09 KB
patch
obsolete
>From 3c604be730edd2c5b4daf3ffbf7b1bf71460f975 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Dec 2016 11:27:11 +0100 >Subject: [PATCH] Bug 17762: Add the new TranslateNotices syspref > >This whole patch set adds the ability to translate notices in different >languages. >That way, if a library has patrons from different countries, they will >not have to send the notices in only one language but they will be able to >translate them. > >Test plan: >- Switch on TranslateNotices >- Translate the interface in different languages >- Edit patron's details >=> You should see a new "prefered language" entry >That language will be used to send notices to this patron >- Edit several notice templates >=> You should see different tabs, 1 tab per language translated at the >opac (which sounds to make sense) >- Now the notice generated for this patron should be the one translated >in the language picked for him >To confirm that, try to generate several notices for this patron. >If the notice is not translated, the default one should be used. > >Sponsored-by: Orex Digital > >Signed-off-by: Hugo Agud <hagud@orex.es> >--- > installer/data/mysql/atomicupdate/bug_xxxxx.perl | 3 +++ > installer/data/mysql/sysprefs.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref | 7 +++++++ > 3 files changed, 11 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/bug_xxxxx.perl b/installer/data/mysql/atomicupdate/bug_xxxxx.perl >index b2e32ae..22583e9 100644 >--- a/installer/data/mysql/atomicupdate/bug_xxxxx.perl >+++ b/installer/data/mysql/atomicupdate/bug_xxxxx.perl >@@ -10,6 +10,9 @@ if( CheckVersion( $DBversion ) ) { > $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN lang VARCHAR(25) NOT NULL DEFAULT 'default' AFTER lastseen" ); > } > >+ $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) >+ VALUES ('TranslateNotices', '0', NULL, 'Allow notices to be translated', 'YesNo') "); >+ > SetVersion( $DBversion ); > print "Upgrade to $DBversion done (Bug XXXXX - Add columns letter.lang and borrowers.lang to allow translation of notices)\n"; > } >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index eaf856a..1d0b8fa 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -530,6 +530,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('TrackLastPatronActivity','0',NULL,'If set, the field borrowers.lastseen will be updated everytime a patron is seen','YesNo'), > ('TransfersMaxDaysWarning','3',NULL,'Define the days before a transfer is suspected of having a problem','Integer'), > ('TransferWhenCancelAllWaitingHolds','0',NULL,'Transfer items when cancelling all waiting holds','YesNo'), >+('TranslateNotices','0',NULL, 'Allow notices to be translated','YesNo'), > ('UNIMARCAuthorityField100','afrey50 ba0',NULL,'Define the contents of UNIMARC authority control field 100 position 08-35','Textarea'), > ('UNIMARCAuthorsFacetsSeparator',', ',NULL,'UNIMARC authors facets separator','short'), > ('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'), >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..e6e5024 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,10 @@ 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]) >+ - >+ - pref: TranslateNotices >+ choices: >+ yes: Allow >+ no: "Don't allow" >+ - notices to be translated. >+ - If set, notices will be translatable from the "Notices and Slips" interface. The language used to send a notice to a patron will be the one defined for the patron. >-- >2.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17762
:
58133
|
58134
|
58135
|
58136
|
58137
|
58138
|
58139
|
58140
|
58141
|
58525
|
59452
|
59453
|
59454
|
59455
|
59456
|
59457
|
59458
|
59459
|
59460
|
59461
|
61614
|
61615
|
61616
|
61617
|
61618
|
61619
|
61620
|
61621
|
61622
|
61623
|
61624
|
63199
|
63200
|
63201
|
63202
|
63203
|
63204
|
63205
|
63206
|
63207
|
63208
|
63209
|
63210
|
63211