]> git.lyx.org Git - lyx.git/commitdiff
i18n and mathed fixes
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 3 Jan 2001 17:43:29 +0000 (17:43 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 3 Jan 2001 17:43:29 +0000 (17:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1300 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
NEWS
UPGRADING
src/frontends/xforms/FormCopyright.C
src/frontends/xforms/FormPreferences.C
src/gettext.C
src/mathed/math_panel.C

index 0af405563ce152078c2cdb3db253c1e60637ad58..d97aa926301e34238064f11a0522cdf7090f1ba9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2001-01-03  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * src/mathed/math_panel.C (deco_cb): check the decoration index is
+       valid. 
+
+       * src/frontends/xforms/FormPreferences.C (feedback): apply
+       formatting to the translated string, not to the original one.
+       (printWarning): ditto.
+
+       * src/gettext.C (_): translate empty string with empty string.
+
+       * src/frontends/xforms/FormCopyright.C (build): use _() instead of
+       N_(). 
+
+       * NEWS: small update
+
+       * UPGRADING: mention that tabular format has been changed.
+
 2001-01-03  Juergen Vigna  <jug@sad.it>
 
        * src/insets/insettabular.C (InsetButtonPress): look for button==2
diff --git a/NEWS b/NEWS
index c4e3c0d2ce9dcb5b51ef7547227342971c0ba081..e21dfd9a7280010c270613693a1a4a4c031f8afb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,9 +2,8 @@ What's new in LyX version 1.1.6?
 --------------------------------
 
 As with all of the 1.1.x versions of LyX, this release contains a lot
-of new code: in particular, half of the changes described in the
-ChangeLog (which dates back to the 1.1.0 release) describe changes in
-LyX 1.1.6!
+of new code: in particular, more than half of the changes described in
+the ChangeLog (which dates back to the 1.1.0 release) concern LyX 1.1.6!
 
 Besides the usual under-the-hood changes, LyX 1.1.6 has many
 new user-visible features. The main visible feature is that the
@@ -18,7 +17,7 @@ from the older development version:
   have been overhauled.
 
 - LyX now has a Preference popup where you can change most of your
-  lyxrc settings [Allan, details?]
+  lyxrc settings.
 
 - the menus can now be defined in a text file, and they automatically
   display the keyboard bindings associated with commands.
@@ -80,7 +79,7 @@ And finally, there have been a lot of smaller changes, which are
 mentioned here for your information
 
 - the menu entry File->New does not prompt for a file name by default
-  (this can be changed in lyxrc).
+  (this can be changed in preferences).
 
 - new -geometry command line option, which replaces the old -width,
   -height, etc.
index 6a393331f17829ef70820b6717f1b4afebfb8b6b..579ecc80e77404d9eb7e922664129607dc1537b0 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -28,4 +28,7 @@ Rhandol. COLD can be found at:
 or at one of LyX archive mirror sites listed in README.
 
 Documents saved with LyX version 1.1.6 can be read correctly by 
-LyX v0.12.0 and v1.0.x, except for new and a couple of changed features.
+LyX v0.12.0 and v1.0.x, except for new and a couple of changed
+features. A notable exception is the tabular format, which has changed
+in a major way in 1.1.6. No older versions of LyX are able to read
+this new inset.
index 441d245625a1671064019f39dc60487f310a61e2..edfe5acc4a78dc4b0b275b34abb7ff247aed9a2d 100644 (file)
@@ -48,17 +48,17 @@ void FormCopyright::build()
        minw_ = form()->w;
        minh_ = form()->h;
 
-       string str = N_("LyX is Copyright (C) 1995 by Matthias Ettrich, 1995-2000 LyX Team");
+       string str = _("LyX is Copyright (C) 1995 by Matthias Ettrich, 1995-2000 LyX Team");
        str = formatted(str, dialog_->text_copyright->w-10,
                        FL_NORMAL_SIZE, FL_NORMAL_STYLE);
        fl_set_object_label(dialog_->text_copyright, str.c_str());
 
-       str = N_("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
+       str = _("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
        str = formatted(str, dialog_->text_licence->w-10,
                        FL_NORMAL_SIZE, FL_NORMAL_STYLE);
        fl_set_object_label(dialog_->text_licence, str.c_str());
 
-       str = N_("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
+       str = _("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
        str = formatted(str, dialog_->text_disclaimer->w-10,
                        FL_NORMAL_SIZE, FL_NORMAL_STYLE);
        fl_set_object_label(dialog_->text_disclaimer, str.c_str());
index c3273f57fa1f226949045d9470f7b9594b26c47f..c92a65177eda9a1a3654122191ecc63aaff9105d 100644 (file)
@@ -342,10 +342,10 @@ void FormPreferences::feedback(FL_OBJECT * ob)
                str = spellchecker_.feedback(ob);
        }
 
-       str = formatted(str, dialog_->text_warning->w-10,
+       str = formatted(_(str), dialog_->text_warning->w-10,
                        FL_SMALL_SIZE, FL_NORMAL_STYLE);
 
-       fl_set_object_label(dialog_->text_warning, _(str.c_str()));
+       fl_set_object_label(dialog_->text_warning, str.c_str());
        fl_set_object_lsize(dialog_->text_warning, FL_SMALL_SIZE);
 }
 
@@ -3005,11 +3005,11 @@ void FormPreferences::printWarning(string const & warning)
 {
        warningPosted = true;
 
-       string str = N_("WARNING!") + string(" ") + warning;
+       string str = _("WARNING!") + string(" ") + warning;
        str = formatted(str, dialog_->text_warning->w-10,
                         FL_SMALL_SIZE, FL_NORMAL_STYLE);
 
-       fl_set_object_label(dialog_->text_warning, _(str.c_str()));
+       fl_set_object_label(dialog_->text_warning, str.c_str());
        fl_set_object_lsize(dialog_->text_warning, FL_SMALL_SIZE);
 }
 
index ef13c283eaf6b25d2f6f9e2b3441e8fc0da79eab..3c3c0e253f603feb292f528fd5d1049f359320b8 100644 (file)
@@ -7,19 +7,26 @@
 
 char const * _(char const * str)
 {
-       return gettext(str);
+       if (str && str[0])
+               return gettext(str);
+       else
+               return "";
 }
 
 
 string const _(string const & str) 
 {
-       int const s = str.length();
-       char * tmp = new char[s + 1];
-       str.copy(tmp, s);
-       tmp[s] = '\0';
-       string ret(gettext(tmp));
-       delete [] tmp;
-       return ret;
+       if (!str.empty()) {
+               int const s = str.length();
+               char * tmp = new char[s + 1];
+               str.copy(tmp, s);
+               tmp[s] = '\0';
+               string ret(gettext(tmp));
+               delete [] tmp;
+               return ret;
+       }
+       else
+               return string();
 }
 
 #endif
index 4ae9b82cdeb02a782c87c7e3711c5fec1eb30372..22471c2f51d3aa55787b7b45e15498ef9dafac14 100644 (file)
@@ -242,8 +242,14 @@ void deco_cb(FL_OBJECT *, long data)
     case MM_OK:
       { 
         int i = fl_get_bmtable(fd_deco->menu);
-        lyxfunc->Dispatch(LFUN_INSERT_MATH, deco_code[i]);
-        if (data == MM_APPLY) break;
+        // ideally the callback should not be called if the index is
+        // greater than the maxitem of the bmtable, but I do not know
+        // how to enforce that (JMarc)
+        if (i <= sizeof(deco_code)/sizeof(deco_code[0])) {
+          lyxfunc->Dispatch(LFUN_INSERT_MATH, deco_code[i]);
+          if (data == MM_APPLY) break;
+        }
+        else break;
       }
     case MM_CLOSE: fl_hide_form(fd_deco->deco); break;
    }