Bug 11396 - SQL translated files not in phase with original 'en' version
Summary: SQL translated files not in phase with original 'en' version
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Frédéric Demians
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 05:58 UTC by Frédéric Demians
Modified: 2014-12-07 20:02 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch (10.83 KB, patch)
2013-12-16 07:02 UTC, Frédéric Demians
Details | Diff | Splinter Review
Fix test fr-FR user permissions SQL (1.22 KB, patch)
2013-12-16 07:06 UTC, Frédéric Demians
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Demians 2013-12-16 05:58:30 UTC
In 'installer/data/mysql/en', there are SQL files used to prepopulate Koha DB during installation. If another language than English is chosen during installation, SQL files are retrieved in 'installer/data/mysql/<language>' directory.

A SQL file translated version, with time, may differ from the original 'en' version. A developer can add a value to an 'en' English file, and nobody reports this value into the translated version.

Sample 1: installer/data/mysql/en/mandatory/userflags.sql contains flags for managing Koha user permissions. There are now 19 values in the English version of the file. But in installer/data/mysql/fr-FR/1-Obligatoire/userflags.sql, there are only 18 flags. User flags 17-parameter is missing.

Sample 2: installer/data/mysql/en/marcflavour/marc21/mandatory/authorities_normal_marc21.sql contains definition of authorities framework. A translated version exists for other languages.

A test must verify that SQL files translated version stay in phase with the 'en' version.
Comment 1 Frédéric Demians 2013-12-16 07:02:11 UTC
Created attachment 23560 [details] [review]
Proposed patch

Bug 11396 Test translated SQL installer files

Identify missing/supernumeray SQL INSERT in translated SQL files. It
would help to avoid inconsitency between master 'en' SQL files and
translated version.

Several SQL files are tested:

- user flags
- user permission
- biblio framework
- authorities framework

biblio/authorities framework are in the code, but not yet enabled.

To test on master:

(1) prove -v xt/db_translate.t
(2) You can see that fr-FR/1-Obligatoire/userflags.sql is missing one
    user flag: 17-staff access.
(3) Edit fr-FR/1-Obligatoire/userflags.sql. Add this line:
    INSERT INTO `userflags` VALUES(17,'staffaccess','Autorisation de
    modifier les permissions des autres utilisateurs',0);
(4) prove -v xt/db_translate.t
    No more test failing.
(5) Edit de-DE/mandatory/userpermissions.sql. Suppress line 2.
(6) Run the test: you get a new test fail
Comment 2 Frédéric Demians 2013-12-16 07:06:05 UTC
Created attachment 23561 [details] [review]
Fix test fr-FR user permissions SQL
Comment 3 Marcel de Rooy 2013-12-16 07:35:05 UTC
(In reply to Frédéric Demians from comment #0)
> A SQL file translated version, with time, may differ from the original 'en'
> version. A developer can add a value to an 'en' English file, and nobody
> reports this value into the translated version.

Please have a look at the report series 10509, 10520, 10521 etc. They did not attract much attention, but it should have been a way to overcome this problem..
Comment 4 Katrin Fischer 2013-12-17 09:11:48 UTC
Hi Frederic, I think we even have a test for that, so wondering why it was not caught:
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=xt/permissions.t;h=64998cea0a422b6ec3ef898b78713c8734a55f6e;hb=HEAD

I have done some updates on the German installer for 3.14 in bug 11260 - maybe you want to take a look if some of the other changes also apply to fr-FR.
Comment 5 Katrin Fischer 2014-05-17 11:01:54 UTC
I verified that xt/permissions.t passes and that the French userflags.sql file lists the staffaccess permission correctly:

INSERT INTO `userflags` VALUES(17,'staffaccess','Autorise les bibliothécaires à modifier les permissions d''autres bibliothécaires',0);