[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: looking for a script
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2009-05-31 9:16:33
Message-ID: 200905311116.36730.caslav.ilic () gmx ! net
[Download RAW message or body]


> [: Fernando Boaglio :]
> Le me ask you one more thing (I 'm sorry, but I have to) , what should I
> do if I want to add some words to a ignore list or a custom dict ?

Worry not, that's fully provided for.

You can put supplemental word lists into
trunk/l10n-support/pology/l10n/pt_BR/spell/, and commit them (then, of
course, periodically add new words). A word list file is a simple text
listing one word by line, except for the first line, the header. Just copy
the header line from one of existing l10n/LANG/spell/. The file must have
.aspell extension. Then there is the script organizeDict.py (where other
Pology scripts are), which operates on word list files given to it as
arguments. It will fill out the number of words in the header, sort word
lines, and remove any dupicate words (files will be modified in place).

Now, that is simple, but perhaps a bit on the raw side. There can be any
number of supplemental word lists, and organized by subdirectories, with
special meaning. For example, one reasonable way to split word lists would
be as following:

  .../pology/l10n/pt_BR/spell/
      general.aspell
      kde/
          general.aspell
          literal.aspell

Here, the top general.aspell would contain normal, known Brasilian Portugese
words, which just happen to be missing from the spell-checker's dictionary,
and really should be added to it in the future. On the other hand
kde/general.aspell would contain words which are very new, perhaps even
created for the purpose of KDE translation, which you are not sure can pass
as Brasilian Portugese as of yet (e.g. a linguist would decline it). And
finally, kde/literal.aspell would contain all sorts of words that you just
copy from original text, like people's names, keywords, commands, etc. in
short, those which are not, nor will be considered part of the language. At
top level you could also add word lists for any large category of special
words, such as geography.aspell, not to mix them with general terms. And so
on...

Now, the bonus of the organization of as above is that when running the
sieve (either check-spell or check-spell-ec) with no additional parameters,
it will use only top level word lists, like general.aspell above. To also
include word lists in kde/, the sieve should be given parameter -senv:kde.
This makes Pology's spell-checking friendly to various projects, such that
each can add both words they discover missing from general dictionary, and
words specific to their project. You can see such case in l10n/sr/spell/,
where there are kde/ and wesnoth/ subdirectories (the latter being a game
with host of imaginary words constructed for its needs). Not to mention that
whoever maintains spell-checker's general dictionary can periodicaly scoop
words from the top level word lists.

-- 
Chusslove Illich (Часлав Илић)
Serbian KDE translation team

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic