From 30193e33d825ec56b8e26e99c9fc9dffe0428e51 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 7 Aug 2013 16:10:52 +0200 Subject: [PATCH] Bug 10521: Prepare de-DE optional sql files for conversion Content-Type: text/plain; charset=utf-8 Makes some manual changes to .sql files before converting them to new format for use with i18n function. Sample creator data: Remove lock statements, add column names Sample holidays: Add column names Sample itemtypes: Convert into one insert statement with multiple values Sample news: Add column name Test plan: See next patch for de-DE optional files. --- .../mysql/de-DE/optional/sample_creator_data.sql | 23 ++----------------- .../data/mysql/de-DE/optional/sample_holidays.sql | 2 +- .../data/mysql/de-DE/optional/sample_itemtypes.sql | 17 +++++++------- .../data/mysql/de-DE/optional/sample_news.sql | 3 +- 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/installer/data/mysql/de-DE/optional/sample_creator_data.sql b/installer/data/mysql/de-DE/optional/sample_creator_data.sql index 7ac0a31..03fec5b 100644 --- a/installer/data/mysql/de-DE/optional/sample_creator_data.sql +++ b/installer/data/mysql/de-DE/optional/sample_creator_data.sql @@ -1,9 +1,4 @@ -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; - -LOCK TABLES `creator_layouts` WRITE; -/*!40000 ALTER TABLE `creator_layouts` DISABLE KEYS */; -INSERT INTO `creator_layouts` VALUES (17,'CODE39',1,'BIBBAR','Label Test',0,'TR',3,'POINT',0,'L','title, author, isbn, issn, itemtype, barcode, itemcallnumber','','Labels'),(18,'CODE39',1,'BAR','DEFAULT',0,'TR',3,'POINT',0,'L','title, author, isbn, issn, itemtype, barcode, itemcallnumber','','Labels'),(19,'CODE39',1,'BAR','DEFAULT',0,'TR',3,'POINT',0,'L','title, author, isbn, issn, itemtype, barcode, itemcallnumber','','Labels'),(20,'CODE39',1,'BAR','Test Layout',0,'TR',10,'POINT',0,'L','barcode',' +INSERT INTO `creator_layouts` (layout_id, barcode_type, start_label, printing_type, layout_name, guidebox, font, font_size, units, callnum_split, text_justify, format_string, layout_xml, creator) VALUES (17,'CODE39',1,'BIBBAR','Label Test',0,'TR',3,'POINT',0,'L','title, author, isbn, issn, itemtype, barcode, itemcallnumber','','Labels'),(18,'CODE39',1,'BAR','DEFAULT',0,'TR',3,'POINT',0,'L','title, author, isbn, issn, itemtype, barcode, itemcallnumber','','Labels'),(19,'CODE39',1,'BAR','DEFAULT',0,'TR',3,'POINT',0,'L','title, author, isbn, issn, itemtype, barcode, itemcallnumber','','Labels'),(20,'CODE39',1,'BAR','Test Layout',0,'TR',10,'POINT',0,'L','barcode',' @@ -15,20 +10,8 @@ INSERT INTO `creator_layouts` VALUES (17,'CODE39',1,'BIBBAR','Label Test',0,'TR' ','Patroncards'); -/*!40000 ALTER TABLE `creator_layouts` ENABLE KEYS */; -UNLOCK TABLES; -LOCK TABLES `creator_templates` WRITE; -/*!40000 ALTER TABLE `creator_templates` DISABLE KEYS */; -INSERT INTO `creator_templates` VALUES (1,1,'Avery 5160 | 1 x 2-5/8','3 columns, 10 rows of labels',8.5,11,2.63,1,0.139,0,0.35,0.23,3,10,0.13,0,'INCH','Labels'),(7,13,'Demco WS14942260','1\" X 1.5\" Spine Label | Setup for up to four lines of text',8.5,11,1.5,1,0.236,0,0.5,0.25,5,10,0.0625,0,'INCH','Labels'),(12,14,'Demco WS14942260','1\" X 1.5\" Spine Label | Setup for five lines of text',8.5,11,1.5,1,0.139,0,0.53,0.3,5,10,0.0625,0,'INCH','Labels'),(22,0,'DEFAULT TEMPLATE 01','Default description',0,5,0,0,0,0,0,0,0,0,0,0,'POINT','Labels'),(23,16,'HB-PC0001','A template for home brewed patron card forms',8.5,11,3.1875,1.9375,0,0,0.6875,0.875,2,4,0.4375,0.1875,'INCH','Patroncards'); -/*!40000 ALTER TABLE `creator_templates` ENABLE KEYS */; -UNLOCK TABLES; +INSERT INTO `creator_templates` (template_id, profile_id, template_code, template_desc, page_width, page_height, label_width, label_height, top_text_margin, left_text_margin, top_margin, left_margin, cols, rows, col_gap, row_gap, units, creator) VALUES (1,1,'Avery 5160 | 1 x 2-5/8','3 columns, 10 rows of labels',8.5,11,2.63,1,0.139,0,0.35,0.23,3,10,0.13,0,'INCH','Labels'),(7,13,'Demco WS14942260','1\" X 1.5\" Spine Label | Setup for up to four lines of text',8.5,11,1.5,1,0.236,0,0.5,0.25,5,10,0.0625,0,'INCH','Labels'),(12,14,'Demco WS14942260','1\" X 1.5\" Spine Label | Setup for five lines of text',8.5,11,1.5,1,0.139,0,0.53,0.3,5,10,0.0625,0,'INCH','Labels'),(22,0,'DEFAULT TEMPLATE 01','Default description',0,5,0,0,0,0,0,0,0,0,0,0,'POINT','Labels'),(23,16,'HB-PC0001','A template for home brewed patron card forms',8.5,11,3.1875,1.9375,0,0,0.6875,0.875,2,4,0.4375,0.1875,'INCH','Patroncards'); -LOCK TABLES `printers_profile` WRITE; -/*!40000 ALTER TABLE `printers_profile` DISABLE KEYS */; -INSERT INTO `printers_profile` VALUES (1,'Library Laser',1,'Bypass',-2,9,3,0,'POINT','Labels'),(11,'Library Laser',1,'Tray 1',0,0,0,0,'POINT','Labels'),(16,'Test Printer 01',23,'Test Bin',0,0,0,0,'POINT','Patroncards'); -/*!40000 ALTER TABLE `printers_profile` ENABLE KEYS */; -UNLOCK TABLES; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +INSERT INTO printers_profile (profile_id, printer_name, template_id, paper_bin, offset_horz, offset_vert, creep_horz, creep_vert, units, creator) VALUES (1,'Library Laser',1,'Bypass',-2,9,3,0,'POINT','Labels'),(11,'Library Laser',1,'Tray 1',0,0,0,0,'POINT','Labels'),(16,'Test Printer 01',23,'Test Bin',0,0,0,0,'POINT','Patroncards'); diff --git a/installer/data/mysql/de-DE/optional/sample_holidays.sql b/installer/data/mysql/de-DE/optional/sample_holidays.sql index 124fcad..0d03a9f 100644 --- a/installer/data/mysql/de-DE/optional/sample_holidays.sql +++ b/installer/data/mysql/de-DE/optional/sample_holidays.sql @@ -1,4 +1,4 @@ -INSERT INTO `repeatable_holidays` VALUES +INSERT INTO repeatable_holidays (id,branchcode,weekday,day,month,title,description) VALUES (2,'MPL',0,NULL,NULL,'','Sonntag'), (3,'MPL',NULL,1,1,'','Neujahr'), (4,'MPL',NULL,25,12,'','1. Weihnachtsfeiertag'), diff --git a/installer/data/mysql/de-DE/optional/sample_itemtypes.sql b/installer/data/mysql/de-DE/optional/sample_itemtypes.sql index fb4e046..a101ade 100644 --- a/installer/data/mysql/de-DE/optional/sample_itemtypes.sql +++ b/installer/data/mysql/de-DE/optional/sample_itemtypes.sql @@ -1,8 +1,9 @@ -INSERT INTO `itemtypes` VALUES ('BK', 'Bücher',0,0,'bridge/book.gif',''); -INSERT INTO `itemtypes` VALUES ('MX', 'Medienkombinationen',0,0,'bridge/kit.gif',''); -INSERT INTO `itemtypes` VALUES ('CF', 'Datenträger',0,0,'bridge/computer_file.gif',''); -INSERT INTO `itemtypes` VALUES ('MP', 'Karten',0,0,'bridge/map.gif',''); -INSERT INTO `itemtypes` VALUES ('VM', 'AV-Medien',0,1,'bridge/dvd.gif',''); -INSERT INTO `itemtypes` VALUES ('MU', 'Musik',0,0,'bridge/sound.gif',''); -INSERT INTO `itemtypes` VALUES ('CR', 'Zeitschriften',0,0,'bridge/periodical.gif',''); -INSERT INTO `itemtypes` VALUES ('REF', 'Nachschlagewerke',0,1,'bridge/reference.gif',''); +INSERT INTO `itemtypes` (itemtype,description,rentalcharge,notforloan,imageurl,summary) VALUES +('BK', 'Bücher',0,0,'bridge/book.gif',''), +('MX', 'Medienkombinationen',0,0,'bridge/kit.gif',''), +('CF', 'Datenträger',0,0,'bridge/computer_file.gif',''), +('MP', 'Karten',0,0,'bridge/map.gif',''), +('VM', 'AV-Medien',0,1,'bridge/dvd.gif',''), +('MU', 'Musik',0,0,'bridge/sound.gif',''), +('CR', 'Zeitschriften',0,0,'bridge/periodical.gif',''), +('REF', 'Nachschlagewerke',0,1,'bridge/reference.gif',''); diff --git a/installer/data/mysql/de-DE/optional/sample_news.sql b/installer/data/mysql/de-DE/optional/sample_news.sql index e7a2e6e..6a61d44 100644 --- a/installer/data/mysql/de-DE/optional/sample_news.sql +++ b/installer/data/mysql/de-DE/optional/sample_news.sql @@ -1,2 +1,3 @@ -INSERT INTO `opac_news` VALUES (1,'Willkommen bei Koha','Willkommen bei Koha. Koha ist ein vollständiges integriertes Bibliothekssystem. Es wurde ursprünglich in Neuseeland von Katipo Communications Ltd entwickelt und ging im Januar 2000 für den Horowhenua Library Trust zum ersten mal in Produktion. Koha wird heute von einem internationalen Team aus Support-Dienstleistern und Anwendern weiterentwickelt.','koha','2007-10-29 05:25:58','2099-01-10',1), +INSERT INTO `opac_news` (idnew,title,new,lang,timestamp,expirationdate,number) VALUES +(1,'Willkommen bei Koha','Willkommen bei Koha. Koha ist ein vollständiges integriertes Bibliothekssystem. Es wurde ursprünglich in Neuseeland von Katipo Communications Ltd entwickelt und ging im Januar 2000 für den Horowhenua Library Trust zum ersten mal in Produktion. Koha wird heute von einem internationalen Team aus Support-Dienstleistern und Anwendern weiterentwickelt.','koha','2007-10-29 05:25:58','2099-01-10',1), (2,'Was kommt jetzt?','Wie geht es weiter, nachdem Sie Koha installiert haben? Hier einige Vorschläge:\r\n\r\n','koha','2007-10-29 05:34:45','2099-01-10',2); -- 1.7.7.6