]> git.lyx.org Git - features.git/commitdiff
clean up french language handling
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 7 Jul 2005 10:51:58 +0000 (10:51 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 7 Jul 2005 10:51:58 +0000 (10:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10145 a592a061-630c-0410-9148-cb99ea01b6c8

13 files changed:
development/ChangeLog
development/FORMAT
lib/ChangeLog
lib/languages
lib/lyx2lyx/ChangeLog
lib/lyx2lyx/LyX.py
lib/lyx2lyx/lyx_1_4.py
src/ChangeLog
src/buffer.C
src/insets/ChangeLog
src/insets/insetquotes.C
src/outputparams.h
src/paragraph.C

index 8150bd05bec224a6fda4cac3b29e16b5ce39d35d..6697dc44ca40e16ea73132398e5ff17deaa60645 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-07  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * FORMAT: document change to format 242.
+
 2005-05-20  Michael Schmitt  <michael.schmitt@teststep.org>
 
        * Win32/fakeconfig/lyxrc.defaults: rename "ASCII"
index 2a21857e30e0236465353882ba4736aa4bc69a65..4fd292e82ff077dc9d6badf5b10174a6c685a483 100644 (file)
@@ -1,6 +1,12 @@
 LyX file-format changes
 -----------------------
 
+2005-06-21  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * 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  <Georg.Baum@post.rwth-aachen.de>
 
        * format incremented to 241.
index 205ee1628635fd90a3620fd0682cef5c00802adb..ddefafb366b53a40be87eb2ab92a6bc4c1ce300a 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-16  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * 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-30  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * reLyX/syntax.default: recognize optional argument of \frame
index 5bd660fec448a955d8d7e9c266b5b3f48fcc519d..653e775a9a3cfee7b3dc032cb5f8d960e80c3e85 100644 (file)
@@ -11,7 +11,7 @@ breton      breton    "Breton"        false  iso8859-1  br_FR  ""
 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,8 @@ esperanto   esperanto "Esperanto"     false  iso8859-3  eo     ""
 #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         ""
+# We redefine \og and \fg (guillemets) for older french language definitions
+french      french     "French"        false  iso8859-1  fr_FR  "\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}}"
 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 ca573b5d07c85529eb796ecbfd80e17096d20069..aa294eb98b662e5ed6d99ee0dce8e75b895ce7a8 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-21  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * lyx_1_4.py (convert_french): change language frenchb to french
+       for format 242.
+
 2005-07-07  José Matos  <jamatos@lyx.org>
 
        * LyX.py (read): Ignore whitelines on header. Fix reading the
index 85f2c8339f9a7c331d47743c03fcddda798672df..7647dc830448578e7f6bbaa286d18dd0ad508536 100644 (file)
@@ -46,7 +46,7 @@ format_relation = [("0_10",  [210], ["0.10.7","0.10"]),
                    ("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 10ef26acf021e1785cc6128a65e1406922b03e73..ca253df85c80b0d8c4fec84f63c5a1bb4db4c8e0 100644 (file)
@@ -1844,6 +1844,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
 #
@@ -1869,9 +1876,11 @@ convert = [[223, [insert_tracking_changes, add_end_header, remove_color_default,
            [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 498dedaa62479146200b4ba7c6c21d43f9f3501e..736a50d3bbe24080c317cdf4ae869f6bbaf4fdb8 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-21  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * 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-07-06  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * cursor_slice.h, dociterator.h: add some documentation
index ca87c4c425ad134b9786bc70e651c085737db435..808dc4b013063440ed688de5cfdb79eafbccc9e8 100644 (file)
@@ -143,7 +143,7 @@ extern BufferList bufferlist;
 
 namespace {
 
-int const LYX_FORMAT = 241;
+int const LYX_FORMAT = 242;
 
 } // namespace anon
 
index 99c4b8e026568208f1b61cecf1846feb4b35e497..fbefd62675d2d2d6528388cbe8184a7fa579ed0b 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-16  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * insetquotes.C (latex): always use \og/\fg for the french
+       languages; test against the language code instead of the babel
+       name.
+
 2005-07-06  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * insettabular.C (tabularFeatures): adjust cursor after adding a column
index 03a96c50f3f02fad5111213b93a2728be1f7eae6..4cd7bd5bf44c68bccfde9b184615881994708e1b 100644 (file)
@@ -270,17 +270,11 @@ int InsetQuotes::latex(Buffer const &, ostream & os,
        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
index 0e3ae8c481007994a8904a322c8644cf4e408a6b..d3974fd3258f5128551b0b3779ddee9792dcdd7a 100644 (file)
@@ -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 dc5205a9e5f79dc82739d5a9763013327bc0ef44..24942fc32bda23f9d2829a76eda42ab820a30a23 100644 (file)
@@ -1034,7 +1034,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
                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,