From f28f62b420d603d7d78ee204669f523cac58d5c7 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 27 Mar 2002 00:05:28 +0000 Subject: [PATCH] parselog fixes, i18n fix, menu separator fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3846 a592a061-630c-0410-9148-cb99ea01b6c8 --- ANNOUNCE | 16 ++++++++-------- ChangeLog | 1 + NEWS | 5 +++-- lib/examples/Literate.lyx | 13 +++++++++++++ src/ChangeLog | 13 +++++++++++++ src/FloatList.C | 8 +++++--- src/MenuBackend.C | 4 ++-- src/converter.C | 6 +----- src/insets/ChangeLog | 5 +++++ src/insets/insetspecialchar.C | 8 ++++++++ src/support/ChangeLog | 5 +++++ src/support/filetools.C | 15 +++++++++++++++ src/support/filetools.h | 6 ++++++ 13 files changed, 85 insertions(+), 20 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index bc5bc0ef77..4e4e901f89 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Public release of LyX version 1.1.6 +Public release of LyX version 1.2.0 =================================== What is LyX? @@ -19,7 +19,7 @@ All in all, LyX is a complete environment for writing documents. It has superior support for scientific writing, but works well for any kind of document. -Read more about LyX (including screen shots) at: +Read more about LyX (including screenshots) at: http://www.lyx.org/ @@ -32,7 +32,7 @@ A very incomplete feature list: - footnotes, citations, cross-referencing, faxes, spellchecking - almost any math expression (with a simple, but powerfull interface) - automatic, multilevel outline support (enumerated or bullets) -- tables and embedded postscript figures support +- tables and embedded figures support (with automatic conversion) - import LaTeX or ASCII - export LaTeX, ASCII, DVI, PostScript, LinuxDoc-SGML, DocBook-SGML - fair support for non-English documents and/or menus @@ -67,20 +67,20 @@ with mirrors at The source code package is available at: - ftp://ftp.lyx.org/pub/lyx/stable/lyx-1.1.6.tar.gz - ftp://ftp.devel.lyx.org/pub/lyx/lyx-1.1.6.tar.gz + ftp://ftp.lyx.org/pub/lyx/stable/lyx-1.2.0.tar.gz + ftp://ftp.devel.lyx.org/pub/lyx/lyx-1.2.0.tar.gz and at the mirrors listed above. You need to have XForms version 0.88 or newer to compile your own -version. Version 0.88 is highly recommended. LyX should also compile -with 0.89. +version. Version 0.89 is highly recommended. LyX should also compile +with 0.88. Credits ------- The LyX Team is composed of volunteers from around the world. Many, many -people have helped make the 1.1.x releases possible, including: +people have helped make the 1.2.0 release possible, including: Lars Gullik Bjoennes, Alejandro Aguilar Sierra, Asger Alstrup, Jean-Marc Lasgouttes, Juergen Vigna, John P. Weiss, Bernhard Iselborn, diff --git a/ChangeLog b/ChangeLog index aace77b41c..2975d8fa7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2002-03-26 Jean-Marc Lasgouttes + * ANNOUNCE: * INSTALL: * README: * NEWS: update somewhat for 1.2.0 diff --git a/NEWS b/NEWS index 9d13751b0f..6a250bd380 100644 --- a/NEWS +++ b/NEWS @@ -28,8 +28,9 @@ are now possible: - New minipage inset -Note that another consequence of this change is that older LyX version -will almost certainly fail to read files produced by LyX 1.2.0. +Note that another consequence of these changes is that older LyX +versions will almost certainly fail to read files produced by LyX +1.2.0. Other more traditional insets have been improved too: diff --git a/lib/examples/Literate.lyx b/lib/examples/Literate.lyx index 56723f8b9b..9ad85287ce 100644 --- a/lib/examples/Literate.lyx +++ b/lib/examples/Literate.lyx @@ -44,6 +44,19 @@ Modified by Bernard Michael Hurley bernardh@westherts.ac.uk ---- Don't blame \end_inset +\layout Abstract + + +\series bold +Note: +\series default + This example program is provided for educational use only. + The functionality in this C program has been superceded by the equivalent + Python code in +\emph on +examples/listerrors.lyx +\emph default + which should be installed in the LyX scripts directory. \layout Date diff --git a/src/ChangeLog b/src/ChangeLog index ca5e70d676..f4ed8ac763 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2002-03-27 Jean-Marc Lasgouttes + + * MenuBackend.C (expand): translate the name of floats + + * FloatList.C (FloatList): mark the float names for translation + + * converter.C (convert): use LibScriptSearch + +2002-03-26 Jean-Marc Lasgouttes + + * MenuBackend.C (defaults): fix default menu (we might as well get + rid of it...) + 2002-03-26 Lars Gullik Bjønnes * lyxvc.C (registrer): register the file with CVS if it's in a CVS diff --git a/src/FloatList.C b/src/FloatList.C index d6c29868a6..c3b45c5017 100644 --- a/src/FloatList.C +++ b/src/FloatList.C @@ -5,6 +5,7 @@ #endif #include "FloatList.h" +#include "gettext.h" // This class is now mostly finished, except one thing, it is a global // object. This will not do. The user (and layout files) are free to @@ -29,18 +30,19 @@ FloatList::FloatList() // (these will later be read from a layout file) // table - Floating table("table", "htbp", "lot", "", "plain", "Table", true); + Floating table("table", "htbp", "lot", "", "plain", N_("Table"), true); newFloat(table); // figure - Floating figure("figure", "htbp", "lof", "", "plain", "Figure", true); + Floating figure("figure", "htbp", "lof", + "", "plain", N_("Figure"), true); newFloat(figure); // And we add algorithm too since LyX has // supported that for a long time, // but support for this should probably be moved to a layout file. Floating algorithm("algorithm", "htbp", "loa", - "", "ruled", "Algorithm"); + "", "ruled", N_("Algorithm")); newFloat(algorithm); } diff --git a/src/MenuBackend.C b/src/MenuBackend.C index 71542cc954..356b550d60 100644 --- a/src/MenuBackend.C +++ b/src/MenuBackend.C @@ -385,7 +385,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const int const action = lyxaction .getPseudoAction(LFUN_INSET_FLOAT, cit->second.type()); - string const label = cit->second.name(); + string const label = _(cit->second.name()); tomenu.add(MenuItem(MenuItem::Command, label, action)); @@ -492,7 +492,7 @@ void MenuBackend::defaults() Menu file("file"); file .add(MenuItem(MenuItem::Command, _("New...|N"), "buffer-new")) - .add(MenuItem(MenuItem::Command, _("Open...|O"), "buffer-open")) + .add(MenuItem(MenuItem::Command, _("Open...|O"), "file-open")) .add(MenuItem(MenuItem::Submenu, _("Import|I"), "import")) .add(MenuItem(MenuItem::Command, _("Quit|Q"), "lyx-quit")) .add(MenuItem(MenuItem::Separator)) diff --git a/src/converter.C b/src/converter.C index 1e09a7c869..d192e26aca 100644 --- a/src/converter.C +++ b/src/converter.C @@ -657,11 +657,7 @@ bool Converters::convert(Buffer const * buffer, if (!conv.parselog.empty()) { string const logfile = infile2 + ".log"; - string script = - LibFileSearch("scripts", - conv.parselog); - if (script.empty()) - script = conv.parselog; + string const script = LibScriptSearch(conv.parselog); string const command2 = script + " < " + QuoteName(infile2 + ".out") + " > " + QuoteName(logfile); diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 80e1199f55..4c57b1d8ab 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2002-03-27 Jean-Marc Lasgouttes + + * insetspecialchar.C (isLineSeparator): disable the nice code to + allow linebreaks after hyphenation and menu separators. + 2002-03-26 Herbert Voss * insetgraphics.C (figinsetRead): set the right lyxview diff --git a/src/insets/insetspecialchar.C b/src/insets/insetspecialchar.C index 2b30693a01..b75d573b37 100644 --- a/src/insets/insetspecialchar.C +++ b/src/insets/insetspecialchar.C @@ -344,5 +344,13 @@ bool InsetSpecialChar::isSpace() const bool InsetSpecialChar::isLineSeparator() const { +#if 0 + // this would be nice, but it does not work, since + // Paragraph::stripLeadingSpaces nukes the characters which + // have this property. I leave the code here, since it should + // eventually be made to work. (JMarc 20020327) return kind_ == HYPHENATION || kind_ == MENU_SEPARATOR; +#else + return false; +#endif } diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 593a98d61f..f692c377e2 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,8 @@ +2002-03-27 Jean-Marc Lasgouttes + + * filetools.C (LibScriptSearch): new command. Searches for scripts + in lyx data directories. + 2002-03-21 Lars Gullik Bjønnes * most files: ws cleanup diff --git a/src/support/filetools.C b/src/support/filetools.C index 07cbed04cf..03add4cfcb 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -329,6 +329,21 @@ i18nLibFileSearch(string const & dir, string const & name, } +string const LibScriptSearch(string const & command) +{ + string script = command; + string args; + split(script, args, ' '); + script = LibFileSearch("scripts", script); + if (script.empty()) + return command; + else if (args.empty()) + return script; + else + return script + ' ' + args; +} + + string const GetEnv(string const & envname) { // f.ex. what about error checking? diff --git a/src/support/filetools.h b/src/support/filetools.h index 68783cd638..c04180ae58 100644 --- a/src/support/filetools.h +++ b/src/support/filetools.h @@ -98,6 +98,12 @@ string const i18nLibFileSearch(string const & dir, string const & name, string const & ext = string()); +/** Takes a command with arguments as input and tries to see whether + the command itself can be found in one of the scripts/ directories. + If it is found, return the command with fully qualified script name, + either return it unchanged */ +string const LibScriptSearch(string const & command); + /// string const GetEnv(string const & envname);