Bugzilla – Attachment 16372 Details for
Bug 9745
Don't nuke translated permissions with changes introduced in bug 9382
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9745 - don't nuke translated strings in permissions on DB upgrade
Bug-9745---dont-nuke-translated-strings-in-permiss.patch (text/plain), 6.28 KB, created by
Magnus Enger
on 2013-03-19 11:39:39 UTC
(
hide
)
Description:
Bug 9745 - don't nuke translated strings in permissions on DB upgrade
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2013-03-19 11:39:39 UTC
Size:
6.28 KB
patch
obsolete
>From a593275f8fa258ea116c48edf66adc156f1d3f29 Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Tue, 5 Mar 2013 11:39:54 +1300 >Subject: [PATCH] Bug 9745 - don't nuke translated strings in permissions on > DB upgrade > >To test: > >(this is best done by someone who has a database with translated strings for user permissions - I'm looking towards Katrin. :)) > >Get a 3.6-3.8 era database loaded as test data - also please use a low value test database. >Translate or change the strings in the database for the user permissions that follow > >in mysql client (for those who didn't install with a different language that has translated files at install time) - > >update userflags set flagdesc="Translated text 1" where flag IN('catalogue','editauthorities','reports','management','serials','updatecharges','circulate','parameters','borrowers','tools','staffaccess','edit_patrons'); >(you will notice that this changes all of the permission labels in the interface to "translated text 1" for the affected permission flags. This is why I don't want you to use a high value test database.) > >Update that to master + this patch - your "translations" should be intact. > >Blow that database away, and make a brand new one 3.6-3.8 era with the english database definitions. Run the update again with this patch, the strings should be updated correctly. > >Signed-off-by: Magnus Enger <magnus@enger.priv.no> >There was a typo in the patch, the first database update had to be >changed from this: $dbh->do{(q{ to this: $dbh->do(q{ > >* Test 1: >- git checkout v3.06.05 >- Run through the web installer in Norwegian, installing all > Norwegian sample data >- git checkout <master + patch for bug 9745> >- Run web installer/upgrade >- Almost all of the permissions are still in Norwegian. The ones > that are in English are not touched by the database update for > 3.11.00.016, so they must have been introduced by other updates. > >* Test 2: >- git checkout v3.06.05 >- Run through the web installer in English, installing all English > sample data >- git checkout <master + patch for bug 9745> >- Run web installer/upgrade >- All permissions have been updated as expected, except "Perform > batch modification of patrons" which is not in the 'userflags' > table, but in the 'permissions' table. I have amended the patch > to account for this. > >Two fixes to the original patch, please give a shout if this >makes a second signoff necessary! >--- > installer/data/mysql/updatedatabase.pl | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index f0a9269..bf5b324 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6350,43 +6350,43 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > $DBversion = "3.11.00.016"; > if ( CheckVersion($DBversion) ) { > $dbh->do(q{ >- UPDATE userflags SET flagdesc="<b>Required for staff login.</b> Staff access, allows viewing of catalogue in staff client." where flag="catalogue"; >+ UPDATE userflags SET flagdesc="<b>Required for staff login.</b> Staff access, allows viewing of catalogue in staff client." where flagdesc="Modify login / permissions for staff users"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Edit Authorities" where flag="editauthorities"; >+ UPDATE userflags SET flagdesc="Edit Authorities" where flagdesc="Allow to edit authorities"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Allow access to the reports module" where flag="reports"; >+ UPDATE userflags SET flagdesc="Allow access to the reports module" where flagdesc="Allow to access to the reports module"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Set library management parameters (deprecated)" where flag="management"; >+ UPDATE userflags SET flagdesc="Set library management parameters (deprecated)" where flagdesc="Set library management parameters"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Manage serial subscriptions" where flag="serials"; >+ UPDATE userflags SET flagdesc="Manage serial subscriptions" where flagdesc="Allow to manage serials subscriptions"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Manage patrons fines and fees" where flag="updatecharges"; >+ UPDATE userflags SET flagdesc="Manage patrons fines and fees" where flagdesc="Update borrower charges"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Check out and check in items" where flag="circulate"; >+ UPDATE userflags SET flagdesc="Check out and check in items" where flagdesc="Circulate books"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Manage Koha system settings (Administration panel)" where flag="parameters"; >+ UPDATE userflags SET flagdesc="Manage Koha system settings (Administration panel)" where flagdesc="Set Koha system parameters"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Add or modify patrons" where flag="borrowers"; >+ UPDATE userflags SET flagdesc="Add or modify patrons" where flagdesc="Add or modify borrowers"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Use all tools (expand for granular tools permissions)" where flag="tools"; >+ UPDATE userflags SET flagdesc="Use all tools (expand for granular tools permissions)" where flagdesc="Use tools (export, import, barcodes)"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Allow staff members to modify permissions for other staff members" where flag="staffaccess"; >+ UPDATE userflags SET flagdesc="Allow staff members to modify permissions for other staff members" where flagdesc="Set user permissions"; > }); > $dbh->do(q{ >- UPDATE userflags SET flagdesc="Perform batch modification of patrons" where flag="edit_patrons"; >+ UPDATE permissions SET flagdesc="Perform batch modification of patrons" where flagdesc="Perform batch modifivation of patrons"; > }); > >- print "Upgrade to $DBversion done (Bug 9382 - refresh permission descriptions to make more sense)\n"; >+ print "Upgrade to $DBversion done (Bug 9382 (updated with bug 9745) - refresh permission descriptions to make more sense)\n"; > SetVersion ($DBversion); > } > >-- >1.7.9.5
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 9745
:
15868
|
16372
|
16908