From f9ce050247243d9476fc6a0ce6f472ce95e525a9 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 31 May 2008 13:34:06 +0000 Subject: * xml/pl/istoria.xml: Fix an open tag. * cgi-bin/dico-ellinika.scm4: Fix info and descr, pass target language as an argument to open_module. git-svn-id: file:///home/puszcza/svnroot/ellinika/trunk@506 941c8c0f-9102-463b-b60b-cd22ce0e6858 --- ChangeLog | 6 ++++++ cgi-bin/dico-ellinika.scm4 | 27 ++++++++++++++++++++++----- xml/pl/istoria.xml | 1 + 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b89edeb..07b71bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-31 Sergey Poznyakoff + + * xml/pl/istoria.xml: Fix an open tag. + * cgi-bin/dico-ellinika.scm4: Fix info and descr, pass target + language as an argument to open_module. + 2008-05-30 Sergey Poznyakoff * cgi-bin/dico-ellinika.scm4: Implement define, match and diff --git a/cgi-bin/dico-ellinika.scm4 b/cgi-bin/dico-ellinika.scm4 index b2eabf3..9f3a140 100644 --- a/cgi-bin/dico-ellinika.scm4 +++ b/cgi-bin/dico-ellinika.scm4 @@ -21,7 +21,6 @@ (use-modules (guile-user) (ice-9 rdelim) (gamma sql) - (gamma gettext) (xmltools dict) (ellinika xlat) (ellinika cgi)) @@ -37,7 +36,7 @@ (define sql-username "gray") ;; Database user name (define sql-password "") ;; Password for that user name -(define-public target-language "ru") +(define-public target-language "el") (define-public sysconf-dir "SYSCONFDIR") (define-public config-file-name "ellinika.conf") @@ -93,6 +92,15 @@ ;; Dico interface (define (open-module name . rest) + (for-each (lambda (arg) + (let ((av (string-split arg #\=))) + (case (length av) + ((2) (if (string=? (car av) "lang") + (set! target-language (cadr av)) + (dico-error "Unknown option " (car av)))) + (else + (dico-error "Unknown option " (car av)))))) + (cdr rest)) (let ((db-connection (sql-connect sql-iface sql-host sql-port sql-database sql-username sql-password))) @@ -102,12 +110,21 @@ (define (close-module name dbh) (sql-connect-close dbh)) +(define descr-list + '(("pl" . "Słownik grecko-polski") + ("uk" . "Грецько-украЇнський словник") + ("ru" . "Греческо-русский словарь"))) + (define (descr name handle) - "GreekTest dict") + (let ((res (assoc target-language descr-list))) + (if res + (cdr res) + "Ellinika (no description available)"))) (define (info name handle) - (string-append name "Ellinika - A greek dictionary.\n\ -Copyright © 2004, 2005, 2006, 2007 Sergey Poznyakoff\n\ + (string-append "Ellinika - A greek dictionary.\n\ +See http://ellinika.gnu.org.ua/cgi-bin/dict.cgi?LANG=" target-language "\n\ +Copyright © 2004, 2005, 2006, 2007, 2008 Sergey Poznyakoff\n\ \n\ Permission is granted to copy, distribute and/or modify this document\n\ under the terms of the GNU Free Documentation License, Version 1.2 or\n\ diff --git a/xml/pl/istoria.xml b/xml/pl/istoria.xml index 6530801..f52eb41 100644 --- a/xml/pl/istoria.xml +++ b/xml/pl/istoria.xml @@ -132,6 +132,7 @@ piastujący w latach 444 - 429 p.n.e. urząd stratega Aten. Wzrost potęgi Aten spowodował między innymi wzrost znaczenia dialektu attyckiego. + -- cgit v1.2.1