From: <gr...@us...> - 2002-11-06 08:23:27
|
On Tue, 5 Nov 2002, David Goodger wrote: > 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). yes, but what can we check .. see below and maybe this should be more visible to translators not only a unittest, and could give warnings (verbose mode). > > 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. they failed because of first letter uppercase (i fixed this or did i break something ? another test required!) > The length of "bibliographic_fields" also cannot be compared, since This was a try to test what might be possible, if not this will be removed. > languages behave differently. In Swedish there's no difference > between "Author" and "Authors", so there's one less entry. Also, in learned this from adam (maybe one could put comments in the file for the next peer) > 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. tools/html.py -l de README.txt donotcare.html says File "/home/bert/lib/python/docutils/parsers/rst/states.py", line 148, in run self.language = languages.get_language( File "/home/bert/lib/python/docutils/parsers/rst/languages/__init__.py", line 19, in get_language module = __import__(language_code, globals(), locals()) ImportError: No module named de > 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? reST is no programming language, i thought the text should be a valid document (as far as possible) otherwise we might need a text-writer. and the test of course must know if it is required or optional. > 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? te_latex on my linux install this seams to include what is needed. but if someone tries we will see clearer. pdflatex is better as it can handle the pngs directly, so there is no problem for needing eps-with bounding boxes (quality might be nonoptimal though) but within limits i offered to do conversions, not because test.txt is too sick, but because we will learn more from different inputs. e.g. i had to remove juliens pretty paladino font because it blows up pdfs. currently the latex output is a mixture of using latex's title but not author or date. the table of contents is numbered by docutils (because i have no interest in spending hours to find out how to get the test.txt example of with the second table of contents into latex) i donot like the colored links ... asf. > Could you put an example PDF file in your sandbox? (Directly on the > web site please, not under CVS.) yessir, you mean the test.txt ? by consulting the latex2e-README.txt one could see what i am pondering at too. tools.pdf and test.pdf -- BINGO: innovative solutions --- Engelbert Gruber -------+ SSG Fintl,Gruber,Lassnig / A6410 Telfs Untermarkt 9 / Tel. ++43-5262-64727 ----+ |