summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2011-06-20 10:05:27 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-06-20 10:05:27 (GMT)
commit2bf7460851d3d03274d1b5f979b943cb00f1813e (patch) (side-by-side diff)
tree70533c308dd6e2376e72753859120ea1a8d29ae0
parentb56552e3260023593a3bf80315edf0f069eebac1 (diff)
downloadellinika-2bf7460851d3d03274d1b5f979b943cb00f1813e.tar.gz
ellinika-2bf7460851d3d03274d1b5f979b943cb00f1813e.tar.bz2
Improve coupling between dict and conj.
* po/pl.po: Update * src/cgi-bin/conj.scm4: Use cgi-program-name to generate references to dict. * src/cgi-bin/dict.scm4: Add a reference to conjugator (for verbs). * src/ellinika/Makefile.am: Define SCRIP_SUFFIX * src/ellinika/cgi.scm4 (cgi-program-name): New function. * style.css: Update.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--po/pl.po34
-rw-r--r--po/ru.po32
-rw-r--r--po/uk.po32
-rw-r--r--src/cgi-bin/conj.scm49
-rw-r--r--src/cgi-bin/dict.scm435
-rw-r--r--src/ellinika/Makefile.am21
-rw-r--r--src/ellinika/cgi.scm45
-rw-r--r--style.css31
8 files changed, 138 insertions, 61 deletions
diff --git a/po/pl.po b/po/pl.po
index d73b4b6..f5b9957 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Ellinika 1.0\n"
"Report-Msgid-Bugs-To: gray@gnu.org\n"
-"POT-Creation-Date: 2011-06-18 17:11+0300\n"
-"PO-Revision-Date: 2011-06-18 17:13+0300\n"
+"POT-Creation-Date: 2011-06-20 13:02+0300\n"
+"PO-Revision-Date: 2011-06-20 13:04+0300\n"
"Last-Translator: Sergey Poznyakoff <gray@gnu.org.ua>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -46,24 +46,28 @@ msgstr "Wybierz część mowy"
msgid "Αναζήτηση"
msgstr "Szukaj"
-#: src/cgi-bin/dict.scm4:314 src/cgi-bin/conj.scm4:289
+#: src/cgi-bin/dict.scm4:271
+msgid "κλίση"
+msgstr "koniugacja"
+
+#: src/cgi-bin/dict.scm4:323 src/cgi-bin/conj.scm4:311
#, lisp-format
msgid "Συγγνώμη, η λέξη \"~A\" δεν βρέθηκε στο λέξικο."
msgstr "Słowa \"~A\" nie znaleziono w słowniku."
-#: src/cgi-bin/dict.scm4:462
+#: src/cgi-bin/dict.scm4:471
msgid "Αντώνυμο: "
msgstr "Antonim: "
-#: src/cgi-bin/dict.scm4:462
+#: src/cgi-bin/dict.scm4:471
msgid "Αντώνυμα: "
msgstr "Antonimy: "
-#: src/cgi-bin/dict.scm4:470
+#: src/cgi-bin/dict.scm4:479
msgid "Βλέπετε επίσης "
msgstr "Patrz także "
-#: src/cgi-bin/dict.scm4:540
+#: src/cgi-bin/dict.scm4:549
msgid "λέξη"
msgid_plural "λέξεις"
msgstr[0] "słowo"
@@ -103,15 +107,19 @@ msgstr "Podaj czasownik"
msgid "Κλίση"
msgstr "Koniugacja"
-#: src/cgi-bin/conj.scm4:252
+#: src/cgi-bin/conj.scm4:270
msgid "δεν βρέθηκε στο λέξικο"
msgstr "nie znaleziono w słowniku"
-#: src/cgi-bin/conj.scm4:266
+#: src/cgi-bin/conj.scm4:275
+msgid "Η συζυγία αυτό του ρήματος δεν επιβεβαιώνεται από τη βάση δεδοµένων"
+msgstr ""
+
+#: src/cgi-bin/conj.scm4:288
msgid "Μη έγκυρη είσοδος"
msgstr "Niepoprawne wejście"
-#: src/cgi-bin/conj.scm4:312
+#: src/cgi-bin/conj.scm4:334
msgid ""
"Στην λέξη εισαγωγής δεν υπάρχει τόνος. Μήπος θέλατε να κλίσετε ένα απ'αυτά "
"τα ρήματα:"
@@ -119,8 +127,12 @@ msgstr ""
"W tym słowie brak akcentów. Czy chodziło Ci o jeden z następujących\n"
"rzeczowników:"
-#: src/cgi-bin/conj.scm4:345
+#: src/cgi-bin/conj.scm4:367
msgid ""
"Αυτή η λέξη δεν είναι ρήμα στο πρώτο ενικό πρόσωπο της οριστικής του "
"ενεστώτα."
msgstr "Podane słowo nie jest rzeczownikiem w formie 1.os. liczby pojedynczej."
+
+#: src/cgi-bin/conj.scm4:387
+msgid "Το θέμα αυτού του χρόνου δεν επιβεβαιώνεται από τη βάση δεδοµένων"
+msgstr ""
diff --git a/po/ru.po b/po/ru.po
index 41a7896..d6517cd 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ellinika 1.0\n"
"Report-Msgid-Bugs-To: gray@gnu.org\n"
-"POT-Creation-Date: 2011-06-18 17:11+0300\n"
+"POT-Creation-Date: 2011-06-20 13:02+0300\n"
"PO-Revision-Date: 2006-03-17 21:42+0200\n"
"Last-Translator: Sergey Poznyakoff <gray@gnu.org>, 2004.\n"
"Language-Team: Russian <ru@li.org>\n"
@@ -47,24 +47,28 @@ msgstr "Выберите часть речи"
msgid "Αναζήτηση"
msgstr "Поиск"
-#: src/cgi-bin/dict.scm4:314 src/cgi-bin/conj.scm4:289
+#: src/cgi-bin/dict.scm4:271
+msgid "κλίση"
+msgstr ""
+
+#: src/cgi-bin/dict.scm4:323 src/cgi-bin/conj.scm4:311
#, lisp-format
msgid "Συγγνώμη, η λέξη \"~A\" δεν βρέθηκε στο λέξικο."
msgstr "Извините, слово \"~A\" не найдено в словаре."
-#: src/cgi-bin/dict.scm4:462
+#: src/cgi-bin/dict.scm4:471
msgid "Αντώνυμο: "
msgstr "Антоним: "
-#: src/cgi-bin/dict.scm4:462
+#: src/cgi-bin/dict.scm4:471
msgid "Αντώνυμα: "
msgstr "Антонимы: "
-#: src/cgi-bin/dict.scm4:470
+#: src/cgi-bin/dict.scm4:479
msgid "Βλέπετε επίσης "
msgstr "См. также "
-#: src/cgi-bin/dict.scm4:540
+#: src/cgi-bin/dict.scm4:549
msgid "λέξη"
msgid_plural "λέξεις"
msgstr[0] "слово"
@@ -105,23 +109,31 @@ msgstr "Введите слово"
msgid "Κλίση"
msgstr ""
-#: src/cgi-bin/conj.scm4:252
+#: src/cgi-bin/conj.scm4:270
#, fuzzy
msgid "δεν βρέθηκε στο λέξικο"
msgstr "Извините, слово \"~A\" не найдено в словаре."
-#: src/cgi-bin/conj.scm4:266
+#: src/cgi-bin/conj.scm4:275
+msgid "Η συζυγία αυτό του ρήματος δεν επιβεβαιώνεται από τη βάση δεδοµένων"
+msgstr ""
+
+#: src/cgi-bin/conj.scm4:288
msgid "Μη έγκυρη είσοδος"
msgstr ""
-#: src/cgi-bin/conj.scm4:312
+#: src/cgi-bin/conj.scm4:334
msgid ""
"Στην λέξη εισαγωγής δεν υπάρχει τόνος. Μήπος θέλατε να κλίσετε ένα απ'αυτά "
"τα ρήματα:"
msgstr ""
-#: src/cgi-bin/conj.scm4:345
+#: src/cgi-bin/conj.scm4:367
msgid ""
"Αυτή η λέξη δεν είναι ρήμα στο πρώτο ενικό πρόσωπο της οριστικής του "
"ενεστώτα."
msgstr ""
+
+#: src/cgi-bin/conj.scm4:387
+msgid "Το θέμα αυτού του χρόνου δεν επιβεβαιώνεται από τη βάση δεδοµένων"
+msgstr ""
diff --git a/po/uk.po b/po/uk.po
index 100ce42..3bd8d08 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ellinika 1.0\n"
"Report-Msgid-Bugs-To: gray@gnu.org\n"
-"POT-Creation-Date: 2011-06-18 17:11+0300\n"
+"POT-Creation-Date: 2011-06-20 13:02+0300\n"
"PO-Revision-Date: 2006-03-24 19:25+0200\n"
"Last-Translator: Sergey Poznyakoff <gray@gnu.org.ua>\n"
"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
@@ -46,24 +46,28 @@ msgstr "Виберіть частину мови"
msgid "Αναζήτηση"
msgstr "Пошук"
-#: src/cgi-bin/dict.scm4:314 src/cgi-bin/conj.scm4:289
+#: src/cgi-bin/dict.scm4:271
+msgid "κλίση"
+msgstr ""
+
+#: src/cgi-bin/dict.scm4:323 src/cgi-bin/conj.scm4:311
#, lisp-format
msgid "Συγγνώμη, η λέξη \"~A\" δεν βρέθηκε στο λέξικο."
msgstr "Пробачте, слова \"~A\" у словнику немає."
-#: src/cgi-bin/dict.scm4:462
+#: src/cgi-bin/dict.scm4:471
msgid "Αντώνυμο: "
msgstr "Антоним:"
-#: src/cgi-bin/dict.scm4:462
+#: src/cgi-bin/dict.scm4:471
msgid "Αντώνυμα: "
msgstr "Антоними:"
-#: src/cgi-bin/dict.scm4:470
+#: src/cgi-bin/dict.scm4:479
msgid "Βλέπετε επίσης "
msgstr "Див. також "
-#: src/cgi-bin/dict.scm4:540
+#: src/cgi-bin/dict.scm4:549
msgid "λέξη"
msgid_plural "λέξεις"
msgstr[0] "слово"
@@ -104,23 +108,31 @@ msgstr "Введіть слово"
msgid "Κλίση"
msgstr ""
-#: src/cgi-bin/conj.scm4:252
+#: src/cgi-bin/conj.scm4:270
#, fuzzy
msgid "δεν βρέθηκε στο λέξικο"
msgstr "Пробачте, слова \"~A\" у словнику немає."
-#: src/cgi-bin/conj.scm4:266
+#: src/cgi-bin/conj.scm4:275
+msgid "Η συζυγία αυτό του ρήματος δεν επιβεβαιώνεται από τη βάση δεδοµένων"
+msgstr ""
+
+#: src/cgi-bin/conj.scm4:288
msgid "Μη έγκυρη είσοδος"
msgstr ""
-#: src/cgi-bin/conj.scm4:312
+#: src/cgi-bin/conj.scm4:334
msgid ""
"Στην λέξη εισαγωγής δεν υπάρχει τόνος. Μήπος θέλατε να κλίσετε ένα απ'αυτά "
"τα ρήματα:"
msgstr ""
-#: src/cgi-bin/conj.scm4:345
+#: src/cgi-bin/conj.scm4:367
msgid ""
"Αυτή η λέξη δεν είναι ρήμα στο πρώτο ενικό πρόσωπο της οριστικής του "
"ενεστώτα."
msgstr ""
+
+#: src/cgi-bin/conj.scm4:387
+msgid "Το θέμα αυτού του χρόνου δεν επιβεβαιώνεται από τη βάση δεδοµένων"
+msgstr ""
diff --git a/src/cgi-bin/conj.scm4 b/src/cgi-bin/conj.scm4
index 72da00e..fec7eca 100644
--- a/src/cgi-bin/conj.scm4
+++ b/src/cgi-bin/conj.scm4
@@ -245,11 +245,6 @@ ifelse(IFACE,[CGI],(cgi:init))
result)
(return #f))))
-(define (dict-cgi-name)
- (let* ((my-name cgi-script-name)
- (slpos (string-rindex my-name #\/)))
- (string-append (substring my-name 0 slpos) "/dict.SCRIPT_SUFFIX")))
-
(define (show-conjugation verb)
(catch #t
(lambda ()
@@ -266,7 +261,7 @@ ifelse(IFACE,[CGI],(cgi:init))
((and descr (not (null? descr)))
(format #t "<h2 class=\"verb\"><a href=\"~A\">~A - ~A</a></h2>"
(make-cgi-name
- (dict-cgi-name) "ident" (dict:encode-string verb))
+ (cgi-program-name "dict") "ident" (dict:encode-string verb))
verb (caar descr)))
(else
(format #t
@@ -328,7 +323,7 @@ ifelse(IFACE,[CGI],(cgi:init))
"SELECT DISTINCT word\
FROM dict\
WHERE sound LIKE ~Q\
- AND (pos & 1048576) = 1048576 ORDER BY 1"
+ AND (pos & 1048576) <> 0 ORDER BY 1"
(ellinika:sounds-like key))))
(cond
((null? result)
diff --git a/src/cgi-bin/dict.scm4 b/src/cgi-bin/dict.scm4
index de6b8c5..77c1b3a 100644
--- a/src/cgi-bin/dict.scm4
+++ b/src/cgi-bin/dict.scm4
@@ -233,14 +233,16 @@ ifelse(IFACE,[CGI],(cgi:init))
;;
(define (display-results rlist)
- (let ((x (car rlist)))
- (display "<table class=\"noframe\">")
- (display "<tr><td>")
- (display (car x))
+ (let* ((x (car rlist))
+ (word (car x))
+ (isverb (> (string->number (list-ref x 6)) 0)))
+ (display "<table class=\"dict-result\">")
+ (display "<tr><td class=\"dict-word\">")
+ (display word)
(display "</td>")
(cond
((list-ref x 3)
- (display "<td>")
+ (display "<td class=\"dict-word-forms\">")
(let ((href (assoc (list-ref x 2) word-forms-reference)))
(cond
(href
@@ -259,18 +261,25 @@ ifelse(IFACE,[CGI],(cgi:init))
(else
(display (list-ref x 3)))))
(display "</td>")))
- (display "<td>")
+ (display "<td class=\"dict-pos\">")
(display (list-ref x 2))
- (display "</td></tr>"))
+ (display "</td>")
+ (if isverb
+ (format #t "<td class=\"conj-ref\"><a href=\"~A\">~A</a></td>"
+ (make-cgi-name
+ (cgi-program-name "conj") "key" (dict:encode-string word))
+ (_ "κλίση")))
+ (display "</tr>"))
+ (display "</table>")
+ (newline)
+ (display "<ol class=\"dict-articles\">")
(for-each
(lambda (x)
- (display "<tr><td>")
- (display (1+ (string->number (list-ref x 4))))
- (display "</td><td>")
+ (display "<li>")
(display (replace-tilde (car x) (list-ref x 5)))
- (display ";</td></tr>"))
+ (display ";</li>"))
rlist)
- (display "</table>")
+ (display "</ol>")
(newline))
(define (display-cross-reference word)
@@ -435,7 +444,7 @@ ifelse(IFACE,[CGI],(cgi:init))
(let* ((key (ellinika:translate-input keyval))
(result (ellinika:sql-query
"SELECT dict.word,dict.ident,pos.abbr,\
-dict.forms,articles.subindex,articles.meaning\
+dict.forms,articles.subindex,articles.meaning,(dict.pos & conv(\"100000\",16,10))\
FROM dict,articles,pos WHERE dict.word=~Q\
AND dict.ident=articles.ident\
AND articles.lang=~Q\
diff --git a/src/ellinika/Makefile.am b/src/ellinika/Makefile.am
index 01534c0..12e0392 100644
--- a/src/ellinika/Makefile.am
+++ b/src/ellinika/Makefile.am
@@ -32,16 +32,17 @@ cgi.m4: Makefile
echo 'changecom([;],[' >> $@
echo '])' >> $@
echo 'undefine([format])' >> $@
- echo 'define([IFACE],$(APACHE_IFACE))' >> $@
- echo 'define([GUILE_BINDIR],$(GUILE_BINDIR))' >> $@
- echo 'define([GUILE_SITE],@GUILE_SITE@)' >> $@
- echo 'define([PACKAGE],$(PACKAGE))'>> $@
- echo 'define([PREFIX],$(prefix))' >> $@
- echo 'define([SYSCONFDIR],$(sysconfdir))' >> $@
- echo 'define([LOCALEDIR],$(datadir)/locale)' >> $@
- echo 'define([HTMLDIR],$(HTMLDIR))' >> $@
- echo 'define([VERSION],$(VERSION))' >> $@
- echo 'define([LIBDIR],$(pkglibdir))' >> $@
+ echo 'define([IFACE],[$(APACHE_IFACE)])' >> $@
+ echo 'define([SCRIPT_SUFFIX], [@SCRIPT_SUFFIX@])'>>$@
+ echo 'define([GUILE_BINDIR],[$(GUILE_BINDIR)])' >> $@
+ echo 'define([GUILE_SITE],[@GUILE_SITE@])' >> $@
+ echo 'define([PACKAGE],[$(PACKAGE)])'>> $@
+ echo 'define([PREFIX],[$(prefix)])' >> $@
+ echo 'define([SYSCONFDIR],[$(sysconfdir)])' >> $@
+ echo 'define([LOCALEDIR],[$(datadir)/locale])' >> $@
+ echo 'define([HTMLDIR],[$(HTMLDIR)])' >> $@
+ echo 'define([VERSION],[$(VERSION)])' >> $@
+ echo 'define([LIBDIR],[$(pkglibdir)])' >> $@
echo 'divert(0)dnl' >> $@
echo '@AUTOGENERATED@' >> $@
diff --git a/src/ellinika/cgi.scm4 b/src/ellinika/cgi.scm4
index d1b4a5c..8c9b54d 100644
--- a/src/ellinika/cgi.scm4
+++ b/src/ellinika/cgi.scm4
@@ -109,6 +109,11 @@ ifelse(IFACE,[CGI],,dnl
arglist
(cons "?" arglist))))))
+(define-public (cgi-program-name prog)
+ (string-append
+ (substring cgi-script-name 0 (string-rindex cgi-script-name #\/)) "/"
+ prog ".SCRIPT_SUFFIX"))
+
(define-public (expand-template explist template)
"(expand-template EXPLIST TEMPLATE)
diff --git a/style.css b/style.css
index d918d6e..9e17565 100644
--- a/style.css
+++ b/style.css
@@ -482,6 +482,36 @@ img.ellinika-img {
margin-right: auto;
}
+/*
+ Dictionary
+ */
+td.conj-ref:before {
+ content: "[ ";
+}
+
+td.conj-ref:after {
+ content: " ]";
+}
+
+td.conj-ref {
+ margin-left: 0;
+}
+
+table.dict-result {
+ border-style: none;
+}
+
+td.dict-word {
+ font-weight: bold;
+}
+
+td.dict-word-forms {
+ font-size: smaller;
+}
+
+/*
+ Conjugator
+ */
h2.verb {
text-decoration: underline;
}
@@ -492,3 +522,4 @@ div.unattested {
border: 2px solid red;
width: 100%;
}
+

Return to:

Send suggestions and report system problems to the System administrator.