[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A proposal for a friendlier Emacs
From: |
Jean Louis |
Subject: |
Re: A proposal for a friendlier Emacs |
Date: |
Tue, 27 Oct 2020 10:50:26 +0300 |
User-agent: |
Mutt/+ (1036f0e) (2020-10-18) |
* Arthur Miller <arthur.miller@live.com> [2020-10-27 07:32]:
> Jean Louis <bugs@gnu.support> writes:
>
> > * Arthur Miller <arthur.miller@live.com> [2020-10-20 16:08]:
> >> I would like to have an easy to loookup dictionary from Lisp posibly for
> >> automatically translating of GUI ites. I have always thought of creating
> >> an sqlite database of "programming" dictionary where some common gui
> >> items are put together like (file, menu, cut, copy, paste, etc) and
> >> indexed for use in programms. In a Lisp program sqlite is not even
> >> needed.
> >
> > You mean very simple and common words?
> Yes, like: File, Open, Close, Cut, Copy, Paste ...
There are those /usr/share/locale .po files to be used with GNU
gettext.
NAME
gettext - translate message
SYNOPSIS
gettext [OPTION] [[TEXTDOMAIN] MSGID]
gettext [OPTION] -s [MSGID]...
DESCRIPTION
The gettext program translates a natural language message
into the user's language, by looking up the translation in a
message catalog.
https://www.emacswiki.org/emacs/Gettext
See:
https://www.gnu.org/software/gettext/manual/html_node/PO-Mode.html
So gettext is for you. You may already get all that what you want, you
can translate user interfaces quickly and get translations from
existing other software by using it.
Are there any Emacs or completion packages for gettext?
> > If there are not too many, Lisp structure is enough, that is how I am
> > using it in some CGI scripts for multi languages.
> I know; sqlite db is a bit more portable; think C++; but for Lisp
> programs a hash map or even list are fine.
If database is for single user then Lisp data in files is fine. If for
multiple users then what if they write to database in the same file.
Emacs should have database built-in such as gdbm the GNU database,
or other similar databases optionally with ./configure options.
I am using the PostgreSQL dynamic module for database management:
https://github.com/anse1/emacs-libpq and this works well and fine,
independent of Emacs package. I think original pg package broke with
the new release of PostgreSQL, so I had to look for
solution. Developers are looking how to include this dynamic module
into GNU ELPA, they are willing so far.
and there is SQLLite dynamic module:
https://github.com/pekingduck/emacs-sqlite3-api
There is GDBM tool named: gdbmtool for which one could write an Emacs
package and use it that way indirectly. I wonder why such packages do
not exist after so many years, in general, why some simple database is
not built in.
> > There is wordnut package for looking up into Wordnet dictionary, it is
> > free as in freedom dictionary, it is fast, and pressing enter on words
> > leads you to new words.
> Always wanted to look up wordnet, but never got to it; one day ....
In many GNU/Linux distributions there are packages with Wordnet. Emacs
package is wordnut, works fine also in connection with helm, and
Wordnet is freely licensed.
Wordnet projects are huge:
https://en.wikipedia.org/wiki/WordNet#Global_WordNet_Association
And include allegedly more than 200 languages, but licenses are often
non-free. Emacs packages work without any middle server.
> I mean one could write program to look up a list of words; maybe
> save it and then use the saved translation as a base for a human to
> finish the translation?
get the gettext
--
Jean Louis
- Re: dictionary.el could be included in main stream Emacs - Re: A proposal for a friendlier Emacs, (continued)