]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommandParams.cpp
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetCommandParams.cpp
index 90fe6cca8ad813cd38ac067f29b1e13ee25610ff..f93f83552eaabad7e06ebd48e047604209eb991e 100644 (file)
 #include "InsetRef.h"
 #include "InsetTOC.h"
 
-#include "support/debug.h"
-#include "support/gettext.h"
 #include "Lexer.h"
 
+#include "support/debug.h"
 #include "support/ExceptionMessage.h"
+#include "support/gettext.h"
 #include "support/lstrings.h"
 #include "support/docstream.h"
 
@@ -178,7 +178,7 @@ void InsetCommandParams::setCmdName(string const & name)
                LYXERR0("InsetCommand: Incompatible command name " << 
                                name << ".");
                throw ExceptionMessage(WarningException, _("InsetCommand Error: "),
-                                      from_utf8("Incompatible command name."));
+                                      _("Incompatible command name."));
        }
 
        cmdName_ = name;
@@ -207,9 +207,9 @@ void InsetCommandParams::read(Lexer & lex)
                string const insetType = lex.getString();
                InsetCode const code = insetCode(insetType);
                if (code != insetCode_) {
-                       lex.printError("InsetCommand: Attempt to change type of parameters.");
-                       throw ExceptionMessage(WarningException, _("InsetCommand Error: "),
-                               from_utf8("Attempt to change type of parameters."));
+                       lex.printError("InsetCommandParams: Attempt to change type of inset.");
+                       throw ExceptionMessage(WarningException, _("InsetCommandParams Error: "),
+                                        _("Attempt to change type of parameters."));
                }
        }
 
@@ -217,24 +217,24 @@ void InsetCommandParams::read(Lexer & lex)
                lex.next();
                string const test = lex.getString();
                if (test != "LatexCommand") {
-                       lex.printError("InsetCommand: no LatexCommand line found.");
-                       throw ExceptionMessage(WarningException, _("InsetCommand error:"),
-                               from_utf8("Can't find LatexCommand line."));
+                       lex.printError("InsetCommandParams: No LatexCommand line found.");
+                       throw ExceptionMessage(WarningException, _("InsetCommandParams error:"),
+                                              _("Can't find LatexCommand line."));
                }
        }
        lex.next();
        cmdName_ = lex.getString();
        if (!isCompatibleCommand(insetCode_, cmdName_)){
-               lex.printError("InsetCommand: Incompatible command name " + cmdName_ + ".");
-               throw ExceptionMessage(WarningException, _("InsetCommand Error: "),
-                                      from_utf8("Incompatible command name."));
+               lex.printError("InsetCommandParams: Incompatible command name " + cmdName_ + ".");
+               throw ExceptionMessage(WarningException, _("InsetCommandParams Error: "),
+                                      _("Incompatible command name."));
        }
 
        info_ = findInfo(insetCode_, cmdName_);
        if (!info_) {
-               lex.printError("InsetCommand: Unknown inset name `$$Token'");
+               lex.printError("InsetCommandParams: Unknown inset name `$$Token'");
                throw ExceptionMessage(WarningException,
-                       _("Unknown inset name: "), from_utf8(insetType()));
+                                      _("Unknown inset name: "), from_utf8(insetType()));
        }
        
        string token;
@@ -255,7 +255,7 @@ void InsetCommandParams::read(Lexer & lex)
                } else {
                        lex.printError("Unknown parameter name `$$Token' for command " + cmdName_);
                        throw ExceptionMessage(WarningException,
-                               _("Inset Command: ") + from_ascii(cmdName_),
+                               _("InsetCommandParams: ") + from_ascii(cmdName_),
                                _("Unknown parameter name: ") + from_utf8(token));
                }
        }