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.
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
Created attachment 23561 [details] [review] Fix test fr-FR user permissions SQL
(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..
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.
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);