|
From: David G. <go...@us...> - 2002-11-06 02:42:34
|
eng...@ss... wrote: > attached a quick script that checks for language.labels > having all entries that en has. > > and if language directives are found. > > Could be put into a test if correct (david ?). Certainly, with pleasure. It needs a bit of work to make it more general-purpose: * The language codes should not be hard-coded, but determined dynamically from directory listings. * The module should be converted to be compatible with unittest.py. See the other test modules, like docutils/test/test_utils.py. Could you make these changes? I'd also prefer to call it "test_languages.py" (verbose is better). > This is how i understood the datastructure, might be totally wrong. The "labels" dict can be xor-compared (it's a mapping of English terms to terms in the given language), but the "bibliographic_fields" dict cannot (it's a mapping of terms in the given language to node classes). You'll notice that all the bibliographic_fields items failed for de.py, even though they're correct. The length of "bibliographic_fields" also cannot be compared, since languages behave differently. In Swedish there's no difference between "Author" and "Authors", so there's one less entry. Also, in accented languages it may be useful to have both accented and unaccented entries for versatility. > Is it an error if rst.language has no language module but > languages has ? e.g. sk. That's a good question, and one that I've had myself. I don't know the answer. If no parsers.rst.languages module exists for the language, English is currently used as a fallback. In programming languages, most people seem to be happy with English-based syntax. AppleScript had language dialects, but I don't think it caught on (code in Japanese looked *very* strange to my eyes, but I'm biased). Directives are similar to programming language keywords/statements/commands, but not the same. What do people think? Another question, from the to-do list: Should we use the language module for directive option names? In other words, should directive option names be translated? > p.s. still no interest complaining about rst to latex to pdf > conversions ? Sorry, I don't have a latex toolchain set up. What are the requirements? Could you put an example PDF file in your sandbox? (Directly on the web site please, not under CVS.) -- David Goodger <go...@us...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |