>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
Georg> Here is the conversion. It is so trivial that you should have Georg> been able to do it yourself ;-) No back conversion is needed, Georg> right? Thanks a lot. This is integrated into the following patch, which should be complete now. I also changed the code in InsetQuote::latex to test against code "fr" instead of babel name "french". Lars, is that OK? JMarc
Index: development/FORMAT =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/FORMAT,v retrieving revision 1.38 diff -u -p -r1.38 FORMAT --- development/FORMAT 9 Jun 2005 09:58:01 -0000 1.38 +++ development/FORMAT 21 Jun 2005 13:11:14 -0000 @@ -1,6 +1,12 @@ LyX file-format changes ----------------------- +2005-06-21 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * format incremented to 242. There is no file format per + se, but the "frenchb" language has been removed from lib/language + and has to be translated to "french" by lyx2lyx. + 2005-02-03 Georg Baum <[EMAIL PROTECTED]> * format incremented to 241. Index: lib/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v retrieving revision 1.711 diff -u -p -r1.711 ChangeLog --- lib/ChangeLog 20 Jun 2005 13:22:59 -0000 1.711 +++ lib/ChangeLog 21 Jun 2005 13:11:14 -0000 @@ -1,3 +1,9 @@ +2005-06-16 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * languages: remove language "frenchb"; with language "french" + provide default values for \og and \fg if needed; use babel option + "canadien" for French Canadian + 2005-06-20 Günter Milde <[EMAIL PROTECTED]> * layouts/obsolete.inc: remove, since lyx2lyx does the job. Index: lib/languages =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/languages,v retrieving revision 1.21 diff -u -p -r1.21 languages --- lib/languages 13 Sep 2004 14:27:19 -0000 1.21 +++ lib/languages 21 Jun 2005 13:11:14 -0000 @@ -11,7 +11,7 @@ breton breton "Breton" false iso88 british british "British" false iso8859-1 en_GB "" bulgarian bulgarian "Bulgarian" false cp1251 bg_BG "" canadian canadian "Canadian" false iso8859-1 en_CA "" -canadien frenchb "French Canadian" false iso8859-1 fr_CA "" +canadien canadien "French Canadian" false iso8859-1 fr_CA "" catalan catalan "Catalan" false iso8859-1 ca_ES "" croatian croatian "Croatian" false iso8859-2 hr_HR "" czech czech "Czech" false iso8859-2 cs_CZ "" @@ -22,8 +22,7 @@ esperanto esperanto "Esperanto" false #and what country code should esperanto have?? (Garst) estonian estonian "Estonian" false iso8859-1 et_EE "" finnish finnish "Finnish" false iso8859-1 fi_FI "" -frenchb frenchb "French" false iso8859-1 fr_FR "" -french french "French (GUTenberg)" false iso8859-1 fr_FR "" +french french "French" false iso8859-1 fr_FR "\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>[EMAIL PROTECTED]" galician galician "Galician" false iso8859-1 gl_ES "" # There are two Galicia's one in Spain one in E.Europe. Because of # the font encoding I am assuming this is the one in Spain. (Garst) Index: lib/lyx2lyx/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/ChangeLog,v retrieving revision 1.69 diff -u -p -r1.69 ChangeLog --- lib/lyx2lyx/ChangeLog 19 May 2005 08:43:52 -0000 1.69 +++ lib/lyx2lyx/ChangeLog 21 Jun 2005 13:11:14 -0000 @@ -1,3 +1,8 @@ +2005-06-21 Georg Baum <[EMAIL PROTECTED]> + + * lyx_1_4.py (convert_french): change language frenchb to french + for format 242. + 2005-05-18 Angus Leeming <[EMAIL PROTECTED]> * lyx2lyx (parse_options): Add the description of the '-f' option Index: lib/lyx2lyx/LyX.py =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/LyX.py,v retrieving revision 1.12 diff -u -p -r1.12 LyX.py --- lib/lyx2lyx/LyX.py 4 May 2005 11:54:14 -0000 1.12 +++ lib/lyx2lyx/LyX.py 21 Jun 2005 13:11:14 -0000 @@ -46,7 +46,7 @@ format_relation = [("0_10", [210], ["0. ("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]), ("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]), ("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3"]), - ("1_4", range(223,242), ["1.4.0cvs","1.4"])] + ("1_4", range(223,243), ["1.4.0cvs","1.4"])] def formats_list(): Index: lib/lyx2lyx/lyx_1_4.py =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx_1_4.py,v retrieving revision 1.31 diff -u -p -r1.31 lyx_1_4.py --- lib/lyx2lyx/lyx_1_4.py 18 May 2005 14:50:29 -0000 1.31 +++ lib/lyx2lyx/lyx_1_4.py 21 Jun 2005 13:11:14 -0000 @@ -1835,6 +1835,13 @@ def revert_ert_paragraphs(file): i = i + 1 +def convert_french(file): + regexp = re.compile(r'^\\language\s+frenchb') + i = find_re(file.header, regexp, 0) + if i != -1: + file.header[i] = "\\language french" + + ## # Convertion hub # @@ -1860,9 +1867,11 @@ convert = [[223, [insert_tracking_change [238, [update_latexaccents]], [239, [normalize_paragraph_params]], [240, [convert_output_changes]], - [241, [convert_ert_paragraphs]]] + [241, [convert_ert_paragraphs]], + [242, [convert_french]]] -revert = [[240, [revert_ert_paragraphs]], +revert = [[241, []], + [240, [revert_ert_paragraphs]], [239, [revert_output_changes]], [238, []], [237, []], Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2205 diff -u -p -r1.2205 ChangeLog --- src/ChangeLog 18 Jun 2005 00:18:27 -0000 1.2205 +++ src/ChangeLog 21 Jun 2005 13:11:15 -0000 @@ -1,3 +1,9 @@ +2005-06-21 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * buffer.C: format incremented to 242. There is no file format per + se, but the "frenchb" language has been removed from lib/language + and has to be translated to "french" by lyx2lyx. + 2005-06-16 Angus Leeming <[EMAIL PROTECTED]> * lyxrc.C (output, read): wrap all input and output of paths with Index: src/buffer.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v retrieving revision 1.618 diff -u -p -r1.618 buffer.C --- src/buffer.C 19 May 2005 08:43:51 -0000 1.618 +++ src/buffer.C 21 Jun 2005 13:11:15 -0000 @@ -143,7 +143,7 @@ extern BufferList bufferlist; namespace { -int const LYX_FORMAT = 241; +int const LYX_FORMAT = 242; } // namespace anon Index: src/outputparams.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/outputparams.h,v retrieving revision 1.12 diff -u -p -r1.12 outputparams.h --- src/outputparams.h 19 Jan 2005 15:03:29 -0000 1.12 +++ src/outputparams.h 21 Jun 2005 13:11:15 -0000 @@ -19,6 +19,7 @@ class ExportData; +class Language; class OutputParams { @@ -57,9 +58,9 @@ public: */ bool intitle; - /** the babel name of the language at the point where the inset is + /** the language at the point where the inset is */ - std::string local_language; + Language const * local_language; /** Document language babel name */ Index: src/paragraph.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v retrieving revision 1.406 diff -u -p -r1.406 paragraph.C --- src/paragraph.C 10 Jun 2005 14:55:01 -0000 1.406 +++ src/paragraph.C 21 Jun 2005 13:11:15 -0000 @@ -1034,7 +1034,7 @@ bool Paragraph::simpleTeXOnePar(Buffer c if (output || running_change != Change::DELETED) { OutputParams rp = runparams; rp.free_spacing = style->free_spacing; - rp.local_language = font.language()->babel(); + rp.local_language = font.language(); rp.intitle = style->intitle; pimpl_->simpleTeXSpecialChars(buf, bparams, os, texrow, rp, Index: src/insets/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v retrieving revision 1.1153 diff -u -p -r1.1153 ChangeLog --- src/insets/ChangeLog 20 Jun 2005 14:11:11 -0000 1.1153 +++ src/insets/ChangeLog 21 Jun 2005 13:11:16 -0000 @@ -1,3 +1,9 @@ +2005-06-16 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * insetquotes.C (latex): always use \og/\fg for the french + languages; test against the language code instead of the babel + name. + 2005-06-20 Georg Baum <[EMAIL PROTECTED]> * insetgraphics.C (prepareFile): don't strip the extension of quoted Index: src/insets/insetquotes.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetquotes.C,v retrieving revision 1.120 diff -u -p -r1.120 insetquotes.C --- src/insets/insetquotes.C 25 Nov 2004 19:13:05 -0000 1.120 +++ src/insets/insetquotes.C 21 Jun 2005 13:11:16 -0000 @@ -270,17 +270,11 @@ int InsetQuotes::latex(Buffer const &, o string qstr; if (language_ == FrenchQ && times_ == DoubleQ - && runparams.local_language == "frenchb") { + && prefixIs(runparams.local_language->code(), "fr")) { if (side_ == LeftQ) qstr = "\\og "; //the spaces are important here else qstr = " \\fg{}"; //and here - } else if (language_ == FrenchQ && times_ == DoubleQ - && runparams.local_language == "french") { - if (side_ == LeftQ) - qstr = "<< "; //the spaces are important here - else - qstr = " >>"; //and here } else if (lyxrc.fontenc == "T1") { qstr = latex_quote_t1[times_][quoteind]; #ifdef DO_USE_DEFAULT_LANGUAGE