mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 07:42:02 +00:00
Change _() to return a docstring. Fixup callers with the help of lyx::to_utf8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14952 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5aa348d969
commit
43b77ba2d7
@ -161,11 +161,11 @@ bool BufferView::Pimpl::loadLyXFile(string const & filename, bool tolastfiles)
|
||||
// File already open?
|
||||
if (bufferlist.exists(s)) {
|
||||
string const file = makeDisplayPath(s, 20);
|
||||
string text = bformat(_("The document %1$s is already "
|
||||
"loaded.\n\nDo you want to revert "
|
||||
"to the saved version?"), file);
|
||||
int const ret = Alert::prompt(_("Revert to saved document?"),
|
||||
text, 0, 1, _("&Revert"), _("&Switch to document"));
|
||||
string text = bformat(lyx::to_utf8(_("The document %1$s is already "
|
||||
"loaded.\n\nDo you want to revert "
|
||||
"to the saved version?")), file);
|
||||
int const ret = Alert::prompt(lyx::to_utf8(_("Revert to saved document?")),
|
||||
text, 0, 1, lyx::to_utf8(_("&Revert")), lyx::to_utf8(_("&Switch to document")));
|
||||
|
||||
if (ret != 0) {
|
||||
setBuffer(bufferlist.getBuffer(s));
|
||||
@ -186,11 +186,11 @@ bool BufferView::Pimpl::loadLyXFile(string const & filename, bool tolastfiles)
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
string text = bformat(_("The document %1$s does not yet "
|
||||
"exist.\n\nDo you want to create "
|
||||
"a new document?"), s);
|
||||
int const ret = Alert::prompt(_("Create new document?"),
|
||||
text, 0, 1, _("&Create"), _("Cancel"));
|
||||
string text = bformat(lyx::to_utf8(_("The document %1$s does not yet "
|
||||
"exist.\n\nDo you want to create "
|
||||
"a new document?")), s);
|
||||
int const ret = Alert::prompt(lyx::to_utf8(_("Create new document?")),
|
||||
text, 0, 1, lyx::to_utf8(_("&Create")), lyx::to_utf8(_("Cancel")));
|
||||
|
||||
if (ret == 0) {
|
||||
b = newFile(s, string(), true);
|
||||
@ -604,7 +604,7 @@ void BufferView::Pimpl::savePosition(unsigned int i)
|
||||
cursor_.pos());
|
||||
if (i > 0)
|
||||
// emit message signal.
|
||||
bv_->message(bformat(_("Saved bookmark %1$d"), i));
|
||||
bv_->message(bformat(lyx::to_utf8(_("Saved bookmark %1$d")), i));
|
||||
}
|
||||
|
||||
|
||||
@ -638,7 +638,7 @@ void BufferView::Pimpl::restorePosition(unsigned int i)
|
||||
|
||||
if (i > 0)
|
||||
// emit message signal.
|
||||
bv_->message(bformat(_("Moved to bookmark %1$d"), i));
|
||||
bv_->message(bformat(lyx::to_utf8(_("Moved to bookmark %1$d")), i));
|
||||
}
|
||||
|
||||
|
||||
@ -708,16 +708,16 @@ void BufferView::Pimpl::menuInsertLyXFile(string const & filenm)
|
||||
initpath = trypath;
|
||||
}
|
||||
|
||||
FileDialog fileDlg(_("Select LyX document to insert"),
|
||||
FileDialog fileDlg(lyx::to_utf8(_("Select LyX document to insert")),
|
||||
LFUN_FILE_INSERT,
|
||||
make_pair(string(_("Documents|#o#O")),
|
||||
make_pair(string(lyx::to_utf8(_("Documents|#o#O"))),
|
||||
string(lyxrc.document_path)),
|
||||
make_pair(string(_("Examples|#E#e")),
|
||||
make_pair(string(lyx::to_utf8(_("Examples|#E#e"))),
|
||||
string(addPath(package().system_support(), "examples"))));
|
||||
|
||||
FileDialog::Result result =
|
||||
fileDlg.open(initpath,
|
||||
FileFilterList(_("LyX Documents (*.lyx)")),
|
||||
FileFilterList(lyx::to_utf8(_("LyX Documents (*.lyx)"))),
|
||||
string());
|
||||
|
||||
if (result.first == FileDialog::Later)
|
||||
@ -728,7 +728,7 @@ void BufferView::Pimpl::menuInsertLyXFile(string const & filenm)
|
||||
// check selected filename
|
||||
if (filename.empty()) {
|
||||
// emit message signal.
|
||||
bv_->message(_("Canceled."));
|
||||
bv_->message(lyx::to_utf8(_("Canceled.")));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -739,7 +739,7 @@ void BufferView::Pimpl::menuInsertLyXFile(string const & filenm)
|
||||
|
||||
string const disp_fn = makeDisplayPath(filename);
|
||||
// emit message signal.
|
||||
bv_->message(bformat(_("Inserting document %1$s..."), disp_fn));
|
||||
bv_->message(bformat(lyx::to_utf8(_("Inserting document %1$s...")), disp_fn));
|
||||
|
||||
string res;
|
||||
Buffer buf("", false);
|
||||
@ -749,9 +749,9 @@ void BufferView::Pimpl::menuInsertLyXFile(string const & filenm)
|
||||
el = buf.errorList("Parse");
|
||||
lyx::cap::pasteParagraphList(cursor_, buf.paragraphs(),
|
||||
buf.params().textclass, el);
|
||||
res = _("Document %1$s inserted.");
|
||||
res = lyx::to_utf8(_("Document %1$s inserted."));
|
||||
} else
|
||||
res = _("Could not insert document %1$s");
|
||||
res = lyx::to_utf8(_("Could not insert document %1$s"));
|
||||
|
||||
// emit message signal.
|
||||
bv_->message(bformat(res, disp_fn));
|
||||
@ -957,10 +957,10 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
|
||||
case LFUN_UNDO:
|
||||
if (available()) {
|
||||
cur.message(_("Undo"));
|
||||
cur.message(lyx::to_utf8(_("Undo")));
|
||||
cur.clearSelection();
|
||||
if (!textUndo(*bv_))
|
||||
cur.message(_("No further undo information"));
|
||||
cur.message(lyx::to_utf8(_("No further undo information")));
|
||||
update();
|
||||
switchKeyMap();
|
||||
}
|
||||
@ -968,10 +968,10 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
|
||||
case LFUN_REDO:
|
||||
if (available()) {
|
||||
cur.message(_("Redo"));
|
||||
cur.message(lyx::to_utf8(_("Redo")));
|
||||
cur.clearSelection();
|
||||
if (!textRedo(*bv_))
|
||||
cur.message(_("No further redo information"));
|
||||
cur.message(lyx::to_utf8(_("No further redo information")));
|
||||
update();
|
||||
switchKeyMap();
|
||||
}
|
||||
@ -1182,20 +1182,20 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
string message;
|
||||
if (count != 1) {
|
||||
if (cur.selection())
|
||||
message = bformat(_("%1$d words in selection."),
|
||||
message = bformat(lyx::to_utf8(_("%1$d words in selection.")),
|
||||
count);
|
||||
else
|
||||
message = bformat(_("%1$d words in document."),
|
||||
message = bformat(lyx::to_utf8(_("%1$d words in document.")),
|
||||
count);
|
||||
}
|
||||
else {
|
||||
if (cur.selection())
|
||||
message = _("One word in selection.");
|
||||
message = lyx::to_utf8(_("One word in selection."));
|
||||
else
|
||||
message = _("One word in document.");
|
||||
message = lyx::to_utf8(_("One word in document."));
|
||||
}
|
||||
|
||||
Alert::information(_("Count words"), message);
|
||||
Alert::information(lyx::to_utf8(_("Count words")), message);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1222,9 +1222,9 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
if (!cur.result().dispatched())
|
||||
cur.dispatch(tmpcmd);
|
||||
|
||||
if (cur.result().dispatched())
|
||||
if (cur.result().dispatched())
|
||||
cur.clearSelection();
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -64,9 +64,9 @@ int Chktex::scanLogFile(TeXErrors & terr)
|
||||
string const tmp = onlyFilename(changeExtension(file, ".log"));
|
||||
|
||||
#if USE_BOOST_FORMAT
|
||||
boost::format msg(_("ChkTeX warning id # %1$d"));
|
||||
boost::format msg(lyx::to_utf8(_("ChkTeX warning id # %1$d")));
|
||||
#else
|
||||
string const msg(_("ChkTeX warning id # "));
|
||||
string const msg(lyx::to_utf8(_("ChkTeX warning id # ")));
|
||||
#endif
|
||||
ifstream ifs(tmp.c_str());
|
||||
while (getline(ifs, token)) {
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
// to the buffer language.
|
||||
if (p.ownerCode() == InsetBase::ERT_CODE) {
|
||||
p.changeLanguage(buffer_.params(), latex_language,
|
||||
buffer_.getLanguage());
|
||||
buffer_.getLanguage());
|
||||
}
|
||||
p.setInsetOwner(0);
|
||||
}
|
||||
@ -403,11 +403,11 @@ void switchBetweenClasses(textclass_type c1, textclass_type c2,
|
||||
|
||||
if (!hasLayout && name != tclass1.defaultLayoutName()) {
|
||||
string const s = bformat(
|
||||
_("Layout had to be changed from\n%1$s to %2$s\n"
|
||||
"because of class conversion from\n%3$s to %4$s"),
|
||||
lyx::to_utf8(_("Layout had to be changed from\n%1$s to %2$s\n"
|
||||
"because of class conversion from\n%3$s to %4$s")),
|
||||
name, it->layout()->name(), tclass1.name(), tclass2.name());
|
||||
// To warn the user that something had to be done.
|
||||
errorlist.push_back(ErrorItem(_("Changed Layout"), s,
|
||||
errorlist.push_back(ErrorItem(lyx::to_utf8(_("Changed Layout")), s,
|
||||
it->id(), 0,
|
||||
it->size()));
|
||||
}
|
||||
@ -425,14 +425,14 @@ void switchBetweenClasses(textclass_type c1, textclass_type c2,
|
||||
if (found_cs == tclass2.charstyles().end()) {
|
||||
// The character style is undefined in tclass2
|
||||
inset.setUndefined();
|
||||
string const s = bformat(_(
|
||||
string const s = bformat(lyx::to_utf8(_(
|
||||
"Character style %1$s is "
|
||||
"undefined because of class "
|
||||
"conversion from\n%2$s to %3$s"),
|
||||
"conversion from\n%2$s to %3$s")),
|
||||
name, tclass1.name(), tclass2.name());
|
||||
// To warn the user that something had to be done.
|
||||
errorlist.push_back(ErrorItem(
|
||||
_("Undefined character style"),
|
||||
lyx::to_utf8(_("Undefined character style")),
|
||||
s, it.paragraph().id(),
|
||||
it.pos(), it.pos() + 1));
|
||||
} else if (inset.undefined()) {
|
||||
@ -500,7 +500,7 @@ void cutSelection(LCursor & cur, bool doclear, bool realcut)
|
||||
// faster we need to be more clever and probably also have more
|
||||
// calls to cur.bv().owner()->gui().selection().put. (Lgb)
|
||||
// cur.bv().owner()->gui().selection().put(cur.selectionAsString(true));
|
||||
|
||||
|
||||
|
||||
// make sure that the depth behind the selection are restored, too
|
||||
recordUndoSelection(cur);
|
||||
|
@ -177,7 +177,7 @@ string const LColor::getGUIName(LColor::color c) const
|
||||
{
|
||||
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
|
||||
if (it != pimpl_->infotab.end())
|
||||
return _(it->second.guiname);
|
||||
return lyx::to_utf8(_(it->second.guiname));
|
||||
return "none";
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ LColor::color LColor::getFromGUIName(string const & guiname) const
|
||||
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.begin();
|
||||
Pimpl::InfoTab::const_iterator end = pimpl_->infotab.end();
|
||||
for (; it != end; ++it) {
|
||||
if (!compare_ascii_no_case(_(it->second.guiname), guiname))
|
||||
if (!compare_ascii_no_case(lyx::to_utf8(_(it->second.guiname)), guiname))
|
||||
return it->first;
|
||||
}
|
||||
return LColor::inherit;
|
||||
|
@ -84,7 +84,7 @@ namespace {
|
||||
|
||||
string runMessage(unsigned int count)
|
||||
{
|
||||
return bformat(_("Waiting for LaTeX run number %1$d"), count);
|
||||
return bformat(lyx::to_utf8(_("Waiting for LaTeX run number %1$d")), count);
|
||||
}
|
||||
|
||||
} // anon namespace
|
||||
@ -278,7 +278,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
if (head.haschanged(onlyFilename(changeExtension(file, ".idx")))) {
|
||||
// no checks for now
|
||||
lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
|
||||
message(_("Running MakeIndex."));
|
||||
message(lyx::to_utf8(_("Running MakeIndex.")));
|
||||
rerun |= runMakeIndex(onlyFilename(changeExtension(file, ".idx")), runparams);
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
// tags is found -> run bibtex and set rerun = true;
|
||||
// no checks for now
|
||||
lyxerr[Debug::LATEX] << "Running BibTeX." << endl;
|
||||
message(_("Running BibTeX."));
|
||||
message(lyx::to_utf8(_("Running BibTeX.")));
|
||||
updateBibtexDependencies(head, bibtex_info);
|
||||
rerun |= runBibTeX(bibtex_info);
|
||||
} else if (!had_depfile) {
|
||||
@ -346,7 +346,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
if (head.haschanged(onlyFilename(changeExtension(file, ".idx")))) {
|
||||
// no checks for now
|
||||
lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
|
||||
message(_("Running MakeIndex."));
|
||||
message(lyx::to_utf8(_("Running MakeIndex.")));
|
||||
rerun = runMakeIndex(onlyFilename(changeExtension(file, ".idx")), runparams);
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ Menu & Menu::read(LyXLex & lex)
|
||||
// fallback to md_item
|
||||
case md_item: {
|
||||
lex.next(true);
|
||||
string const name = _(lex.getString());
|
||||
string const name = lyx::to_utf8(_(lex.getString()));
|
||||
lex.next(true);
|
||||
string const command = lex.getString();
|
||||
FuncRequest func = lyxaction.lookupFunc(command);
|
||||
@ -335,7 +335,7 @@ Menu & Menu::read(LyXLex & lex)
|
||||
// fallback to md_submenu
|
||||
case md_submenu: {
|
||||
lex.next(true);
|
||||
string const mlabel = _(lex.getString());
|
||||
string const mlabel = lyx::to_utf8(_(lex.getString()));
|
||||
lex.next(true);
|
||||
string const mname = lex.getString();
|
||||
add(MenuItem(MenuItem::Submenu, mlabel, mname,
|
||||
@ -448,7 +448,7 @@ void expandDocuments(Menu & tomenu, LyXView const * view)
|
||||
Strings const names = bufferlist.getFileNames();
|
||||
|
||||
if (names.empty()) {
|
||||
tomenu.add(MenuItem(MenuItem::Command, _("No Documents Open!"),
|
||||
tomenu.add(MenuItem(MenuItem::Command, lyx::to_utf8(_("No Documents Open!")),
|
||||
FuncRequest(LFUN_NOACTION)), view);
|
||||
return;
|
||||
}
|
||||
@ -469,7 +469,7 @@ void expandFormats(MenuItem::Kind kind, Menu & tomenu, LyXView const * view)
|
||||
{
|
||||
if (!view->buffer() && kind != MenuItem::ImportFormats) {
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
_("No Documents Open!"),
|
||||
lyx::to_utf8(_("No Documents Open!")),
|
||||
FuncRequest(LFUN_NOACTION)),
|
||||
view);
|
||||
return;
|
||||
@ -508,9 +508,9 @@ void expandFormats(MenuItem::Kind kind, Menu & tomenu, LyXView const * view)
|
||||
switch (kind) {
|
||||
case MenuItem::ImportFormats:
|
||||
if ((*fit)->name() == "text")
|
||||
label = _("Plain Text as Lines");
|
||||
label = lyx::to_utf8(_("Plain Text as Lines"));
|
||||
else if ((*fit)->name() == "textparagraph")
|
||||
label = _("Plain Text as Paragraphs");
|
||||
label = lyx::to_utf8(_("Plain Text as Paragraphs"));
|
||||
label += "...";
|
||||
break;
|
||||
case MenuItem::ViewFormats:
|
||||
@ -537,7 +537,7 @@ void expandFloatListInsert(Menu & tomenu, LyXView const * view)
|
||||
{
|
||||
if (!view->buffer()) {
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
_("No Documents Open!"),
|
||||
lyx::to_utf8(_("No Documents Open!")),
|
||||
FuncRequest(LFUN_NOACTION)),
|
||||
view);
|
||||
return;
|
||||
@ -549,7 +549,7 @@ void expandFloatListInsert(Menu & tomenu, LyXView const * view)
|
||||
FloatList::const_iterator end = floats.end();
|
||||
for (; cit != end; ++cit) {
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
_(cit->second.listName()),
|
||||
lyx::to_utf8(_(cit->second.listName())),
|
||||
FuncRequest(LFUN_FLOAT_LIST,
|
||||
cit->second.type())),
|
||||
view);
|
||||
@ -561,7 +561,7 @@ void expandFloatInsert(Menu & tomenu, LyXView const * view)
|
||||
{
|
||||
if (!view->buffer()) {
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
_("No Documents Open!"),
|
||||
lyx::to_utf8(_("No Documents Open!")),
|
||||
FuncRequest(LFUN_NOACTION)),
|
||||
view);
|
||||
return;
|
||||
@ -573,7 +573,7 @@ void expandFloatInsert(Menu & tomenu, LyXView const * view)
|
||||
FloatList::const_iterator end = floats.end();
|
||||
for (; cit != end; ++cit) {
|
||||
// normal float
|
||||
string const label = _(cit->second.name());
|
||||
string const label = lyx::to_utf8(_(cit->second.name()));
|
||||
tomenu.add(MenuItem(MenuItem::Command, label,
|
||||
FuncRequest(LFUN_FLOAT_INSERT,
|
||||
cit->second.type())),
|
||||
@ -586,7 +586,7 @@ void expandCharStyleInsert(Menu & tomenu, LyXView const * view)
|
||||
{
|
||||
if (!view->buffer()) {
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
_("No Documents Open!"),
|
||||
lyx::to_utf8(_("No Documents Open!")),
|
||||
FuncRequest(LFUN_NOACTION)),
|
||||
view);
|
||||
return;
|
||||
@ -675,7 +675,7 @@ void expandToc(Menu & tomenu, LyXView const * view)
|
||||
Buffer const * buf = view->buffer();
|
||||
if (!buf) {
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
_("No Documents Open!"),
|
||||
lyx::to_utf8(_("No Documents Open!")),
|
||||
FuncRequest(LFUN_NOACTION)),
|
||||
view);
|
||||
return;
|
||||
@ -701,7 +701,7 @@ void expandToc(Menu & tomenu, LyXView const * view)
|
||||
FuncRequest(ccit->action())));
|
||||
}
|
||||
string const & floatName = floatlist.getType(cit->first).listName();
|
||||
MenuItem item(MenuItem::Submenu, _(floatName));
|
||||
MenuItem item(MenuItem::Submenu, lyx::to_utf8(_(floatName)));
|
||||
item.submenu(menu.release());
|
||||
tomenu.add(item);
|
||||
}
|
||||
@ -710,7 +710,7 @@ void expandToc(Menu & tomenu, LyXView const * view)
|
||||
cit = toc_list.find("TOC");
|
||||
if (cit == end) {
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
_("No Table of contents"),
|
||||
lyx::to_utf8(_("No Table of contents")),
|
||||
FuncRequest()),
|
||||
view);
|
||||
} else {
|
||||
|
@ -45,5 +45,5 @@ string const SpellBase::nextMiss()
|
||||
|
||||
string const SpellBase::error()
|
||||
{
|
||||
return _("Native OS API not yet supported.");
|
||||
return lyx::to_utf8(_("Native OS API not yet supported."));
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void ToolbarBackend::read(LyXLex & lex)
|
||||
switch (lex.lex()) {
|
||||
case TO_ADD:
|
||||
if (lex.next(true)) {
|
||||
string const tooltip = _(lex.getString());
|
||||
string const tooltip = lyx::to_utf8(_(lex.getString()));
|
||||
lex.next(true);
|
||||
string const func_arg = lex.getString();
|
||||
lyxerr[Debug::PARSER]
|
||||
|
78
src/buffer.C
78
src/buffer.C
@ -231,8 +231,8 @@ Buffer::~Buffer()
|
||||
closing();
|
||||
|
||||
if (!temppath().empty() && !destroyDir(temppath())) {
|
||||
Alert::warning(_("Could not remove temporary directory"),
|
||||
bformat(_("Could not remove the temporary directory %1$s"), temppath()));
|
||||
Alert::warning(lyx::to_utf8(_("Could not remove temporary directory")),
|
||||
bformat(lyx::to_utf8(_("Could not remove the temporary directory %1$s")), temppath()));
|
||||
}
|
||||
|
||||
// Remove any previewed LaTeX snippets associated with this buffer.
|
||||
@ -389,9 +389,9 @@ namespace {
|
||||
|
||||
void unknownClass(string const & unknown)
|
||||
{
|
||||
Alert::warning(_("Unknown document class"),
|
||||
bformat(_("Using the default document class, because the "
|
||||
"class %1$s is unknown."), unknown));
|
||||
Alert::warning(lyx::to_utf8(_("Unknown document class")),
|
||||
bformat(lyx::to_utf8(_("Using the default document class, because the "
|
||||
"class %1$s is unknown.")), unknown));
|
||||
}
|
||||
|
||||
} // anon
|
||||
@ -445,18 +445,18 @@ int Buffer::readHeader(LyXLex & lex)
|
||||
unknownClass(unknown);
|
||||
} else {
|
||||
++unknown_tokens;
|
||||
string const s = bformat(_("Unknown token: "
|
||||
"%1$s %2$s\n"),
|
||||
string const s = bformat(lyx::to_utf8(_("Unknown token: "
|
||||
"%1$s %2$s\n")),
|
||||
token,
|
||||
lex.getString());
|
||||
errorList.push_back(ErrorItem(_("Document header error"),
|
||||
errorList.push_back(ErrorItem(lyx::to_utf8(_("Document header error")),
|
||||
s, -1, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (begin_header_line) {
|
||||
string const s = _("\\begin_header is missing");
|
||||
errorList.push_back(ErrorItem(_("Document header error"),
|
||||
string const s = lyx::to_utf8(_("\\begin_header is missing"));
|
||||
errorList.push_back(ErrorItem(lyx::to_utf8(_("Document header error")),
|
||||
s, -1, 0, 0));
|
||||
}
|
||||
|
||||
@ -475,8 +475,8 @@ bool Buffer::readDocument(LyXLex & lex)
|
||||
lex.next();
|
||||
string const token = lex.getString();
|
||||
if (token != "\\begin_document") {
|
||||
string const s = _("\\begin_document is missing");
|
||||
errorList.push_back(ErrorItem(_("Document header error"),
|
||||
string const s = lyx::to_utf8(_("\\begin_document is missing"));
|
||||
errorList.push_back(ErrorItem(lyx::to_utf8(_("Document header error")),
|
||||
s, -1, 0, 0));
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ bool Buffer::readDocument(LyXLex & lex)
|
||||
readHeader(lex);
|
||||
if (!params().getLyXTextClass().load(filePath())) {
|
||||
string theclass = params().getLyXTextClass().name();
|
||||
Alert::error(_("Can't load document class"), bformat(
|
||||
Alert::error(lyx::to_utf8(_("Can't load document class")), bformat(
|
||||
"Using the default document class, because the "
|
||||
" class %1$s could not be loaded.", theclass));
|
||||
params().textclass = 0;
|
||||
@ -599,8 +599,8 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
|
||||
BOOST_ASSERT(!filename.empty());
|
||||
|
||||
if (!lex.isOK()) {
|
||||
Alert::error(_("Document could not be read"),
|
||||
bformat(_("%1$s could not be read."), filename));
|
||||
Alert::error(lyx::to_utf8(_("Document could not be read")),
|
||||
bformat(lyx::to_utf8(_("%1$s could not be read.")), filename));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -608,8 +608,8 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
|
||||
string const token(lex.getString());
|
||||
|
||||
if (!lex.isOK()) {
|
||||
Alert::error(_("Document could not be read"),
|
||||
bformat(_("%1$s could not be read."), filename));
|
||||
Alert::error(lyx::to_utf8(_("Document could not be read")),
|
||||
bformat(lyx::to_utf8(_("%1$s could not be read.")), filename));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -617,8 +617,8 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
|
||||
if (token != "\\lyxformat") {
|
||||
lyxerr << "Token: " << token << endl;
|
||||
|
||||
Alert::error(_("Document format failure"),
|
||||
bformat(_("%1$s is not a LyX document."),
|
||||
Alert::error(lyx::to_utf8(_("Document format failure")),
|
||||
bformat(lyx::to_utf8(_("%1$s is not a LyX document.")),
|
||||
filename));
|
||||
return false;
|
||||
}
|
||||
@ -637,21 +637,21 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
|
||||
if (file_format != LYX_FORMAT) {
|
||||
string const tmpfile = tempName();
|
||||
if (tmpfile.empty()) {
|
||||
Alert::error(_("Conversion failed"),
|
||||
bformat(_("%1$s is from an earlier"
|
||||
Alert::error(lyx::to_utf8(_("Conversion failed")),
|
||||
bformat(lyx::to_utf8(_("%1$s is from an earlier"
|
||||
" version of LyX, but a temporary"
|
||||
" file for converting it could"
|
||||
" not be created."),
|
||||
" not be created.")),
|
||||
filename));
|
||||
return false;
|
||||
}
|
||||
string const lyx2lyx = libFileSearch("lyx2lyx", "lyx2lyx");
|
||||
if (lyx2lyx.empty()) {
|
||||
Alert::error(_("Conversion script not found"),
|
||||
bformat(_("%1$s is from an earlier"
|
||||
Alert::error(lyx::to_utf8(_("Conversion script not found")),
|
||||
bformat(lyx::to_utf8(_("%1$s is from an earlier"
|
||||
" version of LyX, but the"
|
||||
" conversion script lyx2lyx"
|
||||
" could not be found."),
|
||||
" could not be found.")),
|
||||
filename));
|
||||
return false;
|
||||
}
|
||||
@ -668,10 +668,10 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
|
||||
|
||||
cmd_ret const ret = runCommand(command_str);
|
||||
if (ret.first != 0) {
|
||||
Alert::error(_("Conversion script failed"),
|
||||
bformat(_("%1$s is from an earlier version"
|
||||
Alert::error(lyx::to_utf8(_("Conversion script failed")),
|
||||
bformat(lyx::to_utf8(_("%1$s is from an earlier version"
|
||||
" of LyX, but the lyx2lyx script"
|
||||
" failed to convert it."),
|
||||
" failed to convert it.")),
|
||||
filename));
|
||||
return false;
|
||||
} else {
|
||||
@ -683,9 +683,9 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
|
||||
}
|
||||
|
||||
if (readDocument(lex)) {
|
||||
Alert::error(_("Document format failure"),
|
||||
bformat(_("%1$s ended unexpectedly, which means"
|
||||
" that it is probably corrupted."),
|
||||
Alert::error(lyx::to_utf8(_("Document format failure")),
|
||||
bformat(lyx::to_utf8(_("%1$s ended unexpectedly, which means"
|
||||
" that it is probably corrupted.")),
|
||||
filename));
|
||||
}
|
||||
|
||||
@ -720,9 +720,9 @@ bool Buffer::save() const
|
||||
fs::copy_file(fileName(), s, false);
|
||||
}
|
||||
catch (fs::filesystem_error const & fe) {
|
||||
Alert::error(_("Backup failure"),
|
||||
bformat(_("LyX was not able to make a backup copy in %1$s.\n"
|
||||
"Please check if the directory exists and is writeable."),
|
||||
Alert::error(lyx::to_utf8(_("Backup failure")),
|
||||
bformat(lyx::to_utf8(_("LyX was not able to make a backup copy in %1$s.\n"
|
||||
"Please check if the directory exists and is writeable.")),
|
||||
fs::path(s).branch_path().native_directory_string()));
|
||||
lyxerr[Debug::DEBUG] << "Fs error: "
|
||||
<< fe.what() << endl;
|
||||
@ -1076,7 +1076,7 @@ int Buffer::runChktex()
|
||||
string const org_path = filePath();
|
||||
|
||||
Path p(path); // path to LaTeX file
|
||||
message(_("Running chktex..."));
|
||||
message(lyx::to_utf8(_("Running chktex...")));
|
||||
|
||||
// Generate the LaTeX file if neccessary
|
||||
OutputParams runparams;
|
||||
@ -1089,8 +1089,8 @@ int Buffer::runChktex()
|
||||
int const res = chktex.run(terr); // run chktex
|
||||
|
||||
if (res == -1) {
|
||||
Alert::error(_("chktex failure"),
|
||||
_("Could not run chktex successfully."));
|
||||
Alert::error(lyx::to_utf8(_("chktex failure")),
|
||||
lyx::to_utf8(_("Could not run chktex successfully.")));
|
||||
} else if (res > 0) {
|
||||
// Fill-in the error list with the TeX errors
|
||||
bufferErrors(*this, terr, errorLists_["ChkTex"]);
|
||||
@ -1391,9 +1391,7 @@ docstring const Buffer::B_(string const & l10n) const
|
||||
return pimpl_->messages->get(l10n);
|
||||
}
|
||||
|
||||
// FIXME UNICODE When _() is changed to return a docstring
|
||||
// the from_utf8 can be removed
|
||||
return lyx::from_utf8(_(l10n));
|
||||
return _(l10n);
|
||||
}
|
||||
|
||||
|
||||
|
@ -74,9 +74,9 @@ bool readFile(Buffer * const b, string const & s)
|
||||
// File information about normal file
|
||||
if (!fs::exists(s)) {
|
||||
string const file = makeDisplayPath(s, 50);
|
||||
string text = bformat(_("The specified document\n%1$s"
|
||||
"\ncould not be read."), file);
|
||||
Alert::error(_("Could not read document"), text);
|
||||
string text = bformat(lyx::to_utf8(_("The specified document\n%1$s"
|
||||
"\ncould not be read.")), file);
|
||||
Alert::error(lyx::to_utf8(_("Could not read document")), text);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -88,12 +88,12 @@ bool readFile(Buffer * const b, string const & s)
|
||||
{
|
||||
string const file = makeDisplayPath(s, 20);
|
||||
string const text =
|
||||
bformat(_("An emergency save of the document "
|
||||
bformat(lyx::to_utf8(_("An emergency save of the document "
|
||||
"%1$s exists.\n\n"
|
||||
"Recover emergency save?"), file);
|
||||
switch (Alert::prompt(_("Load emergency save?"), text, 0, 2,
|
||||
_("&Recover"), _("&Load Original"),
|
||||
_("&Cancel")))
|
||||
"Recover emergency save?")), file);
|
||||
switch (Alert::prompt(lyx::to_utf8(_("Load emergency save?")), text, 0, 2,
|
||||
lyx::to_utf8(_("&Recover")), lyx::to_utf8(_("&Load Original")),
|
||||
lyx::to_utf8(_("&Cancel"))))
|
||||
{
|
||||
case 0:
|
||||
// the file is not saved if we load the emergency file.
|
||||
@ -114,12 +114,12 @@ bool readFile(Buffer * const b, string const & s)
|
||||
{
|
||||
string const file = makeDisplayPath(s, 20);
|
||||
string const text =
|
||||
bformat(_("The backup of the document "
|
||||
bformat(lyx::to_utf8(_("The backup of the document "
|
||||
"%1$s is newer.\n\nLoad the "
|
||||
"backup instead?"), file);
|
||||
switch (Alert::prompt(_("Load backup?"), text, 0, 2,
|
||||
_("&Load backup"), _("Load &original"),
|
||||
_("&Cancel") ))
|
||||
"backup instead?")), file);
|
||||
switch (Alert::prompt(lyx::to_utf8(_("Load backup?")), text, 0, 2,
|
||||
lyx::to_utf8(_("&Load backup")), lyx::to_utf8(_("Load &original")),
|
||||
lyx::to_utf8(_("&Cancel") )))
|
||||
{
|
||||
case 0:
|
||||
// the file is not saved if we load the autosave file.
|
||||
@ -157,10 +157,10 @@ bool loadLyXFile(Buffer * b, string const & s)
|
||||
// Here we probably should run
|
||||
if (LyXVC::file_not_found_hook(s)) {
|
||||
string const text =
|
||||
bformat(_("Do you want to retrieve the document"
|
||||
" %1$s from version control?"), file);
|
||||
int const ret = Alert::prompt(_("Retrieve from version control?"),
|
||||
text, 0, 1, _("&Retrieve"), _("&Cancel"));
|
||||
bformat(lyx::to_utf8(_("Do you want to retrieve the document"
|
||||
" %1$s from version control?")), file);
|
||||
int const ret = Alert::prompt(lyx::to_utf8(_("Retrieve from version control?")),
|
||||
text, 0, 1, lyx::to_utf8(_("&Retrieve")), lyx::to_utf8(_("&Cancel")));
|
||||
|
||||
if (ret == 0) {
|
||||
// How can we know _how_ to do the checkout?
|
||||
@ -192,8 +192,8 @@ Buffer * newFile(string const & filename, string const & templatename,
|
||||
if (!tname.empty()) {
|
||||
if (!b->readFile(tname)) {
|
||||
string const file = makeDisplayPath(tname, 50);
|
||||
string const text = bformat(_("The specified document template\n%1$s\ncould not be read."), file);
|
||||
Alert::error(_("Could not read template"), text);
|
||||
string const text = bformat(lyx::to_utf8(_("The specified document template\n%1$s\ncould not be read.")), file);
|
||||
Alert::error(lyx::to_utf8(_("Could not read template")), text);
|
||||
bufferlist.release(b);
|
||||
return 0;
|
||||
}
|
||||
@ -491,7 +491,7 @@ void setLabel(Buffer const & buf, ParIterator & it)
|
||||
|
||||
// Doesn't work... yet.
|
||||
// FIXME UNICODE
|
||||
s = bformat(_("%1$s #:"), lyx::to_utf8(buf.B_(fl.name())));
|
||||
s = bformat(lyx::to_utf8(_("%1$s #:")), lyx::to_utf8(buf.B_(fl.name())));
|
||||
} else {
|
||||
// par->SetLayout(0);
|
||||
// FIXME UNICODE
|
||||
|
@ -78,10 +78,10 @@ bool BufferList::quitWriteBuffer(Buffer * buf)
|
||||
file = makeDisplayPath(buf->fileName(), 30);
|
||||
|
||||
string const text =
|
||||
bformat(_("The document %1$s has unsaved changes.\n\n"
|
||||
"Do you want to save the document or discard the changes?"), file);
|
||||
int const ret = Alert::prompt(_("Save changed document?"),
|
||||
text, 0, 2, _("&Save"), _("&Discard"), _("&Cancel"));
|
||||
bformat(lyx::to_utf8(_("The document %1$s has unsaved changes.\n\n"
|
||||
"Do you want to save the document or discard the changes?")), file);
|
||||
int const ret = Alert::prompt(lyx::to_utf8(_("Save changed document?")),
|
||||
text, 0, 2, lyx::to_utf8(_("&Save")), lyx::to_utf8(_("&Discard")), lyx::to_utf8(_("&Cancel")));
|
||||
|
||||
if (ret == 0) {
|
||||
// FIXME: WriteAs can be asynch !
|
||||
@ -126,7 +126,7 @@ bool BufferList::quitWriteAll()
|
||||
// save file names to .lyx/session
|
||||
it = bstore.begin();
|
||||
for (; it != end; ++it) {
|
||||
// if master/slave are both open, do not save slave since it
|
||||
// if master/slave are both open, do not save slave since it
|
||||
// will be automatically loaded when the master is loaded
|
||||
if ((*it)->getMasterBuffer() == (*it))
|
||||
LyX::ref().session().addLastOpenedFile((*it)->fileName());
|
||||
@ -185,10 +185,10 @@ bool BufferList::close(Buffer * buf, bool const ask)
|
||||
fname = makeDisplayPath(buf->fileName(), 30);
|
||||
|
||||
string const text =
|
||||
bformat(_("The document %1$s has unsaved changes.\n\n"
|
||||
"Do you want to save the document or discard the changes?"), fname);
|
||||
int const ret = Alert::prompt(_("Save changed document?"),
|
||||
text, 0, 2, _("&Save"), _("&Discard"), _("&Cancel"));
|
||||
bformat(lyx::to_utf8(_("The document %1$s has unsaved changes.\n\n"
|
||||
"Do you want to save the document or discard the changes?")), fname);
|
||||
int const ret = Alert::prompt(lyx::to_utf8(_("Save changed document?")),
|
||||
text, 0, 2, lyx::to_utf8(_("&Save")), lyx::to_utf8(_("&Discard")), lyx::to_utf8(_("&Cancel")));
|
||||
|
||||
if (ret == 0) {
|
||||
if (buf->isUnnamed()) {
|
||||
@ -307,7 +307,7 @@ void BufferList::emergencyWrite(Buffer * buf)
|
||||
string const doc = buf->isUnnamed()
|
||||
? onlyFilename(buf->fileName()) : buf->fileName();
|
||||
|
||||
lyxerr << bformat(_("LyX: Attempting to save document %1$s"), doc) << endl;
|
||||
lyxerr << bformat(lyx::to_utf8(_("LyX: Attempting to save document %1$s")), doc) << endl;
|
||||
|
||||
// We try to save three places:
|
||||
// 1) Same place as document. Unless it is an unnamed doc.
|
||||
@ -317,10 +317,10 @@ void BufferList::emergencyWrite(Buffer * buf)
|
||||
lyxerr << " " << s << endl;
|
||||
if (buf->writeFile(s)) {
|
||||
buf->markClean();
|
||||
lyxerr << _(" Save seems successful. Phew.") << endl;
|
||||
lyxerr << lyx::to_utf8(_(" Save seems successful. Phew.")) << endl;
|
||||
return;
|
||||
} else {
|
||||
lyxerr << _(" Save failed! Trying...") << endl;
|
||||
lyxerr << lyx::to_utf8(_(" Save failed! Trying...")) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -330,11 +330,11 @@ void BufferList::emergencyWrite(Buffer * buf)
|
||||
lyxerr << ' ' << s << endl;
|
||||
if (buf->writeFile(s)) {
|
||||
buf->markClean();
|
||||
lyxerr << _(" Save seems successful. Phew.") << endl;
|
||||
lyxerr << lyx::to_utf8(_(" Save seems successful. Phew.")) << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
lyxerr << _(" Save failed! Trying...") << endl;
|
||||
lyxerr << lyx::to_utf8(_(" Save failed! Trying...")) << endl;
|
||||
|
||||
// 3) In "/tmp" directory.
|
||||
// MakeAbsPath to prepend the current
|
||||
@ -344,10 +344,10 @@ void BufferList::emergencyWrite(Buffer * buf)
|
||||
lyxerr << ' ' << s << endl;
|
||||
if (buf->writeFile(s)) {
|
||||
buf->markClean();
|
||||
lyxerr << _(" Save seems successful. Phew.") << endl;
|
||||
lyxerr << lyx::to_utf8(_(" Save seems successful. Phew.")) << endl;
|
||||
return;
|
||||
}
|
||||
lyxerr << _(" Save failed! Bummer. Document is lost.") << endl;
|
||||
lyxerr << lyx::to_utf8(_(" Save failed! Bummer. Document is lost.")) << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -418,20 +418,20 @@ string const BufferParams::readToken(LyXLex & lex, string const & token)
|
||||
pp = textclasslist.addTextClass(classname, filepath);
|
||||
if (pp.first) {
|
||||
textclass = pp.second;
|
||||
} else {
|
||||
} else {
|
||||
textclass = 0;
|
||||
return classname;
|
||||
}
|
||||
}
|
||||
}
|
||||
// FIXME: isTeXClassAvailable will try to load the layout file, but will
|
||||
// fail because of the lack of path info. Warnings will be given although
|
||||
// the layout file will be correctly loaded later.
|
||||
if (!getLyXTextClass().isTeXClassAvailable()) {
|
||||
string const msg =
|
||||
bformat(_("The document uses a missing "
|
||||
"TeX class \"%1$s\".\n"), classname);
|
||||
Alert::warning(_("Document class not available"),
|
||||
msg + _("LyX will not be able to produce output."));
|
||||
bformat(lyx::to_utf8(_("The document uses a missing "
|
||||
"TeX class \"%1$s\".\n")), classname);
|
||||
Alert::warning(lyx::to_utf8(_("Document class not available")),
|
||||
msg + lyx::to_utf8(_("LyX will not be able to produce output.")));
|
||||
}
|
||||
} else if (token == "\\begin_preamble") {
|
||||
readPreamble(lex);
|
||||
@ -815,7 +815,7 @@ bool BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
|
||||
// end of \documentclass defs
|
||||
|
||||
// font selection must be done before loading fontenc.sty
|
||||
string const fonts =
|
||||
string const fonts =
|
||||
loadFonts(features, fontsRoman, fontsSans,
|
||||
fontsTypewriter, fontsSC, fontsOSF,
|
||||
fontsSansScale, fontsTypewriterScale);
|
||||
@ -824,7 +824,7 @@ bool BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
|
||||
texrow.newline();
|
||||
}
|
||||
if (fontsDefaultFamily != "default")
|
||||
os << "\\renewcommand{\\familydefault}{\\"
|
||||
os << "\\renewcommand{\\familydefault}{\\"
|
||||
<< fontsDefaultFamily << "}\n";
|
||||
// this one is not per buffer
|
||||
if (lyxrc.fontenc != "default") {
|
||||
|
@ -300,7 +300,7 @@ void gotoInset(BufferView * bv, vector<InsetBase_code> const & codes,
|
||||
{
|
||||
LCursor tmpcur = bv->cursor();
|
||||
if (!findInset(tmpcur, codes, same_content)) {
|
||||
bv->cursor().message(_("No more insets"));
|
||||
bv->cursor().message(lyx::to_utf8(_("No more insets")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -315,10 +315,10 @@ bool Converters::convert(Buffer const * buffer,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Alert::error(_("Cannot convert file"),
|
||||
bformat(_("No information for converting %1$s "
|
||||
"format files to %2$s.\n"
|
||||
"Define a convertor in the preferences."),
|
||||
Alert::error(lyx::to_utf8(_("Cannot convert file")),
|
||||
bformat(lyx::to_utf8(_("No information for converting %1$s "
|
||||
"format files to %2$s.\n"
|
||||
"Define a convertor in the preferences.")),
|
||||
from_format, to_format));
|
||||
return false;
|
||||
}
|
||||
@ -395,7 +395,7 @@ bool Converters::convert(Buffer const * buffer,
|
||||
|
||||
lyxerr[Debug::FILES] << "Calling " << command << endl;
|
||||
if (buffer)
|
||||
buffer->message(_("Executing command: ")
|
||||
buffer->message(lyx::to_utf8(_("Executing command: "))
|
||||
+ command);
|
||||
|
||||
Systemcall::Starttype const type = (dummy)
|
||||
@ -435,13 +435,13 @@ bool Converters::convert(Buffer const * buffer,
|
||||
|
||||
if (res) {
|
||||
if (conv.to == "program") {
|
||||
Alert::error(_("Build errors"),
|
||||
_("There were errors during the build process."));
|
||||
Alert::error(lyx::to_utf8(_("Build errors")),
|
||||
lyx::to_utf8(_("There were errors during the build process.")));
|
||||
} else {
|
||||
// FIXME: this should go out of here. For example, here we cannot say if
|
||||
// it is a document (.lyx) or something else. Same goes for elsewhere.
|
||||
Alert::error(_("Cannot convert file"),
|
||||
bformat(_("An error occurred whilst running %1$s"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot convert file")),
|
||||
bformat(lyx::to_utf8(_("An error occurred whilst running %1$s")),
|
||||
command.substr(0, 50)));
|
||||
}
|
||||
return false;
|
||||
@ -464,8 +464,8 @@ bool Converters::convert(Buffer const * buffer,
|
||||
token_base, to_base);
|
||||
Mover const & mover = movers(conv.from);
|
||||
if (!mover.rename(from, to)) {
|
||||
Alert::error(_("Cannot convert file"),
|
||||
bformat(_("Could not move a temporary file from %1$s to %2$s."),
|
||||
Alert::error(lyx::to_utf8(_("Cannot convert file")),
|
||||
bformat(lyx::to_utf8(_("Could not move a temporary file from %1$s to %2$s.")),
|
||||
from, to));
|
||||
return false;
|
||||
}
|
||||
@ -503,10 +503,10 @@ bool Converters::move(string const & fmt,
|
||||
? mover.copy(from2, to2)
|
||||
: mover.rename(from2, to2);
|
||||
if (!moved && no_errors) {
|
||||
Alert::error(_("Cannot convert file"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot convert file")),
|
||||
bformat(copy ?
|
||||
_("Could not copy a temporary file from %1$s to %2$s.") :
|
||||
_("Could not move a temporary file from %1$s to %2$s."),
|
||||
lyx::to_utf8(_("Could not copy a temporary file from %1$s to %2$s.")) :
|
||||
lyx::to_utf8(_("Could not move a temporary file from %1$s to %2$s.")),
|
||||
from2, to2));
|
||||
no_errors = false;
|
||||
}
|
||||
@ -574,7 +574,7 @@ bool Converters::runLaTeX(Buffer const & buffer, string const & command,
|
||||
OutputParams const & runparams, ErrorList & errorList)
|
||||
{
|
||||
buffer.busy(true);
|
||||
buffer.message(_("Running LaTeX..."));
|
||||
buffer.message(lyx::to_utf8(_("Running LaTeX...")));
|
||||
|
||||
runparams.document_language = buffer.params().language->babel();
|
||||
|
||||
@ -592,13 +592,13 @@ bool Converters::runLaTeX(Buffer const & buffer, string const & command,
|
||||
// check return value from latex.run().
|
||||
if ((result & LaTeX::NO_LOGFILE)) {
|
||||
string const str =
|
||||
bformat(_("LaTeX did not run successfully. "
|
||||
"Additionally, LyX could not locate "
|
||||
"the LaTeX log %1$s."), name);
|
||||
Alert::error(_("LaTeX failed"), str);
|
||||
bformat(lyx::to_utf8(_("LaTeX did not run successfully. "
|
||||
"Additionally, LyX could not locate "
|
||||
"the LaTeX log %1$s.")), name);
|
||||
Alert::error(lyx::to_utf8(_("LaTeX failed")), str);
|
||||
} else if (result & LaTeX::NO_OUTPUT) {
|
||||
Alert::warning(_("Output is empty"),
|
||||
_("An empty output file was generated."));
|
||||
Alert::warning(lyx::to_utf8(_("Output is empty")),
|
||||
lyx::to_utf8(_("An empty output file was generated.")));
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,9 +107,9 @@ void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level)
|
||||
if (errorTags[i].level != Debug::ANY
|
||||
&& errorTags[i].level != Debug::NONE
|
||||
&& errorTags[i].level & level) {
|
||||
// avoid _(...) re-entrance problem
|
||||
string const s = _(errorTags[i].desc);
|
||||
os << bformat(_("Debugging `%1$s' (%2$s)"),
|
||||
// avoid lyx::to_utf8(_(...)) re-entrance problem
|
||||
string const s = lyx::to_utf8(_(errorTags[i].desc));
|
||||
os << bformat(lyx::to_utf8(_("Debugging `%1$s' (%2$s)")),
|
||||
errorTags[i].name, s)
|
||||
<< '\n';
|
||||
}
|
||||
@ -123,7 +123,7 @@ void lyx_debug_trait::showTags(ostream & os)
|
||||
for (int i = 0; i < numErrorTags ; ++i)
|
||||
os << setw(7) << static_cast<unsigned int>(errorTags[i].level)
|
||||
<< setw(10) << errorTags[i].name
|
||||
<< " " << _(errorTags[i].desc) << '\n';
|
||||
<< " " << lyx::to_utf8(_(errorTags[i].desc)) << '\n';
|
||||
os.flush();
|
||||
}
|
||||
|
||||
|
@ -74,13 +74,13 @@ vector<string> const Backends(Buffer const & buffer)
|
||||
int checkOverwrite(string const & filename)
|
||||
{
|
||||
if (fs::exists(filename)) {
|
||||
string text = bformat(_("The file %1$s already exists.\n\n"
|
||||
"Do you want to over-write that file?"),
|
||||
string text = bformat(lyx::to_utf8(_("The file %1$s already exists.\n\n"
|
||||
"Do you want to over-write that file?")),
|
||||
makeDisplayPath(filename));
|
||||
return Alert::prompt(_("Over-write file?"),
|
||||
return Alert::prompt(lyx::to_utf8(_("Over-write file?")),
|
||||
text, 0, 2,
|
||||
_("&Over-write"), _("Over-write &all"),
|
||||
_("&Cancel export"));
|
||||
lyx::to_utf8(_("&Over-write")), lyx::to_utf8(_("Over-write &all")),
|
||||
lyx::to_utf8(_("&Cancel export")));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -129,8 +129,8 @@ CopyStatus copyFile(string const & format,
|
||||
|
||||
Mover const & mover = movers(format);
|
||||
if (!mover.copy(sourceFile, destFile, latexFile))
|
||||
Alert::error(_("Couldn't copy file"),
|
||||
bformat(_("Copying %1$s to %2$s failed."),
|
||||
Alert::error(lyx::to_utf8(_("Couldn't copy file")),
|
||||
bformat(lyx::to_utf8(_("Copying %1$s to %2$s failed.")),
|
||||
makeDisplayPath(sourceFile),
|
||||
makeDisplayPath(destFile)));
|
||||
|
||||
@ -168,8 +168,8 @@ bool Exporter::Export(Buffer * buffer, string const & format,
|
||||
}
|
||||
}
|
||||
if (backend_format.empty()) {
|
||||
Alert::error(_("Couldn't export file"),
|
||||
bformat(_("No information for exporting the format %1$s."),
|
||||
Alert::error(lyx::to_utf8(_("Couldn't export file")),
|
||||
bformat(lyx::to_utf8(_("No information for exporting the format %1$s.")),
|
||||
formats.prettyName(format)));
|
||||
return false;
|
||||
}
|
||||
@ -202,8 +202,8 @@ bool Exporter::Export(Buffer * buffer, string const & format,
|
||||
buffer->makeLaTeXFile(filename, string(), runparams);
|
||||
} else if (!lyxrc.tex_allows_spaces
|
||||
&& contains(buffer->filePath(), ' ')) {
|
||||
Alert::error(_("File name error"),
|
||||
_("The directory path to the document cannot contain spaces."));
|
||||
Alert::error(lyx::to_utf8(_("File name error")),
|
||||
lyx::to_utf8(_("The directory path to the document cannot contain spaces.")));
|
||||
return false;
|
||||
} else {
|
||||
runparams.nice = false;
|
||||
@ -238,19 +238,19 @@ bool Exporter::Export(Buffer * buffer, string const & format,
|
||||
it->exportName, status == FORCE);
|
||||
}
|
||||
if (status == CANCEL) {
|
||||
buffer->message(_("Document export cancelled."));
|
||||
buffer->message(lyx::to_utf8(_("Document export cancelled.")));
|
||||
} else if (fs::exists(tmp_result_file)) {
|
||||
// Finally copy the main file
|
||||
status = copyFile(format, tmp_result_file,
|
||||
result_file, result_file,
|
||||
status == FORCE);
|
||||
buffer->message(bformat(_("Document exported as %1$s "
|
||||
"to file `%2$s'"),
|
||||
buffer->message(bformat(lyx::to_utf8(_("Document exported as %1$s "
|
||||
"to file `%2$s'")),
|
||||
formats.prettyName(format),
|
||||
makeDisplayPath(result_file)));
|
||||
} else {
|
||||
// This must be a dummy converter like fax (bug 1888)
|
||||
buffer->message(bformat(_("Document exported as %1$s"),
|
||||
buffer->message(bformat(lyx::to_utf8(_("Document exported as %1$s")),
|
||||
formats.prettyName(format)));
|
||||
}
|
||||
}
|
||||
|
44
src/format.C
44
src/format.C
@ -93,7 +93,7 @@ bool operator<(Format const & a, Format const & b)
|
||||
|
||||
Format::Format(string const & n, string const & e, string const & p,
|
||||
string const & s, string const & v, string const & ed,
|
||||
bool d)
|
||||
bool d)
|
||||
: name_(n), extension_(e), prettyname_(p), shortcut_(s), viewer_(v),
|
||||
editor_(ed), document_(d)
|
||||
{}
|
||||
@ -162,7 +162,7 @@ string Formats::getFormatFromFile(string const & filename) const
|
||||
|
||||
namespace {
|
||||
|
||||
string fixCommand(string const & cmd, string const & ext,
|
||||
string fixCommand(string const & cmd, string const & ext,
|
||||
os::auto_open_mode mode)
|
||||
{
|
||||
// configure.py says we do not want a viewer/editor
|
||||
@ -223,10 +223,10 @@ void Formats::add(string const & name, string const & extension,
|
||||
if (it == formatlist.end())
|
||||
formatlist.push_back(Format(name, extension, prettyname,
|
||||
shortcut, viewer, editor,
|
||||
document));
|
||||
document));
|
||||
else
|
||||
*it = Format(name, extension, prettyname, shortcut, viewer,
|
||||
editor, document);
|
||||
editor, document);
|
||||
}
|
||||
|
||||
|
||||
@ -262,8 +262,8 @@ bool Formats::view(Buffer const & buffer, string const & filename,
|
||||
{
|
||||
BOOST_ASSERT(absolutePath(filename));
|
||||
if (filename.empty() || !fs::exists(filename)) {
|
||||
Alert::error(_("Cannot view file"),
|
||||
bformat(_("File does not exist: %1$s"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot view file")),
|
||||
bformat(lyx::to_utf8(_("File does not exist: %1$s")),
|
||||
filename));
|
||||
return false;
|
||||
}
|
||||
@ -275,8 +275,8 @@ bool Formats::view(Buffer const & buffer, string const & filename,
|
||||
if (!format || format->viewer().empty()) {
|
||||
// FIXME: I believe this is the wrong place to show alerts, it should be done
|
||||
// by the caller (this should be "utility" code)
|
||||
Alert::error(_("Cannot view file"),
|
||||
bformat(_("No information for viewing %1$s"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot view file")),
|
||||
bformat(lyx::to_utf8(_("No information for viewing %1$s")),
|
||||
prettyName(format_name)));
|
||||
return false;
|
||||
}
|
||||
@ -285,8 +285,8 @@ bool Formats::view(Buffer const & buffer, string const & filename,
|
||||
if (os::autoOpenFile(filename, os::VIEW))
|
||||
return true;
|
||||
else {
|
||||
Alert::error(_("Cannot view file"),
|
||||
bformat(_("Auto-view file %1$s failed"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot view file")),
|
||||
bformat(lyx::to_utf8(_("Auto-view file %1$s failed")),
|
||||
filename));
|
||||
return false;
|
||||
}
|
||||
@ -312,14 +312,14 @@ bool Formats::view(Buffer const & buffer, string const & filename,
|
||||
command = subst(command, token_path, quoteName(onlyPath(filename)));
|
||||
command = subst(command, token_socket, quoteName(lyxsocket->address()));
|
||||
lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
|
||||
buffer.message(_("Executing command: ") + command);
|
||||
buffer.message(lyx::to_utf8(_("Executing command: ")) + command);
|
||||
|
||||
Systemcall one;
|
||||
int const res = one.startscript(Systemcall::DontWait, command);
|
||||
|
||||
if (res) {
|
||||
Alert::error(_("Cannot view file"),
|
||||
bformat(_("An error occurred whilst running %1$s"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot view file")),
|
||||
bformat(lyx::to_utf8(_("An error occurred whilst running %1$s")),
|
||||
makeDisplayPath(command, 50)));
|
||||
return false;
|
||||
}
|
||||
@ -332,8 +332,8 @@ bool Formats::edit(Buffer const & buffer, string const & filename,
|
||||
{
|
||||
BOOST_ASSERT(absolutePath(filename));
|
||||
if (filename.empty() || !fs::exists(filename)) {
|
||||
Alert::error(_("Cannot edit file"),
|
||||
bformat(_("File does not exist: %1$s"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot edit file")),
|
||||
bformat(lyx::to_utf8(_("File does not exist: %1$s")),
|
||||
filename));
|
||||
return false;
|
||||
}
|
||||
@ -345,8 +345,8 @@ bool Formats::edit(Buffer const & buffer, string const & filename,
|
||||
if (!format || format->editor().empty()) {
|
||||
// FIXME: I believe this is the wrong place to show alerts, it should
|
||||
// be done by the caller (this should be "utility" code)
|
||||
Alert::error(_("Cannot edit file"),
|
||||
bformat(_("No information for editing %1$s"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot edit file")),
|
||||
bformat(lyx::to_utf8(_("No information for editing %1$s")),
|
||||
prettyName(format_name)));
|
||||
return false;
|
||||
}
|
||||
@ -355,8 +355,8 @@ bool Formats::edit(Buffer const & buffer, string const & filename,
|
||||
if (os::autoOpenFile(filename, os::EDIT))
|
||||
return true;
|
||||
else {
|
||||
Alert::error(_("Cannot edit file"),
|
||||
bformat(_("Auto-edit file %1$s failed"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot edit file")),
|
||||
bformat(lyx::to_utf8(_("Auto-edit file %1$s failed")),
|
||||
filename));
|
||||
return false;
|
||||
}
|
||||
@ -371,14 +371,14 @@ bool Formats::edit(Buffer const & buffer, string const & filename,
|
||||
command = subst(command, token_path, quoteName(onlyPath(filename)));
|
||||
command = subst(command, token_socket, quoteName(lyxsocket->address()));
|
||||
lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
|
||||
buffer.message(_("Executing command: ") + command);
|
||||
buffer.message(lyx::to_utf8(_("Executing command: ")) + command);
|
||||
|
||||
Systemcall one;
|
||||
int const res = one.startscript(Systemcall::DontWait, command);
|
||||
|
||||
if (res) {
|
||||
Alert::error(_("Cannot edit file"),
|
||||
bformat(_("An error occurred whilst running %1$s"),
|
||||
Alert::error(lyx::to_utf8(_("Cannot edit file")),
|
||||
bformat(lyx::to_utf8(_("An error occurred whilst running %1$s")),
|
||||
makeDisplayPath(command, 50)));
|
||||
return false;
|
||||
}
|
||||
|
@ -323,11 +323,11 @@ void LyXView::updateWindowTitle()
|
||||
maximize_title += ": " + makeDisplayPath(cur_title, 30);
|
||||
minimize_title = onlyFilename(cur_title);
|
||||
if (!buffer()->isClean()) {
|
||||
maximize_title += _(" (changed)");
|
||||
maximize_title += lyx::to_utf8(_(" (changed)"));
|
||||
minimize_title += '*';
|
||||
}
|
||||
if (buffer()->isReadonly())
|
||||
maximize_title += _(" (read only)");
|
||||
maximize_title += lyx::to_utf8(_(" (read only)"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,8 +165,8 @@ void layoutSelected(LyXView & lv, string const & name)
|
||||
LyXTextClass::const_iterator const end = tc.end();
|
||||
for (; it != end; ++it) {
|
||||
string const & itname = (*it)->name();
|
||||
// Yes, the _() is correct
|
||||
if (_(itname) == name) {
|
||||
// Yes, the lyx::to_utf8(_()) is correct
|
||||
if (lyx::to_utf8(_(itname)) == name) {
|
||||
FuncRequest const func(LFUN_LAYOUT, itname,
|
||||
FuncRequest::UI);
|
||||
lv.getLyXFunc().dispatch(func);
|
||||
|
@ -273,7 +273,7 @@ void WorkArea::dispatch(FuncRequest const & cmd0)
|
||||
void WorkArea::resizeBufferView()
|
||||
{
|
||||
lyx_view_.busy(true);
|
||||
lyx_view_.message(_("Formatting document..."));
|
||||
lyx_view_.message(lyx::to_utf8(_("Formatting document...")));
|
||||
buffer_view_->workAreaResize(width(), height());
|
||||
lyx_view_.updateLayoutChoice();
|
||||
redraw();
|
||||
|
@ -54,28 +54,28 @@ void ControlAboutlyx::getCredits(ostream & ss) const
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
ss << _("ERROR: LyX wasn't able to read CREDITS file\n")
|
||||
<< _("Please install correctly to estimate the great\n")
|
||||
<< _("amount of work other people have done for the LyX project.");
|
||||
ss << lyx::to_utf8(_("ERROR: LyX wasn't able to read CREDITS file\n"))
|
||||
<< lyx::to_utf8(_("Please install correctly to estimate the great\n"))
|
||||
<< lyx::to_utf8(_("amount of work other people have done for the LyX project."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string const ControlAboutlyx::getCopyright() const
|
||||
{
|
||||
return _("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2001 LyX Team");
|
||||
return lyx::to_utf8(_("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2001 LyX Team"));
|
||||
}
|
||||
|
||||
|
||||
string const ControlAboutlyx::getLicense() const
|
||||
{
|
||||
return _("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.");
|
||||
return lyx::to_utf8(_("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."));
|
||||
}
|
||||
|
||||
|
||||
string const ControlAboutlyx::getDisclaimer() const
|
||||
{
|
||||
return _("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.\nSee the GNU General Public License for more details.\nYou 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.");
|
||||
return lyx::to_utf8(_("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.\nSee the GNU General Public License for more details.\nYou 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."));
|
||||
}
|
||||
|
||||
|
||||
@ -83,15 +83,15 @@ string const ControlAboutlyx::getVersion() const
|
||||
{
|
||||
ostringstream ss;
|
||||
|
||||
ss << _("LyX Version ")
|
||||
ss << lyx::to_utf8(_("LyX Version "))
|
||||
<< lyx_version
|
||||
<< " ("
|
||||
<< lyx_release_date
|
||||
<< ")\n"
|
||||
<< _("Library directory: ")
|
||||
<< lyx::to_utf8(_("Library directory: "))
|
||||
<< makeDisplayPath(package().system_support())
|
||||
<< "\n"
|
||||
<< _("User directory: ")
|
||||
<< lyx::to_utf8(_("User directory: "))
|
||||
<< makeDisplayPath(package().user_support());
|
||||
|
||||
return ss.str();
|
||||
|
@ -50,22 +50,24 @@ ControlBibtex::ControlBibtex(Dialog & d)
|
||||
|
||||
string const ControlBibtex::browseBib(string const & in_name) const
|
||||
{
|
||||
pair<string, string> dir1(_("Documents|#o#O"),
|
||||
// FIXME UNICODE
|
||||
pair<string, string> dir1(lyx::to_utf8(_("Documents|#o#O")),
|
||||
string(lyxrc.document_path));
|
||||
FileFilterList const filter(_("BibTeX Databases (*.bib)"));
|
||||
FileFilterList const filter(lyx::to_utf8(_("BibTeX Databases (*.bib)")));
|
||||
return browseRelFile(in_name, kernel().bufferFilepath(),
|
||||
_("Select a BibTeX database to add"),
|
||||
lyx::to_utf8(_("Select a BibTeX database to add")),
|
||||
filter, false, dir1);
|
||||
}
|
||||
|
||||
|
||||
string const ControlBibtex::browseBst(string const & in_name) const
|
||||
{
|
||||
pair<string, string> dir1(_("Documents|#o#O"),
|
||||
// FIXME UNICODE
|
||||
pair<string, string> dir1(lyx::to_utf8(_("Documents|#o#O")),
|
||||
string(lyxrc.document_path));
|
||||
FileFilterList const filter(_("BibTeX Styles (*.bst)"));
|
||||
FileFilterList const filter(lyx::to_utf8(_("BibTeX Styles (*.bst)")));
|
||||
return browseRelFile(in_name, kernel().bufferFilepath(),
|
||||
_("Select a BibTeX style"), filter, false, dir1);
|
||||
lyx::to_utf8(_("Select a BibTeX style")), filter, false, dir1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,12 +59,13 @@ void box_gui_tokens(vector<string> & ids, vector<string> & gui_names)
|
||||
size_t const ids_size = sizeof(ids_) / sizeof(char *);
|
||||
ids = vector<string>(ids_, ids_ + ids_size);
|
||||
gui_names.clear();
|
||||
gui_names.push_back(_("No frame drawn"));
|
||||
gui_names.push_back(_("Rectangular box"));
|
||||
gui_names.push_back(_("Oval box, thin"));
|
||||
gui_names.push_back(_("Oval box, thick"));
|
||||
gui_names.push_back(_("Shadow box"));
|
||||
gui_names.push_back(_("Double box"));
|
||||
// FIXME UNICODE
|
||||
gui_names.push_back(lyx::to_utf8(_("No frame drawn")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Rectangular box")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Oval box, thin")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Oval box, thick")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Shadow box")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Double box")));
|
||||
}
|
||||
|
||||
void box_gui_tokens_special_length(vector<string> & ids,
|
||||
@ -76,11 +77,12 @@ void box_gui_tokens_special_length(vector<string> & ids,
|
||||
size_t const ids_size = sizeof(ids_) / sizeof(char *);
|
||||
ids = vector<string>(ids_, ids_ + ids_size);
|
||||
gui_names.clear();
|
||||
gui_names.push_back(_("None"));
|
||||
gui_names.push_back(_("Height"));
|
||||
gui_names.push_back(_("Depth"));
|
||||
gui_names.push_back(_("Total Height"));
|
||||
gui_names.push_back(_("Width"));
|
||||
// FIXME UNICODE
|
||||
gui_names.push_back(lyx::to_utf8(_("None")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Height")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Depth")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Total Height")));
|
||||
gui_names.push_back(lyx::to_utf8(_("Width")));
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -47,8 +47,10 @@ ErrorList const & ControlErrorList::errorList() const
|
||||
bool ControlErrorList::initialiseParams(string const & error_type)
|
||||
{
|
||||
Buffer * buf = kernel().bufferview()->buffer();
|
||||
string const title = bformat(_("%1$s Errors (%2$s)"),
|
||||
_(error_type), buf->fileName());
|
||||
// FIXME UNICODE
|
||||
string const title = bformat(lyx::to_utf8(_("%1$s Errors (%2$s)")),
|
||||
lyx::to_utf8(_(error_type)),
|
||||
buf->fileName());
|
||||
errorlist_ = buf->errorList(error_type);
|
||||
name_ = title;
|
||||
return true;
|
||||
|
@ -159,7 +159,7 @@ ControlExternal::getTemplateFilters(string const & template_name) const
|
||||
string const ControlExternal::browse(string const & input,
|
||||
string const & template_name) const
|
||||
{
|
||||
string const title = _("Select external file");
|
||||
string const title = lyx::to_utf8(_("Select external file"));
|
||||
|
||||
string const bufpath = kernel().bufferFilepath();
|
||||
FileFilterList const filter =
|
||||
@ -247,7 +247,7 @@ vector<RotationDataType> const & all_origins()
|
||||
|
||||
string const origin_gui_str(size_type i)
|
||||
{
|
||||
return _(origin_gui_strs[i]);
|
||||
return lyx::to_utf8(_(origin_gui_strs[i]));
|
||||
}
|
||||
|
||||
} // namespace external
|
||||
|
@ -83,15 +83,16 @@ void ControlGraphics::dispatchParams()
|
||||
|
||||
string const ControlGraphics::browse(string const & in_name) const
|
||||
{
|
||||
string const title = _("Select graphics file");
|
||||
// FIXME UNICODE
|
||||
string const title = lyx::to_utf8(_("Select graphics file"));
|
||||
|
||||
// Does user clipart directory exist?
|
||||
string clipdir = addName(package().user_support(), "clipart");
|
||||
if (!(fs::exists(clipdir) && fs::is_directory(clipdir)))
|
||||
// No - bail out to system clipart directory
|
||||
clipdir = addName(package().system_support(), "clipart");
|
||||
pair<string, string> dir1(_("Clipart|#C#c"), clipdir);
|
||||
pair<string, string> dir2(_("Documents|#o#O"), string(lyxrc.document_path));
|
||||
pair<string, string> dir1(lyx::to_utf8(_("Clipart|#C#c")), clipdir);
|
||||
pair<string, string> dir2(lyx::to_utf8(_("Documents|#o#O")), string(lyxrc.document_path));
|
||||
// Show the file browser dialog
|
||||
return browseRelFile(in_name, kernel().bufferFilepath(),
|
||||
title,
|
||||
@ -190,7 +191,8 @@ vector<RotationOriginPair> getRotationOriginData()
|
||||
|
||||
data.resize(rorigin_size);
|
||||
for (size_type i = 0; i < rorigin_size; ++i) {
|
||||
data[i] = make_pair(_(rorigin_gui_strs[i]),
|
||||
// FIXME UNICODE
|
||||
data[i] = make_pair(lyx::to_utf8(_(rorigin_gui_strs[i])),
|
||||
rorigin_lyx_strs[i]);
|
||||
}
|
||||
|
||||
|
@ -74,17 +74,19 @@ void ControlInclude::setParams(InsetCommandParams const & params)
|
||||
|
||||
string const ControlInclude::browse(string const & in_name, Type in_type) const
|
||||
{
|
||||
string const title = _("Select document to include");
|
||||
// FIXME UNICODE
|
||||
string const title = lyx::to_utf8(_("Select document to include"));
|
||||
|
||||
// input TeX, verbatim, or LyX file ?
|
||||
FileFilterList filters;
|
||||
switch (in_type) {
|
||||
case INCLUDE:
|
||||
case INPUT:
|
||||
filters = FileFilterList(_("LaTeX/LyX Documents (*.tex *.lyx)"));
|
||||
break;
|
||||
// FIXME UNICODE
|
||||
filters = FileFilterList(lyx::to_utf8(_("LaTeX/LyX Documents (*.tex *.lyx)")));
|
||||
break;
|
||||
case VERBATIM:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
pair<string, string> dir1(N_("Documents|#o#O"),
|
||||
|
@ -75,16 +75,16 @@ string const ControlLog::title() const
|
||||
string t;
|
||||
switch (type_) {
|
||||
case LatexLog:
|
||||
t = _("LaTeX Log");
|
||||
t = lyx::to_utf8(_("LaTeX Log"));
|
||||
break;
|
||||
case LiterateLog:
|
||||
t = _("Literate Programming Build Log");
|
||||
t = lyx::to_utf8(_("Literate Programming Build Log"));
|
||||
break;
|
||||
case Lyx2lyxLog:
|
||||
t = _("lyx2lyx Error Log");
|
||||
t = lyx::to_utf8(_("lyx2lyx Error Log"));
|
||||
break;
|
||||
case VCLog:
|
||||
t = _("Version Control Log");
|
||||
t = lyx::to_utf8(_("Version Control Log"));
|
||||
break;
|
||||
}
|
||||
return t;
|
||||
@ -107,16 +107,16 @@ void ControlLog::getContents(std::ostream & ss) const
|
||||
|
||||
switch (type_) {
|
||||
case LatexLog:
|
||||
ss << _("No LaTeX log file found.");
|
||||
ss << lyx::to_utf8(_("No LaTeX log file found."));
|
||||
break;
|
||||
case LiterateLog:
|
||||
ss << _("No literate programming build log file found.");
|
||||
ss << lyx::to_utf8(_("No literate programming build log file found."));
|
||||
break;
|
||||
case Lyx2lyxLog:
|
||||
ss << _("No lyx2lyx error log file found.");
|
||||
ss << lyx::to_utf8(_("No lyx2lyx error log file found."));
|
||||
break;
|
||||
case VCLog:
|
||||
ss << _("No version control log file found.");
|
||||
ss << lyx::to_utf8(_("No version control log file found."));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -109,29 +109,37 @@ void ControlPrefs::updateScreenFonts()
|
||||
|
||||
string const ControlPrefs::browsebind(string const & file) const
|
||||
{
|
||||
return browseLibFile("bind", file, "bind", _("Choose bind file"),
|
||||
FileFilterList(_("LyX bind files (*.bind)")));
|
||||
// FIXME UNICODE
|
||||
return browseLibFile("bind", file, "bind",
|
||||
lyx::to_utf8(_("Choose bind file")),
|
||||
FileFilterList(lyx::to_utf8(_("LyX bind files (*.bind)"))));
|
||||
}
|
||||
|
||||
|
||||
string const ControlPrefs::browseUI(string const & file) const
|
||||
{
|
||||
return browseLibFile("ui", file, "ui", _("Choose UI file"),
|
||||
FileFilterList(_("LyX UI files (*.ui)")));
|
||||
// FIXME UNICODE
|
||||
return browseLibFile("ui", file, "ui",
|
||||
lyx::to_utf8(_("Choose UI file")),
|
||||
FileFilterList(lyx::to_utf8(_("LyX UI files (*.ui)"))));
|
||||
}
|
||||
|
||||
|
||||
string const ControlPrefs::browsekbmap(string const & file) const
|
||||
{
|
||||
return browseLibFile("kbd", file, "kmap", _("Choose keyboard map"),
|
||||
FileFilterList(_("LyX keyboard maps (*.kmap)")));
|
||||
// FIXME UNICODE
|
||||
return browseLibFile("kbd", file, "kmap",
|
||||
lyx::to_utf8(_("Choose keyboard map")),
|
||||
FileFilterList(lyx::to_utf8(_("LyX keyboard maps (*.kmap)"))));
|
||||
}
|
||||
|
||||
|
||||
string const ControlPrefs::browsedict(string const & file) const
|
||||
{
|
||||
return browseFile(file, _("Choose personal dictionary"),
|
||||
FileFilterList(_("*.ispell")));
|
||||
// FIXME UNICODE
|
||||
return browseFile(file,
|
||||
lyx::to_utf8(_("Choose personal dictionary")),
|
||||
FileFilterList(lyx::to_utf8(_("*.ispell"))));
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,9 +69,10 @@ PrinterParams & ControlPrint::params() const
|
||||
|
||||
string const ControlPrint::browse(string const & in_name) const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
return browseRelFile(in_name, kernel().buffer().filePath(),
|
||||
_("Print to file"),
|
||||
FileFilterList(_("PostScript files (*.ps)")),
|
||||
lyx::to_utf8(_("Print to file")),
|
||||
FileFilterList(lyx::to_utf8(_("PostScript files (*.ps)"))),
|
||||
true);
|
||||
}
|
||||
|
||||
|
@ -108,8 +108,9 @@ bool ControlSpellchecker::initialiseParams(std::string const &)
|
||||
bool const success = speller_->error().empty();
|
||||
|
||||
if (!success) {
|
||||
Alert::error(_("Spellchecker error"),
|
||||
_("The spellchecker could not be started\n")
|
||||
// FIXME UNICODE
|
||||
Alert::error(lyx::to_utf8(_("Spellchecker error")),
|
||||
lyx::to_utf8(_("The spellchecker could not be started\n"))
|
||||
+ speller_->error());
|
||||
speller_.reset(0);
|
||||
}
|
||||
@ -264,16 +265,17 @@ bool ControlSpellchecker::checkAlive()
|
||||
return true;
|
||||
|
||||
string message;
|
||||
// FIXME UNICODE
|
||||
if (speller_->error().empty())
|
||||
message = _("The spellchecker has died for some reason.\n"
|
||||
"Maybe it has been killed.");
|
||||
message = lyx::to_utf8(_("The spellchecker has died for some reason.\n"
|
||||
"Maybe it has been killed."));
|
||||
else
|
||||
message = _("The spellchecker has failed.\n")
|
||||
message = lyx::to_utf8(_("The spellchecker has failed.\n"))
|
||||
+ speller_->error();
|
||||
|
||||
dialog().CancelButton();
|
||||
|
||||
Alert::error(_("The spellchecker has failed"), message);
|
||||
Alert::error(lyx::to_utf8(_("The spellchecker has failed")), message);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -286,13 +288,14 @@ void ControlSpellchecker::showSummary()
|
||||
}
|
||||
|
||||
string message;
|
||||
// FIXME UNICODE
|
||||
if (count_ != 1)
|
||||
message = bformat(_("%1$d words checked."), count_);
|
||||
message = bformat(lyx::to_utf8(_("%1$d words checked.")), count_);
|
||||
else
|
||||
message = _("One word checked.");
|
||||
message = lyx::to_utf8(_("One word checked."));
|
||||
|
||||
dialog().CancelButton();
|
||||
Alert::information(_("Spelling check completed"), message);
|
||||
Alert::information(lyx::to_utf8(_("Spelling check completed")), message);
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,9 +88,9 @@ toc::TocIterator const ControlToc::getCurrentTocItem(
|
||||
string const ControlToc::getGuiName(string const & type) const
|
||||
{
|
||||
if (type == "TOC")
|
||||
return _("Table of Contents");
|
||||
return lyx::to_utf8(_("Table of Contents"));
|
||||
else
|
||||
return _(toc::getGuiName(type, kernel().buffer()));
|
||||
return lyx::to_utf8(_(toc::getGuiName(type, kernel().buffer())));
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,7 +81,7 @@ string const ControlViewSource::title() const
|
||||
default:
|
||||
BOOST_ASSERT(false);
|
||||
}
|
||||
return _(source_type + " Source");
|
||||
return lyx::to_utf8(_(source_type + " Source"));
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -219,11 +219,13 @@ string const getAbbreviatedAuthor(InfoMap const & map, string const & key)
|
||||
return author;
|
||||
|
||||
if (authors.size() == 2)
|
||||
return bformat(_("%1$s and %2$s"),
|
||||
// FIXME UNICODE
|
||||
return bformat(lyx::to_utf8(_("%1$s and %2$s")),
|
||||
familyName(authors[0]), familyName(authors[1]));
|
||||
|
||||
if (authors.size() > 2)
|
||||
return bformat(_("%1$s et al."), familyName(authors[0]));
|
||||
// FIXME UNICODE
|
||||
return bformat(lyx::to_utf8(_("%1$s et al.")), familyName(authors[0]));
|
||||
|
||||
return familyName(authors[0]);
|
||||
}
|
||||
@ -260,7 +262,7 @@ string const getYear(InfoMap const & map, string const & key)
|
||||
|
||||
string year = parseBibTeX(data, "year");
|
||||
if (year.empty())
|
||||
year = _("No year");
|
||||
year = lyx::to_utf8(_("No year"));
|
||||
|
||||
return year;
|
||||
}
|
||||
@ -797,7 +799,7 @@ getAuthorYearStrings(string const & key,
|
||||
case CITE:
|
||||
// jurabib only: Author/Annotator
|
||||
// (i.e. the "before" field, 2nd opt arg)
|
||||
str = author + "/<" + _("before") + '>';
|
||||
str = author + "/<" + lyx::to_utf8(_("before")) + '>';
|
||||
break;
|
||||
|
||||
case CITET:
|
||||
|
@ -26,23 +26,23 @@ vector<FamilyPair> const getFamilyData()
|
||||
|
||||
FamilyPair pr;
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.first = lyx::to_utf8(_("No change"));
|
||||
pr.second = LyXFont::IGNORE_FAMILY;
|
||||
family[0] = pr;
|
||||
|
||||
pr.first = _("Roman");
|
||||
pr.first = lyx::to_utf8(_("Roman"));
|
||||
pr.second = LyXFont::ROMAN_FAMILY;
|
||||
family[1] = pr;
|
||||
|
||||
pr.first = _("Sans Serif");
|
||||
pr.first = lyx::to_utf8(_("Sans Serif"));
|
||||
pr.second = LyXFont::SANS_FAMILY;
|
||||
family[2] = pr;
|
||||
|
||||
pr.first = _("Typewriter");
|
||||
pr.first = lyx::to_utf8(_("Typewriter"));
|
||||
pr.second = LyXFont::TYPEWRITER_FAMILY;
|
||||
family[3] = pr;
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.first = lyx::to_utf8(_("Reset"));
|
||||
pr.second = LyXFont::INHERIT_FAMILY;
|
||||
family[4] = pr;
|
||||
|
||||
@ -56,19 +56,19 @@ vector<SeriesPair> const getSeriesData()
|
||||
|
||||
SeriesPair pr;
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.first = lyx::to_utf8(_("No change"));
|
||||
pr.second = LyXFont::IGNORE_SERIES;
|
||||
series[0] = pr;
|
||||
|
||||
pr.first = _("Medium");
|
||||
pr.first = lyx::to_utf8(_("Medium"));
|
||||
pr.second = LyXFont::MEDIUM_SERIES;
|
||||
series[1] = pr;
|
||||
|
||||
pr.first = _("Bold");
|
||||
pr.first = lyx::to_utf8(_("Bold"));
|
||||
pr.second = LyXFont::BOLD_SERIES;
|
||||
series[2] = pr;
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.first = lyx::to_utf8(_("Reset"));
|
||||
pr.second = LyXFont::INHERIT_SERIES;
|
||||
series[3] = pr;
|
||||
|
||||
@ -82,27 +82,27 @@ vector<ShapePair> const getShapeData()
|
||||
|
||||
ShapePair pr;
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.first = lyx::to_utf8(_("No change"));
|
||||
pr.second = LyXFont::IGNORE_SHAPE;
|
||||
shape[0] = pr;
|
||||
|
||||
pr.first = _("Upright");
|
||||
pr.first = lyx::to_utf8(_("Upright"));
|
||||
pr.second = LyXFont::UP_SHAPE;
|
||||
shape[1] = pr;
|
||||
|
||||
pr.first = _("Italic");
|
||||
pr.first = lyx::to_utf8(_("Italic"));
|
||||
pr.second = LyXFont::ITALIC_SHAPE;
|
||||
shape[2] = pr;
|
||||
|
||||
pr.first = _("Slanted");
|
||||
pr.first = lyx::to_utf8(_("Slanted"));
|
||||
pr.second = LyXFont::SLANTED_SHAPE;
|
||||
shape[3] = pr;
|
||||
|
||||
pr.first = _("Small Caps");
|
||||
pr.first = lyx::to_utf8(_("Small Caps"));
|
||||
pr.second = LyXFont::SMALLCAPS_SHAPE;
|
||||
shape[4] = pr;
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.first = lyx::to_utf8(_("Reset"));
|
||||
pr.second = LyXFont::INHERIT_SHAPE;
|
||||
shape[5] = pr;
|
||||
|
||||
@ -116,59 +116,59 @@ vector<SizePair> const getSizeData()
|
||||
|
||||
SizePair pr;
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.first = lyx::to_utf8(_("No change"));
|
||||
pr.second = LyXFont::IGNORE_SIZE;
|
||||
size[0] = pr;
|
||||
|
||||
pr.first = _("Tiny");
|
||||
pr.first = lyx::to_utf8(_("Tiny"));
|
||||
pr.second = LyXFont::SIZE_TINY;
|
||||
size[1] = pr;
|
||||
|
||||
pr.first = _("Smallest");
|
||||
pr.first = lyx::to_utf8(_("Smallest"));
|
||||
pr.second = LyXFont::SIZE_SCRIPT;
|
||||
size[2] = pr;
|
||||
|
||||
pr.first = _("Smaller");
|
||||
pr.first = lyx::to_utf8(_("Smaller"));
|
||||
pr.second = LyXFont::SIZE_FOOTNOTE;
|
||||
size[3] = pr;
|
||||
|
||||
pr.first = _("Small");
|
||||
pr.first = lyx::to_utf8(_("Small"));
|
||||
pr.second = LyXFont::SIZE_SMALL;
|
||||
size[4] = pr;
|
||||
|
||||
pr.first = _("Normal");
|
||||
pr.first = lyx::to_utf8(_("Normal"));
|
||||
pr.second = LyXFont::SIZE_NORMAL;
|
||||
size[5] = pr;
|
||||
|
||||
pr.first = _("Large");
|
||||
pr.first = lyx::to_utf8(_("Large"));
|
||||
pr.second = LyXFont::SIZE_LARGE;
|
||||
size[6] = pr;
|
||||
|
||||
pr.first = _("Larger");
|
||||
pr.first = lyx::to_utf8(_("Larger"));
|
||||
pr.second = LyXFont::SIZE_LARGER;
|
||||
size[7] = pr;
|
||||
|
||||
pr.first = _("Largest");
|
||||
pr.first = lyx::to_utf8(_("Largest"));
|
||||
pr.second = LyXFont::SIZE_LARGEST;
|
||||
size[8] = pr;
|
||||
|
||||
pr.first = _("Huge");
|
||||
pr.first = lyx::to_utf8(_("Huge"));
|
||||
pr.second = LyXFont::SIZE_HUGE;
|
||||
size[9] = pr;
|
||||
|
||||
pr.first = _("Huger");
|
||||
pr.first = lyx::to_utf8(_("Huger"));
|
||||
pr.second = LyXFont::SIZE_HUGER;
|
||||
size[10] = pr;
|
||||
|
||||
pr.first = _("Increase");
|
||||
pr.first = lyx::to_utf8(_("Increase"));
|
||||
pr.second = LyXFont::INCREASE_SIZE;
|
||||
size[11] = pr;
|
||||
|
||||
pr.first = _("Decrease");
|
||||
pr.first = lyx::to_utf8(_("Decrease"));
|
||||
pr.second = LyXFont::DECREASE_SIZE;
|
||||
size[12] = pr;
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.first = lyx::to_utf8(_("Reset"));
|
||||
pr.second = LyXFont::INHERIT_SIZE;
|
||||
size[13] = pr;
|
||||
|
||||
@ -182,23 +182,23 @@ vector<BarPair> const getBarData()
|
||||
|
||||
BarPair pr;
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.first = lyx::to_utf8(_("No change"));
|
||||
pr.second = IGNORE;
|
||||
bar[0] = pr;
|
||||
|
||||
pr.first = _("Emph");
|
||||
pr.first = lyx::to_utf8(_("Emph"));
|
||||
pr.second = EMPH_TOGGLE;
|
||||
bar[1] = pr;
|
||||
|
||||
pr.first = _("Underbar");
|
||||
pr.first = lyx::to_utf8(_("Underbar"));
|
||||
pr.second = UNDERBAR_TOGGLE;
|
||||
bar[2] = pr;
|
||||
|
||||
pr.first = _("Noun");
|
||||
pr.first = lyx::to_utf8(_("Noun"));
|
||||
pr.second = NOUN_TOGGLE;
|
||||
bar[3] = pr;
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.first = lyx::to_utf8(_("Reset"));
|
||||
pr.second = INHERIT;
|
||||
bar[4] = pr;
|
||||
|
||||
@ -212,47 +212,47 @@ vector<ColorPair> const getColorData()
|
||||
|
||||
ColorPair pr;
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.first = lyx::to_utf8(_("No change"));
|
||||
pr.second = LColor::ignore;
|
||||
color[0] = pr;
|
||||
|
||||
pr.first = _("No color");
|
||||
pr.first = lyx::to_utf8(_("No color"));
|
||||
pr.second = LColor::none;
|
||||
color[1] = pr;
|
||||
|
||||
pr.first = _("Black");
|
||||
pr.first = lyx::to_utf8(_("Black"));
|
||||
pr.second = LColor::black;
|
||||
color[2] = pr;
|
||||
|
||||
pr.first = _("White");
|
||||
pr.first = lyx::to_utf8(_("White"));
|
||||
pr.second = LColor::white;
|
||||
color[3] = pr;
|
||||
|
||||
pr.first = _("Red");
|
||||
pr.first = lyx::to_utf8(_("Red"));
|
||||
pr.second = LColor::red;
|
||||
color[4] = pr;
|
||||
|
||||
pr.first = _("Green");
|
||||
pr.first = lyx::to_utf8(_("Green"));
|
||||
pr.second = LColor::green;
|
||||
color[5] = pr;
|
||||
|
||||
pr.first = _("Blue");
|
||||
pr.first = lyx::to_utf8(_("Blue"));
|
||||
pr.second = LColor::blue;
|
||||
color[6] = pr;
|
||||
|
||||
pr.first = _("Cyan");
|
||||
pr.first = lyx::to_utf8(_("Cyan"));
|
||||
pr.second = LColor::cyan;
|
||||
color[7] = pr;
|
||||
|
||||
pr.first = _("Magenta");
|
||||
pr.first = lyx::to_utf8(_("Magenta"));
|
||||
pr.second = LColor::magenta;
|
||||
color[8] = pr;
|
||||
|
||||
pr.first = _("Yellow");
|
||||
pr.first = lyx::to_utf8(_("Yellow"));
|
||||
pr.second = LColor::yellow;
|
||||
color[9] = pr;
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.first = lyx::to_utf8(_("Reset"));
|
||||
pr.second = LColor::inherit;
|
||||
color[10] = pr;
|
||||
|
||||
|
@ -49,16 +49,16 @@ vector<LanguagePair> const getLanguageData(bool character_dlg)
|
||||
vector<LanguagePair> langs(size);
|
||||
|
||||
if (character_dlg) {
|
||||
langs[0].first = _("No change");
|
||||
langs[0].first = lyx::to_utf8(_("No change"));
|
||||
langs[0].second = "ignore";
|
||||
langs[1].first = _("Reset");
|
||||
langs[1].first = lyx::to_utf8(_("Reset"));
|
||||
langs[1].second = "reset";
|
||||
}
|
||||
|
||||
vector<string>::size_type i = character_dlg ? 2 : 0;
|
||||
for (Languages::const_iterator cit = languages.begin();
|
||||
cit != languages.end(); ++cit) {
|
||||
langs[i].first = _(cit->second.display());
|
||||
langs[i].first = lyx::to_utf8(_(cit->second.display()));
|
||||
langs[i].second = cit->second.lang();
|
||||
++i;
|
||||
}
|
||||
|
@ -97,10 +97,11 @@ string const browseLibFile(string const & dir,
|
||||
string const & title,
|
||||
FileFilterList const & filters)
|
||||
{
|
||||
pair<string,string> const dir1(_("System files|#S#s"),
|
||||
// FIXME UNICODE
|
||||
pair<string,string> const dir1(lyx::to_utf8(_("System files|#S#s")),
|
||||
addName(package().system_support(), dir));
|
||||
|
||||
pair<string,string> const dir2(_("User files|#U#u"),
|
||||
pair<string,string> const dir2(lyx::to_utf8(_("User files|#U#u")),
|
||||
addName(package().user_support(), dir));
|
||||
|
||||
string const result = browseFile(libFileSearch(dir, name, ext), title,
|
||||
|
@ -60,8 +60,9 @@ void rescanTexStyles()
|
||||
quoteName(command));
|
||||
if (status == 0)
|
||||
return;
|
||||
Alert::error(_("Could not update TeX information"),
|
||||
bformat(_("The script `%s' failed."), command));
|
||||
// FIXME UNICODE
|
||||
Alert::error(lyx::to_utf8(_("Could not update TeX information")),
|
||||
bformat(lyx::to_utf8(_("The script `%s' failed.")), command));
|
||||
}
|
||||
|
||||
|
||||
|
@ -261,14 +261,18 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
} else if (name == "index") {
|
||||
dialog->bc().view(new GBC(dialog->bc()));
|
||||
dialog->setController(new ControlCommand(*dialog, name));
|
||||
// FIXME UNICODE
|
||||
dialog->setView(new GText(*dialog,
|
||||
_("Index Entry"), _("Keyword:|#K")));
|
||||
lyx::to_utf8(_("Index Entry")),
|
||||
lyx::to_utf8(_("Keyword:|#K"))));
|
||||
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
||||
} else if (name == "label") {
|
||||
dialog->bc().view(new GBC(dialog->bc()));
|
||||
dialog->setController(new ControlCommand(*dialog, name));
|
||||
// FIXME UNICODE
|
||||
dialog->setView(new GText(*dialog,
|
||||
_("Label"), _("Label:|#L")));
|
||||
lyx::to_utf8(_("Label")),
|
||||
lyx::to_utf8(_("Label:|#L"))));
|
||||
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
||||
} else if (name == "log") {
|
||||
dialog->bc().view(new GBC(dialog->bc()));
|
||||
@ -284,7 +288,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathaccents") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("Maths Decorations & Accents"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("Maths Decorations & Accents")),
|
||||
// latex_deco, nr_latex_deco);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(12, 3, 4, deco1_width, deco1_height, deco1_bits, true));
|
||||
@ -298,7 +302,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "matharrows") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("Arrows"), latex_arrow, nr_latex_arrow);
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("Arrows"), latex_arrow, nr_latex_arrow));
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(20, 5, 4, arrow_width, arrow_height, arrow_bits, true));
|
||||
// bitmap->addBitmap(
|
||||
@ -313,7 +317,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathoperators") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("Binary Ops"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("Binary Ops")),
|
||||
// latex_bop, nr_latex_bop);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(31, 4, 8, bop_width, bop_height, bop_bits, true));
|
||||
@ -325,7 +329,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathrelations") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("Binary Relations"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("Binary Relations")),
|
||||
// latex_brel, nr_latex_brel);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(35, 4, 9, brel_width, brel_height, brel_bits, true));
|
||||
@ -337,7 +341,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathgreek") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("Greek"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("Greek")),
|
||||
// latex_greek, nr_latex_greek);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(11, 6, 2, Greek_width, Greek_height, Greek_bits, true));
|
||||
@ -351,7 +355,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathmisc") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("Misc"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("Misc")),
|
||||
// latex_misc, nr_latex_misc);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(29, 5, 6, misc_width, misc_height, misc_bits, true));
|
||||
@ -369,7 +373,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathdots") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("Dots"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("Dots")),
|
||||
// latex_dots, nr_latex_dots);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(4, 4, 1, dots_width, dots_height, dots_bits, true));
|
||||
@ -381,7 +385,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathbigoperators") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("Big Operators"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("Big Operators")),
|
||||
// latex_varsz, nr_latex_varsz);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(14, 3, 5, varsz_width, varsz_height, varsz_bits, true));
|
||||
@ -393,7 +397,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathamsmisc") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("AMS Misc"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("AMS Misc")),
|
||||
// latex_ams_misc, nr_latex_ams_misc);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(9, 5, 2, ams1_width, ams1_height, ams1_bits, true));
|
||||
@ -407,7 +411,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathamsarrows") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("AMS Arrows"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("AMS Arrows")),
|
||||
// latex_ams_arrows, nr_latex_ams_arrows);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(32, 3, 11, ams2_width, ams2_height, ams2_bits, true));
|
||||
@ -421,7 +425,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathamsrelations") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("AMS Relations"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("AMS Relations")),
|
||||
// latex_ams_rel, nr_latex_ams_rel);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(66, 6, 11, ams_rel_width, ams_rel_height, ams_rel_bits, true));
|
||||
@ -433,7 +437,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathamsnegatedrelations") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("AMS Negated Rel"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("AMS Negated Rel")),
|
||||
// latex_ams_nrel, nr_latex_ams_nrel);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(51, 6, 9, ams_nrel_width, ams_nrel_height, ams_nrel_bits, true));
|
||||
@ -445,7 +449,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
|
||||
} else if (name == "mathamsoperators") {
|
||||
// FormMathsBitmap * bitmap =
|
||||
// createFormBitmap(*dialog, _("AMS Operators"),
|
||||
// createFormBitmap(*dialog, lyx::to_utf8(_("AMS Operators")),
|
||||
// latex_ams_ops, nr_latex_ams_ops);
|
||||
// bitmap->addBitmap(
|
||||
// BitmapStore(23, 3, 8, ams_ops_width, ams_ops_height, ams_ops_bits, true));
|
||||
|
@ -196,8 +196,9 @@ void GAboutlyx::doBuild()
|
||||
button->hide();
|
||||
}
|
||||
|
||||
// FIXME UNICODE
|
||||
Gtk::Button &authorbutton = *Gtk::manage(
|
||||
new Gtk::Button(_("C_redits"), true));
|
||||
new Gtk::Button(lyx::to_utf8(_("C_redits")), true));
|
||||
authorbutton.set_image(*Gtk::manage(
|
||||
new Gtk::Image(Gtk::Stock::ABOUT, Gtk::ICON_SIZE_BUTTON)));
|
||||
dialog->get_action_area()->pack_end(authorbutton);
|
||||
|
@ -24,8 +24,8 @@ namespace frontend {
|
||||
class GBC : public GuiBC<Gtk::Button, Gtk::Widget> {
|
||||
public:
|
||||
GBC(ButtonController const & parent,
|
||||
std::string const & cancel = _("Cancel"),
|
||||
std::string const & close = _("Close"));
|
||||
std::string const & cancel = lyx::to_utf8(_("Cancel")),
|
||||
std::string const & close = lyx::to_utf8(_("Close")));
|
||||
private:
|
||||
/// Updates the button sensitivity (enabled/disabled)
|
||||
void setButtonEnabled(Gtk::Button *, bool enabled) const;
|
||||
|
@ -29,8 +29,9 @@ using std::string;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
// FIXME UNICODE
|
||||
GBibItem::GBibItem(Dialog & parent)
|
||||
: GViewCB<ControlCommand, GViewGladeB>(parent, _("Bibliography Entry Settings"), false)
|
||||
: GViewCB<ControlCommand, GViewGladeB>(parent, lyx::to_utf8(_("Bibliography Entry Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -69,8 +70,8 @@ void GBibItem::update()
|
||||
|
||||
void GBibItem::apply()
|
||||
{
|
||||
controller().params().setContents(keyentry_->get_text());
|
||||
controller().params().setOptions(labelentry_->get_text());
|
||||
controller().params().setContents(keyentry_->get_text());
|
||||
controller().params().setOptions(labelentry_->get_text());
|
||||
}
|
||||
|
||||
void GBibItem::changed()
|
||||
|
@ -37,8 +37,9 @@ using std::string;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
// FIXME UNICODE
|
||||
GBibtex::GBibtex(Dialog & parent)
|
||||
: GViewCB<ControlBibtex, GViewGladeB>(parent, _("BibTeX Bibliography"), false)
|
||||
: GViewCB<ControlBibtex, GViewGladeB>(parent, lyx::to_utf8(_("BibTeX Bibliography")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -38,8 +38,9 @@ namespace {
|
||||
string defaultUnit("cm");
|
||||
} // namespace anon
|
||||
|
||||
// FIXME UNICODE
|
||||
GBox::GBox(Dialog & parent)
|
||||
: GViewCB<ControlBox, GViewGladeB>(parent, _("Box Settings"), false)
|
||||
: GViewCB<ControlBox, GViewGladeB>(parent, lyx::to_utf8(_("Box Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -172,7 +173,7 @@ void GBox::update()
|
||||
|
||||
widthspin_->get_adjustment()->set_value(controller().params().width.value());
|
||||
unitsComboFromLength(widthunitscombo_, stringcol_,
|
||||
controller().params().width, defaultUnit);
|
||||
controller().params().width, defaultUnit);
|
||||
|
||||
string const special(controller().params().special);
|
||||
if (!special.empty() && special != "none") {
|
||||
@ -190,7 +191,7 @@ void GBox::update()
|
||||
|
||||
heightspin_->get_adjustment()->set_value(controller().params().height.value());
|
||||
unitsComboFromLength(heightunitscombo_, stringcol_,
|
||||
controller().params().height, defaultUnit);
|
||||
controller().params().height, defaultUnit);
|
||||
|
||||
string const height_special(controller().params().height_special);
|
||||
if (!height_special.empty() && height_special != "none") {
|
||||
@ -276,8 +277,8 @@ void GBox::updateInnerBoxCombo()
|
||||
|
||||
if (frameless && oldsize != 2) {
|
||||
innerboxstore_->clear();
|
||||
(*innerboxstore_->append())[stringcol_] = _("Parbox");
|
||||
(*innerboxstore_->append())[stringcol_] = _("Minipage");
|
||||
(*innerboxstore_->append())[stringcol_] = lyx::to_utf8(_("Parbox"));
|
||||
(*innerboxstore_->append())[stringcol_] = lyx::to_utf8(_("Minipage"));
|
||||
// Cope when the backend asks for no inner box in
|
||||
// a frameless box
|
||||
if (i == 0) {
|
||||
@ -288,9 +289,9 @@ void GBox::updateInnerBoxCombo()
|
||||
innerboxcombo_->set_active(i - 1);
|
||||
} else if (!frameless && oldsize != 3) {
|
||||
innerboxstore_->clear();
|
||||
(*innerboxstore_->append())[stringcol_] = _("None");
|
||||
(*innerboxstore_->append())[stringcol_] = _("Parbox");
|
||||
(*innerboxstore_->append())[stringcol_] = _("Minipage");
|
||||
(*innerboxstore_->append())[stringcol_] = lyx::to_utf8(_("None"));
|
||||
(*innerboxstore_->append())[stringcol_] = lyx::to_utf8(_("Parbox"));
|
||||
(*innerboxstore_->append())[stringcol_] = lyx::to_utf8(_("Minipage"));
|
||||
innerboxcombo_->set_active(i);
|
||||
} else {
|
||||
// we're not changing the liststore, just selecting i
|
||||
@ -314,9 +315,9 @@ void GBox::onInnerBoxComboChanged()
|
||||
return;
|
||||
|
||||
controller().params().use_parbox =
|
||||
(*innerboxcombo_->get_active())[stringcol_] == _("Parbox");
|
||||
(*innerboxcombo_->get_active())[stringcol_] == lyx::to_utf8(_("Parbox"));
|
||||
|
||||
bool const ibox = (*innerboxcombo_->get_active())[stringcol_] != _("None");
|
||||
bool const ibox = (*innerboxcombo_->get_active())[stringcol_] != lyx::to_utf8(_("None"));
|
||||
controller().params().inner_box = ibox;
|
||||
setSpecial(ibox);
|
||||
|
||||
|
@ -33,9 +33,9 @@ using std::string;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
||||
// FIXME UNICODE
|
||||
GBranch::GBranch(Dialog & parent)
|
||||
: GViewCB<ControlBranch, GViewGladeB>(parent, _("Branch Settings"), false)
|
||||
: GViewCB<ControlBranch, GViewGladeB>(parent, lyx::to_utf8(_("Branch Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -28,9 +28,9 @@ using std::string;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
||||
// FIXME UNICODE
|
||||
GChanges::GChanges(Dialog & parent)
|
||||
: GViewCB<ControlChanges, GViewGladeB>(parent, _("Merge Changes"), false)
|
||||
: GViewCB<ControlChanges, GViewGladeB>(parent, lyx::to_utf8(_("Merge Changes")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -102,17 +102,17 @@ void GChanges::onNext()
|
||||
|
||||
void GChanges::promptChange()
|
||||
{
|
||||
string const header = _("Accept highlighted change?");
|
||||
string const header = lyx::to_utf8(_("Accept highlighted change?"));
|
||||
string author = controller().getChangeAuthor();
|
||||
string date = controller().getChangeDate();
|
||||
if(author.empty())
|
||||
author = _("unknown author");
|
||||
author = lyx::to_utf8(_("unknown author"));
|
||||
if(date.empty())
|
||||
date = _("unknown date");
|
||||
date = lyx::to_utf8(_("unknown date"));
|
||||
|
||||
messagelabel_->set_markup("<big><b>" + header +
|
||||
"</b></big>\n\nChanged by <b>" + author
|
||||
+ "</b> on <b>" + date + "</b>");
|
||||
"</b></big>\n\nChanged by <b>" + author
|
||||
+ "</b> on <b>" + date + "</b>");
|
||||
|
||||
acceptbutton_->set_sensitive(true && !readOnly());
|
||||
rejectbutton_->set_sensitive(true && !readOnly());
|
||||
@ -122,10 +122,10 @@ void GChanges::promptChange()
|
||||
|
||||
void GChanges::promptDismiss()
|
||||
{
|
||||
string const header = _("Done merging changes");
|
||||
string const header = lyx::to_utf8(_("Done merging changes"));
|
||||
|
||||
messagelabel_->set_markup("<big><b>" + header +
|
||||
"</b></big>");
|
||||
"</b></big>");
|
||||
|
||||
// Disable all buttons but close.
|
||||
acceptbutton_->set_sensitive(false);
|
||||
|
@ -35,9 +35,9 @@ using std::string;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
||||
// FIXME UNICODE
|
||||
GCharacter::GCharacter(Dialog & parent)
|
||||
: GViewCB<ControlCharacter, GViewGladeB>(parent, _("Text Style"), false)
|
||||
: GViewCB<ControlCharacter, GViewGladeB>(parent, lyx::to_utf8(_("Text Style")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -67,8 +67,9 @@ bool GCitation::bib_visible(const Gtk::TreeModel::const_iterator& iter)
|
||||
styleModelColumns styleColumns;
|
||||
|
||||
|
||||
// FIXME UNICODE
|
||||
GCitation::GCitation(Dialog & parent)
|
||||
: GViewCB<ControlCitation, GViewGladeB>(parent, _("Citation"), false)
|
||||
: GViewCB<ControlCitation, GViewGladeB>(parent, lyx::to_utf8(_("Citation")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -117,13 +118,15 @@ void GCitation::doBuild()
|
||||
|
||||
Gtk::TreeModel::Path rootpath; //required for gtkmm < 2.6
|
||||
|
||||
citekeysview_->append_column(_("CiteKeys"), bibColumns.name);
|
||||
// FIXME UNICODE
|
||||
citekeysview_->append_column(lyx::to_utf8(_("CiteKeys")), bibColumns.name);
|
||||
citeFilter_ = Gtk::TreeModelFilter::create(allListStore_, rootpath);
|
||||
citeFilter_->set_visible_column(bibColumns.cite);
|
||||
citekeysview_->set_model(citeFilter_);
|
||||
citeselection_ = citekeysview_->get_selection();
|
||||
|
||||
bibkeysview_->append_column(_("BibKeys"), bibColumns.name);
|
||||
// FIXME UNICODE
|
||||
bibkeysview_->append_column(lyx::to_utf8(_("BibKeys")), bibColumns.name);
|
||||
bibSort_ = Gtk::TreeModelSort::create(allListStore_);
|
||||
bibSort_->set_sort_column(bibColumns.bib_order, Gtk::SORT_ASCENDING );
|
||||
bibFilter_ = Gtk::TreeModelFilter::create(bibSort_, rootpath);
|
||||
@ -154,7 +157,7 @@ void GCitation::doBuild()
|
||||
sigc::mem_fun(*this, &GCitation::bibkeysview_activated));
|
||||
bibselection_->signal_changed().connect(
|
||||
sigc::mem_fun(*this, &GCitation::bib_selected));
|
||||
|
||||
|
||||
citeselection_->signal_changed().connect(
|
||||
sigc::mem_fun(*this, &GCitation::cite_selected));
|
||||
|
||||
@ -208,8 +211,8 @@ void GCitation::fill_styles()
|
||||
|
||||
styleStore_->clear();
|
||||
for (; it != end; ++it) {
|
||||
Gtk::TreeModel::iterator iter2 = styleStore_->append();
|
||||
(*iter2)[styleColumns.name] = Glib::locale_to_utf8(*it);
|
||||
Gtk::TreeModel::iterator iter2 = styleStore_->append();
|
||||
(*iter2)[styleColumns.name] = Glib::locale_to_utf8(*it);
|
||||
}
|
||||
|
||||
if(orig)
|
||||
@ -301,7 +304,7 @@ void GCitation::update_contents()
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
// It wasn't in the list of keys, but to support
|
||||
// It wasn't in the list of keys, but to support
|
||||
// working on a document away from the bibtex file
|
||||
// we should keep it anyway.
|
||||
Gtk::TreeModel::iterator iter = allListStore_->append();
|
||||
|
@ -55,8 +55,9 @@ char const * const encodings[] = { "Language Default", "LaTeX default",
|
||||
}
|
||||
|
||||
|
||||
// FIXME UNICODE
|
||||
GDocument::GDocument(Dialog & parent)
|
||||
: GViewCB<ControlDocument, GViewGladeB>(parent, _("Document Settings"), false),
|
||||
: GViewCB<ControlDocument, GViewGladeB>(parent, lyx::to_utf8(_("Document Settings")), false),
|
||||
lang_(getSecond(getLanguageData(false)))
|
||||
{}
|
||||
|
||||
@ -101,8 +102,9 @@ void GDocument::doBuild()
|
||||
if (cit->isTeXClassAvailable()) {
|
||||
classcombo_.append_text(cit->description());
|
||||
} else {
|
||||
// FIXME UNICODE
|
||||
string item =
|
||||
bformat(_("Unavailable: %1$s"), cit->description());
|
||||
bformat(lyx::to_utf8(_("Unavailable: %1$s")), cit->description());
|
||||
classcombo_.append_text(item);
|
||||
}
|
||||
}
|
||||
@ -124,9 +126,10 @@ void GDocument::doBuild()
|
||||
|
||||
// Populate sans font combo
|
||||
for (int i = 0; tex_fonts_sans_gui[i][0]; ++i) {
|
||||
string font = _(tex_fonts_sans_gui[i]);
|
||||
string font = lyx::to_utf8(_(tex_fonts_sans_gui[i]));
|
||||
if (!controller().isFontAvailable(tex_fonts_sans[i]))
|
||||
font += _(" (not installed)");
|
||||
// FIXME UNICODE
|
||||
font += lyx::to_utf8(_(" (not installed)"));
|
||||
fontsanscombo_.append_text(font);
|
||||
}
|
||||
|
||||
@ -136,9 +139,9 @@ void GDocument::doBuild()
|
||||
|
||||
// Populate roman font combo
|
||||
for (int i = 0; tex_fonts_roman_gui[i][0]; ++i) {
|
||||
string font = _(tex_fonts_roman_gui[i]);
|
||||
string font = lyx::to_utf8(_(tex_fonts_roman_gui[i]));
|
||||
if (!controller().isFontAvailable(tex_fonts_roman[i]))
|
||||
font += _(" (not installed)");
|
||||
font += lyx::to_utf8(_(" (not installed)"));
|
||||
fontsanscombo_.append_text(font);
|
||||
}
|
||||
|
||||
@ -148,9 +151,9 @@ void GDocument::doBuild()
|
||||
|
||||
// Populate typewriter font combo
|
||||
for (int i = 0; tex_fonts_monospaced_gui[i][0]; ++i) {
|
||||
string font = _(tex_fonts_monospaced_gui[i]);
|
||||
string font = lyx::to_utf8(_(tex_fonts_monospaced_gui[i]));
|
||||
if (!controller().isFontAvailable(tex_fonts_monospaced[i]))
|
||||
font += _(" (not installed)");
|
||||
font += lyx::to_utf8(_(" (not installed)"));
|
||||
fontsanscombo_.append_text(font);
|
||||
}
|
||||
|
||||
@ -160,7 +163,7 @@ void GDocument::doBuild()
|
||||
|
||||
// Populate font default family combo
|
||||
for (int i = 0; ControlDocument::fontfamilies_gui[i][0]; ++i)
|
||||
fontdefaultfamilycombo_.append_text(_(ControlDocument::fontfamilies_gui[i]));
|
||||
fontdefaultfamilycombo_.append_text(lyx::to_utf8(_(ControlDocument::fontfamilies_gui[i])));
|
||||
|
||||
xml_->get_widget("FontSize", box);
|
||||
box->pack_start(fontsizecombo_, true, true, 0);
|
||||
@ -192,10 +195,10 @@ void GDocument::doBuild()
|
||||
box->pack_start(vspacesizecombo_, true, true, 0);
|
||||
box->show_all();
|
||||
// The order of these items is magic
|
||||
vspacesizecombo_.append_text(_("Small Skip"));
|
||||
vspacesizecombo_.append_text(_("Medium Skip"));
|
||||
vspacesizecombo_.append_text(_("Big Skip"));
|
||||
vspacesizecombo_.append_text(_("Custom"));
|
||||
vspacesizecombo_.append_text(lyx::to_utf8(_("Small Skip")));
|
||||
vspacesizecombo_.append_text(lyx::to_utf8(_("Medium Skip")));
|
||||
vspacesizecombo_.append_text(lyx::to_utf8(_("Big Skip")));
|
||||
vspacesizecombo_.append_text(lyx::to_utf8(_("Custom")));
|
||||
vspacesizemap_[0] = VSpace::SMALLSKIP;
|
||||
vspacesizemap_[1] = VSpace::MEDSKIP;
|
||||
vspacesizemap_[2] = VSpace::BIGSKIP;
|
||||
@ -215,17 +218,17 @@ void GDocument::doBuild()
|
||||
xml_->get_widget("PageSize", box);
|
||||
box->pack_start(pagesizecombo_, true, true, 0);
|
||||
box->show_all();
|
||||
pagesizecombo_.append_text(_("Default"));
|
||||
pagesizecombo_.append_text(_("Custom"));
|
||||
pagesizecombo_.append_text(_("US letter"));
|
||||
pagesizecombo_.append_text(_("US legal"));
|
||||
pagesizecombo_.append_text(_("US executive"));
|
||||
pagesizecombo_.append_text(_("A3"));
|
||||
pagesizecombo_.append_text(_("A4"));
|
||||
pagesizecombo_.append_text(_("A5"));
|
||||
pagesizecombo_.append_text(_("B3"));
|
||||
pagesizecombo_.append_text(_("B4"));
|
||||
pagesizecombo_.append_text(_("B5"));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("Default")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("Custom")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("US letter")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("US legal")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("US executive")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("A3")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("A4")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("A5")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("B3")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("B4")));
|
||||
pagesizecombo_.append_text(lyx::to_utf8(_("B5")));
|
||||
pagesizecombo_.signal_changed().connect(
|
||||
sigc::mem_fun(*this, &GDocument::pageSizeChanged));
|
||||
|
||||
@ -348,9 +351,9 @@ void GDocument::doBuild()
|
||||
|
||||
branchliststore_ = Gtk::ListStore::create(branchCols_);
|
||||
branchesview_->set_model(branchliststore_);
|
||||
branchesview_->append_column_editable(_("Name"), branchColName_);
|
||||
branchesview_->append_column_editable(_("Activated"), branchColActivated_);
|
||||
branchesview_->append_column_editable(_("Color"), branchColColor_);
|
||||
branchesview_->append_column_editable(lyx::to_utf8(_("Name")), branchColName_);
|
||||
branchesview_->append_column_editable(lyx::to_utf8(_("Activated")), branchColActivated_);
|
||||
branchesview_->append_column_editable(lyx::to_utf8(_("Color")), branchColColor_);
|
||||
branchsel_ = branchesview_->get_selection();
|
||||
|
||||
branchsel_->signal_changed().connect(
|
||||
@ -402,17 +405,17 @@ void GDocument::update()
|
||||
// Font & Size
|
||||
int i = findToken(tex_fonts_sans, params.fontsSans);
|
||||
if (i >= 0)
|
||||
fontsanscombo_.set_active_text(_(tex_fonts_sans_gui[i]));
|
||||
fontsanscombo_.set_active_text(lyx::to_utf8(_(tex_fonts_sans_gui[i])));
|
||||
i = findToken(tex_fonts_sans, params.fontsRoman);
|
||||
if (i >= 0)
|
||||
fontromancombo_.set_active_text(_(tex_fonts_roman_gui[i]));
|
||||
fontromancombo_.set_active_text(lyx::to_utf8(_(tex_fonts_roman_gui[i])));
|
||||
i = findToken(tex_fonts_monospaced, params.fontsTypewriter);
|
||||
if (i >= 0)
|
||||
fonttypewritercombo_.set_active_text(tex_fonts_monospaced_gui[i]);
|
||||
i = findToken(ControlDocument::fontfamilies, params.fontsDefaultFamily);
|
||||
if (i >= 0)
|
||||
fontdefaultfamilycombo_.set_active_text(
|
||||
_(ControlDocument::fontfamilies_gui[i]));
|
||||
lyx::to_utf8(_(ControlDocument::fontfamilies_gui[i])));
|
||||
fontsizecombo_.set_active_text (params.fontsize);
|
||||
scaleSansSB_->set_value(params.fontsSansScale);
|
||||
scaleTypewriterSB_->set_value(params.fontsTypewriterScale);
|
||||
@ -904,7 +907,7 @@ void GDocument::marginsChanged()
|
||||
|
||||
void GDocument::numberingChanged()
|
||||
{
|
||||
string const numberinglabels[] = {
|
||||
docstring const numberinglabels[] = {
|
||||
_("No headings numbered"),
|
||||
_("Only parts numbered"),
|
||||
_("Chapters and above numbered"),
|
||||
@ -916,13 +919,14 @@ void GDocument::numberingChanged()
|
||||
};
|
||||
|
||||
int const value = (int)(numberingadj_->get_value());
|
||||
numberinglabel_->set_label("<i>" + numberinglabels[value] + "</i>");
|
||||
// FIXME UNICODE
|
||||
numberinglabel_->set_label("<i>" + lyx::to_utf8(numberinglabels[value]) + "</i>");
|
||||
}
|
||||
|
||||
|
||||
void GDocument::TOCChanged()
|
||||
{
|
||||
string const TOClabels[] = {
|
||||
docstring const TOClabels[] = {
|
||||
_("Only Parts appear in TOC"),
|
||||
_("Chapters and above appear in TOC"),
|
||||
_("Sections and above appear in TOC"),
|
||||
@ -933,7 +937,8 @@ void GDocument::TOCChanged()
|
||||
};
|
||||
|
||||
int const value = (int)(TOCadj_->get_value());
|
||||
TOClabel_->set_label("<i>" + TOClabels[value] + "</i>");
|
||||
// FIXME UNICODE
|
||||
TOClabel_->set_label("<i>" + lyx::to_utf8(TOClabels[value]) + "</i>");
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GERT::GERT(Dialog & parent)
|
||||
: GViewCB<ControlERT, GViewGladeB>(parent, _("TeX Settings"), false)
|
||||
: GViewCB<ControlERT, GViewGladeB>(parent, lyx::to_utf8(_("TeX Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GErrorList::GErrorList(Dialog & parent)
|
||||
: GViewCB<ControlErrorList, GViewGladeB>(parent, _("Errors"), false)
|
||||
: GViewCB<ControlErrorList, GViewGladeB>(parent, lyx::to_utf8(_("Errors")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ void GErrorList::updateContents()
|
||||
errliststore_->clear();
|
||||
ErrorList const & errors = controller().errorList();
|
||||
if (errors.empty()) {
|
||||
(*errliststore_->append())[listCol_] = _("*** No Errors ***");
|
||||
(*errliststore_->append())[listCol_] = lyx::to_utf8(_("*** No Errors ***"));
|
||||
errlistview_->set_sensitive(false);
|
||||
return;
|
||||
}
|
||||
|
@ -114,27 +114,27 @@ std::vector<Gtk::FileFilter* > get_filters(const std::string & filterstring, con
|
||||
std::string description = ff.description();
|
||||
|
||||
if (description.empty())
|
||||
filters[i]->set_name(Glib::locale_to_utf8(alttitle) +
|
||||
" " + _("files"));
|
||||
else
|
||||
filters[i]->set_name(Glib::locale_to_utf8(alttitle) +
|
||||
" " + lyx::to_utf8(_("files")));
|
||||
else
|
||||
filters[i]->set_name(Glib::locale_to_utf8(description));
|
||||
|
||||
for (FileFilterList::Filter::glob_iterator git = ff.begin();
|
||||
git!=ff.end(); ++git)
|
||||
git!=ff.end(); ++git)
|
||||
filters[i]->add_pattern(Glib::locale_to_utf8(*git));
|
||||
}
|
||||
return filters;
|
||||
}
|
||||
|
||||
|
||||
void set_display(Gtk::CheckButton * show_check, Gtk::ComboBox * display_combo,
|
||||
void set_display(Gtk::CheckButton * show_check, Gtk::ComboBox * display_combo,
|
||||
Gtk::Label * display_label, GtkLengthEntry * scale_length,
|
||||
Gtk::Label * scale_label,
|
||||
external::DisplayType display, unsigned int scale)
|
||||
{
|
||||
|
||||
typedef Gtk::TreeModel::const_iterator gcit;
|
||||
Glib::RefPtr<const Gtk::TreeModel> const display_store =
|
||||
Glib::RefPtr<const Gtk::TreeModel> const display_store =
|
||||
display_combo->get_model();
|
||||
bool const no_display = display == external::NoDisplay;
|
||||
|
||||
@ -142,7 +142,7 @@ void set_display(Gtk::CheckButton * show_check, Gtk::ComboBox * display_combo,
|
||||
display_combo->set_active(
|
||||
*(display_store->children().begin())); //Default
|
||||
else
|
||||
for (gcit it = display_store->children().begin();
|
||||
for (gcit it = display_store->children().begin();
|
||||
it != display_store->children().end(); ++it) {
|
||||
if ((*it)[displayColumns().type] == display) {
|
||||
display_combo->set_active(*it);
|
||||
@ -182,7 +182,7 @@ void set_rotation(Gtk::Entry * angle_entry, Gtk::ComboBox * origin_combo,
|
||||
|
||||
|
||||
void get_rotation(external::RotationData & data,
|
||||
Gtk::Entry const * angle_entry,
|
||||
Gtk::Entry const * angle_entry,
|
||||
Gtk::ComboBox const * origin_combo)
|
||||
{
|
||||
typedef external::RotationData::OriginType OriginType;
|
||||
@ -209,13 +209,13 @@ void set_size(GtkLengthEntry * width_length,
|
||||
if (using_scale) {
|
||||
width_length->get_spin()->set_value(scale);
|
||||
width_length->get_combo()->set_active_text(
|
||||
Glib::locale_to_utf8(_("Scale%")));
|
||||
lyx::to_utf8(_("Scale%")));
|
||||
} else {
|
||||
width_length->set_length(data.width);
|
||||
}
|
||||
|
||||
height_length->set_length(data.height);
|
||||
if (!data.width.zero())
|
||||
if (!data.width.zero())
|
||||
height_length->get_combo()->set_active(data.width.unit());
|
||||
|
||||
height_length->set_sensitive(!using_scale);
|
||||
@ -233,8 +233,8 @@ void get_size(external::ResizeData & data,
|
||||
GtkLengthEntry * height_length,
|
||||
Gtk::CheckButton * ar_check)
|
||||
{
|
||||
if (width_length->get_combo()->get_active_text() !=
|
||||
Glib::locale_to_utf8(_("Scale%"))) {
|
||||
if (width_length->get_combo()->get_active_text() !=
|
||||
lyx::to_utf8(_("Scale%"))) {
|
||||
|
||||
data.width = width_length->get_length();
|
||||
data.scale = string();
|
||||
@ -289,7 +289,7 @@ void get_extra(external::ExtraData & data,
|
||||
Gtk::TreeModel::iterator it = format_store->children().begin();
|
||||
Gtk::TreeModel::iterator end = format_store->children().end();
|
||||
for (; it != end; ++it)
|
||||
data.set(Glib::locale_from_utf8((*it)[formatColumns.name]),
|
||||
data.set(Glib::locale_from_utf8((*it)[formatColumns.name]),
|
||||
trim(Glib::locale_from_utf8((*it)[formatColumns.extra])));
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ void get_extra(external::ExtraData & data,
|
||||
|
||||
|
||||
GExternal::GExternal(Dialog & parent)
|
||||
: GViewCB<ControlExternal, GViewGladeB>(parent, _("External Settings"), false)
|
||||
: GViewCB<ControlExternal, GViewGladeB>(parent, lyx::to_utf8(_("External Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -327,9 +327,9 @@ void GExternal::doBuild()
|
||||
cit != templates.end(); ++cit, ++count) {
|
||||
external::Template templ = controller().getTemplate(count);
|
||||
|
||||
Gtk::TreeModel::iterator iter = templatestore_->append();
|
||||
(*iter)[templateColumns().name] = Glib::locale_to_utf8(*cit);
|
||||
(*iter)[templateColumns().info] =
|
||||
Gtk::TreeModel::iterator iter = templatestore_->append();
|
||||
(*iter)[templateColumns().name] = Glib::locale_to_utf8(*cit);
|
||||
(*iter)[templateColumns().info] =
|
||||
Glib::locale_to_utf8(templ.helpText);
|
||||
(*iter)[templateColumns().filters] = get_filters(
|
||||
controller().getTemplateFilters(*cit),*cit);
|
||||
@ -349,7 +349,7 @@ void GExternal::doBuild()
|
||||
|
||||
// *** Start "File" Page ***
|
||||
xml_->get_widget("TemplateFile", templatefcbutton_);
|
||||
templatefcbutton_->set_title(_("Select external file"));
|
||||
templatefcbutton_->set_title(lyx::to_utf8(_("Select external file")));
|
||||
templatefcbutton_->signal_file_activated().connect(
|
||||
sigc::mem_fun(*this, &GExternal::file_changed));
|
||||
|
||||
@ -373,19 +373,19 @@ void GExternal::doBuild()
|
||||
|
||||
// Fill the display combo
|
||||
Gtk::TreeModel::iterator iter = displaystore_->append();
|
||||
(*iter)[displayColumns().name] = Glib::locale_to_utf8(_("Default"));
|
||||
(*iter)[displayColumns().name] = lyx::to_utf8(_("Default"));
|
||||
(*iter)[displayColumns().type] = external::DefaultDisplay;
|
||||
iter = displaystore_->append();
|
||||
(*iter)[displayColumns().name] = Glib::locale_to_utf8(_("Monochrome"));
|
||||
(*iter)[displayColumns().name] = lyx::to_utf8(_("Monochrome"));
|
||||
(*iter)[displayColumns().type] = external::MonochromeDisplay;
|
||||
iter = displaystore_->append();
|
||||
(*iter)[displayColumns().name] = Glib::locale_to_utf8(_("Grayscale"));
|
||||
(*iter)[displayColumns().name] = lyx::to_utf8(_("Grayscale"));
|
||||
(*iter)[displayColumns().type] = external::GrayscaleDisplay;
|
||||
iter = displaystore_->append();
|
||||
(*iter)[displayColumns().name] = Glib::locale_to_utf8(_("Color"));
|
||||
(*iter)[displayColumns().name] = lyx::to_utf8(_("Color"));
|
||||
(*iter)[displayColumns().type] = external::ColorDisplay;
|
||||
iter = displaystore_->append();
|
||||
(*iter)[displayColumns().name] = Glib::locale_to_utf8(_("Preview"));
|
||||
(*iter)[displayColumns().name] = lyx::to_utf8(_("Preview"));
|
||||
(*iter)[displayColumns().type] = external::PreviewDisplay;
|
||||
|
||||
xml_->get_widget("Display", displaycombo_);
|
||||
@ -399,8 +399,8 @@ void GExternal::doBuild()
|
||||
scalespin_->set_increments(1,10);
|
||||
scalecombo_ = scalelength_->get_combo();
|
||||
scalecombo_->clear();
|
||||
scalecombo_->append_text(Glib::locale_to_utf8(_("Scale%")));
|
||||
scalecombo_->set_active_text(Glib::locale_to_utf8(_("Scale%")));
|
||||
scalecombo_->append_text(lyx::to_utf8(_("Scale%")));
|
||||
scalecombo_->set_active_text(lyx::to_utf8(_("Scale%")));
|
||||
|
||||
xml_->get_widget("ScaleLabel", scalelabel_);
|
||||
scalelabel_->set_mnemonic_widget(*scalespin_);
|
||||
@ -419,7 +419,7 @@ void GExternal::doBuild()
|
||||
Origins const & all_origins = external::all_origins();
|
||||
for (Origins::size_type i = 0; i != all_origins.size(); ++i)
|
||||
origincombo_.append_text(
|
||||
Glib::locale_to_utf8(external::origin_gui_str(i)));
|
||||
external::origin_gui_str(i));
|
||||
|
||||
xml_->get_widget("OriginLabel", originlabel_);
|
||||
originlabel_->set_mnemonic_widget(origincombo_);
|
||||
@ -428,8 +428,8 @@ void GExternal::doBuild()
|
||||
// *** Start "Scale" Page ***
|
||||
xml_->get_widget_derived ("Width", widthlength_);
|
||||
widthcombo_ = widthlength_->get_combo();
|
||||
widthcombo_->prepend_text(Glib::locale_to_utf8(_("Scale%")));
|
||||
widthcombo_->set_active_text(Glib::locale_to_utf8(_("Scale%")));
|
||||
widthcombo_->prepend_text(lyx::to_utf8(_("Scale%")));
|
||||
widthcombo_->set_active_text(lyx::to_utf8(_("Scale%")));
|
||||
|
||||
xml_->get_widget("WidthLabel", widthlabel_);
|
||||
widthlabel_->set_mnemonic_widget(*(widthlength_->get_spin()));
|
||||
@ -440,7 +440,7 @@ void GExternal::doBuild()
|
||||
sigc::mem_fun(*this, &GExternal::size_changed));
|
||||
heightlength_->signal_changed().connect(
|
||||
sigc::mem_fun(*this, &GExternal::size_changed));
|
||||
|
||||
|
||||
xml_->get_widget("HeightLabel", heightlabel_);
|
||||
heightlabel_->set_mnemonic_widget(*(heightlength_->get_spin()));
|
||||
|
||||
@ -485,8 +485,8 @@ void GExternal::doBuild()
|
||||
|
||||
xml_->get_widget("Options", optionsview_);
|
||||
optionsview_->set_model(formatstore_);
|
||||
optionsview_->append_column(_("Forma_t"), formatColumns.name);
|
||||
optionsview_->append_column_editable(_("O_ption"), formatColumns.extra);
|
||||
optionsview_->append_column(lyx::to_utf8(_("Forma_t")), formatColumns.name);
|
||||
optionsview_->append_column_editable(lyx::to_utf8(_("O_ption")), formatColumns.extra);
|
||||
// *** End "Options" Page ***
|
||||
}
|
||||
|
||||
@ -505,7 +505,7 @@ void GExternal::update()
|
||||
}
|
||||
else {
|
||||
editfilebutton_->set_sensitive(false);
|
||||
bbfromfilebutton_->set_sensitive(false);
|
||||
bbfromfilebutton_->set_sensitive(false);
|
||||
}
|
||||
|
||||
templatecombo_->set_active(
|
||||
@ -547,7 +547,7 @@ void GExternal::update_template()
|
||||
templatefilters =
|
||||
(*currenttemplate_)[templateColumns().filters];
|
||||
|
||||
for (ffit it = templatefilters.begin();
|
||||
for (ffit it = templatefilters.begin();
|
||||
it != templatefilters.end(); ++it)
|
||||
templatefcbutton_->remove_filter(**it);
|
||||
}
|
||||
@ -567,7 +567,7 @@ void GExternal::update_template()
|
||||
Gtk::Widget * widget = notebook_->get_nth_page(2);
|
||||
widget->set_sensitive(found);
|
||||
notebook_->get_tab_label(*widget)->set_sensitive(found);
|
||||
|
||||
|
||||
found = find(tr_begin, tr_end, external::Resize) != tr_end;
|
||||
widget = notebook_->get_nth_page(3);
|
||||
widget->set_sensitive(found);
|
||||
@ -600,7 +600,7 @@ void GExternal::update_template()
|
||||
|
||||
// Ascertain whether the template has any formats supporting
|
||||
// the 'Extra' option
|
||||
Glib::ustring templatename =
|
||||
Glib::ustring templatename =
|
||||
(*currenttemplate_)[templateColumns().name];
|
||||
formatstore_->clear();
|
||||
external::Template::Formats::const_iterator it = templ.formats.begin();
|
||||
@ -615,13 +615,13 @@ void GExternal::update_template()
|
||||
string const format = it->first;
|
||||
string const opt = controller().params().extradata.get(format);
|
||||
|
||||
Gtk::TreeModel::iterator iter = formatstore_->append();
|
||||
(*iter)[formatColumns.name] = Glib::locale_to_utf8(format);
|
||||
(*iter)[formatColumns.extra] = Glib::locale_to_utf8(opt);
|
||||
Gtk::TreeModel::iterator iter = formatstore_->append();
|
||||
(*iter)[formatColumns.name] = Glib::locale_to_utf8(format);
|
||||
(*iter)[formatColumns.extra] = Glib::locale_to_utf8(opt);
|
||||
}
|
||||
|
||||
// widget is still the 'Options' tab
|
||||
notebook_->get_tab_label(*widget)->set_sensitive(enabled);
|
||||
notebook_->get_tab_label(*widget)->set_sensitive(enabled);
|
||||
}
|
||||
|
||||
|
||||
@ -645,7 +645,7 @@ void GExternal::apply()
|
||||
angleentry_, &origincombo_);
|
||||
|
||||
if (notebook_->get_nth_page(3)->is_sensitive())
|
||||
get_size(params.resizedata,
|
||||
get_size(params.resizedata,
|
||||
widthlength_, heightlength_, archeck_);
|
||||
|
||||
if (notebook_->get_nth_page(4)->is_sensitive())
|
||||
@ -689,8 +689,8 @@ void GExternal::get_bb()
|
||||
|
||||
bool GExternal::activate_ar() const
|
||||
{
|
||||
if (widthlength_->get_combo()->get_active_text() ==
|
||||
Glib::locale_to_utf8(_("Scale%")))
|
||||
if (widthlength_->get_combo()->get_active_text() ==
|
||||
lyx::to_utf8(_("Scale%")))
|
||||
return false;
|
||||
|
||||
if (widthlength_->get_spin()->get_value() < 0.05)
|
||||
@ -720,8 +720,8 @@ void GExternal::size_changed()
|
||||
{
|
||||
archeck_->set_sensitive(activate_ar());
|
||||
|
||||
bool useHeight = widthlength_->get_combo()->get_active_text() !=
|
||||
Glib::locale_to_utf8(_("Scale%"));
|
||||
bool useHeight = widthlength_->get_combo()->get_active_text() !=
|
||||
lyx::to_utf8(_("Scale%"));
|
||||
|
||||
heightlength_->set_sensitive(useHeight);
|
||||
}
|
||||
@ -773,7 +773,7 @@ void GExternal::file_changed()
|
||||
}
|
||||
else {
|
||||
editfilebutton_->set_sensitive(false);
|
||||
bbfromfilebutton_->set_sensitive(false);
|
||||
bbfromfilebutton_->set_sensitive(false);
|
||||
}
|
||||
bc().valid(true);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ using support::contains;
|
||||
namespace frontend {
|
||||
|
||||
GFloat::GFloat(Dialog & parent)
|
||||
: GViewCB<ControlFloat, GViewGladeB>(parent, _("Float Settings"), false)
|
||||
: GViewCB<ControlFloat, GViewGladeB>(parent, lyx::to_utf8(_("Float Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ string defaultUnit("cm");
|
||||
} // namespace anon
|
||||
|
||||
GGraphics::GGraphics(Dialog & parent)
|
||||
: GViewCB<ControlGraphics, GViewGladeB>(parent, _("Graphics"), false)
|
||||
: GViewCB<ControlGraphics, GViewGladeB>(parent, lyx::to_utf8(_("Graphics")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -437,7 +437,7 @@ void GGraphics::updateBB(string const & filename, string const & bb_inset)
|
||||
righttopyspin_->set_text("");
|
||||
}
|
||||
unitsComboFromLength(bbunitscombo_, stringcol_,
|
||||
LyXLength("bp"), defaultUnit);
|
||||
LyXLength("bp"), defaultUnit);
|
||||
} else {
|
||||
// get the values from the inset
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
@ -501,7 +501,7 @@ void GGraphics::onBBFromFileClicked()
|
||||
righttopxspin_->set_text(token(bb, ' ', 2));
|
||||
righttopyspin_->set_text(token(bb, ' ', 3));
|
||||
unitsComboFromLength(bbunitscombo_, stringcol_,
|
||||
LyXLength("bp"), defaultUnit);
|
||||
LyXLength("bp"), defaultUnit);
|
||||
}
|
||||
controller().bbChanged = false;
|
||||
} else {
|
||||
@ -510,7 +510,7 @@ void GGraphics::onBBFromFileClicked()
|
||||
righttopxspin_->set_text("");
|
||||
righttopyspin_->set_text("");
|
||||
unitsComboFromLength(bbunitscombo_, stringcol_,
|
||||
LyXLength("bp"), defaultUnit);
|
||||
LyXLength("bp"), defaultUnit);
|
||||
}
|
||||
bc().input(ButtonPolicy::SMI_VALID);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GInclude::GInclude(Dialog & parent)
|
||||
: GViewCB<ControlInclude, GViewGladeB>(parent, _("Child Document"), false)
|
||||
: GViewCB<ControlInclude, GViewGladeB>(parent, lyx::to_utf8(_("Child Document")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GLog::GLog(Dialog & parent)
|
||||
: GViewCB<ControlLog, GViewGladeB>(parent, _("Log Viewer"), false)
|
||||
: GViewCB<ControlLog, GViewGladeB>(parent, lyx::to_utf8(_("Log Viewer")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ void GLog::update()
|
||||
if (!contents.str().empty())
|
||||
contentbuffer_->set_text(contents.str());
|
||||
else
|
||||
contentbuffer_->set_text(_("Error reading file!"));
|
||||
contentbuffer_->set_text(lyx::to_utf8(_("Error reading file!")));
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -104,7 +104,7 @@ inline int indexToCol(int index)
|
||||
|
||||
|
||||
GMathDelim::GMathDelim(Dialog & parent) :
|
||||
GViewCB<ControlMath, GViewGladeB>(parent, _("Math Delimiters")),
|
||||
GViewCB<ControlMath, GViewGladeB>(parent, lyx::to_utf8(_("Math Delimiters"))),
|
||||
delimTbl_(delimTblRows, delimTblCols, xbm)
|
||||
{
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ GXpmBtnTbl::XpmData xpmDown[] =
|
||||
|
||||
|
||||
GMathPanel::GMathPanel(Dialog & parent)
|
||||
: GViewCB<ControlMath, GViewGladeB>(parent, _("Math Panel")),
|
||||
: GViewCB<ControlMath, GViewGladeB>(parent, lyx::to_utf8(_("Math Panel"))),
|
||||
tableUp_(2, 5, xpmUp), tableDown_(4, 3, xpmDown)
|
||||
{
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ namespace frontend {
|
||||
|
||||
|
||||
GMathsMatrix::GMathsMatrix(Dialog & parent)
|
||||
: GViewCB<ControlMath, GViewGladeB>(parent, _("Math Matrix"), false)
|
||||
: GViewCB<ControlMath, GViewGladeB>(parent, lyx::to_utf8(_("Math Matrix")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GNote::GNote(Dialog & parent)
|
||||
: GViewCB<ControlNote, GViewGladeB>(parent, _("Note Settings"), false)
|
||||
: GViewCB<ControlNote, GViewGladeB>(parent, lyx::to_utf8(_("Note Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace {
|
||||
|
||||
|
||||
GParagraph::GParagraph(Dialog & parent)
|
||||
: GViewCB<ControlParagraph, GViewGladeB>(parent, _("Paragraph Settings"), false)
|
||||
: GViewCB<ControlParagraph, GViewGladeB>(parent, lyx::to_utf8(_("Paragraph Settings")), false)
|
||||
{}
|
||||
|
||||
void GParagraph::doBuild()
|
||||
@ -96,7 +96,7 @@ void GParagraph::update()
|
||||
string const labelwidth = controller().params().labelWidthString();
|
||||
maxlabelwidthentry_->set_text(labelwidth);
|
||||
maxlabelwidthentry_->set_sensitive(
|
||||
labelwidth != _("Senseless with this layout!"));
|
||||
labelwidth != lyx::to_utf8(_("Senseless with this layout!")));
|
||||
|
||||
// alignment
|
||||
LyXAlignment const current_alignment = controller().params().align();
|
||||
|
@ -35,7 +35,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GPreferences::GPreferences(Dialog & parent)
|
||||
: GViewCB<ControlPrefs, GViewGladeB>(parent, _("Preferences"), false)
|
||||
: GViewCB<ControlPrefs, GViewGladeB>(parent, lyx::to_utf8(_("Preferences")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -69,13 +69,13 @@ void GPreferences::doBuild()
|
||||
dpiadj_ = spin->get_adjustment();
|
||||
xml_->get_widget("Zoom", spin);
|
||||
zoomadj_ = spin->get_adjustment();
|
||||
|
||||
|
||||
// *** Graphics ***
|
||||
xml_->get_widget("GraphicsColor", graphicscolorradio_);
|
||||
xml_->get_widget("GraphicsGrayscale", graphicsgrayscaleradio_);
|
||||
xml_->get_widget("GraphicsMonochrome", graphicsmonoradio_);
|
||||
xml_->get_widget("GraphicsDoNotDisplay", graphicsnoneradio_);
|
||||
|
||||
|
||||
xml_->get_widget("InstantPreviewOn", instprevonradio_);
|
||||
xml_->get_widget("InstantPreviewOff", instprevoffradio_);
|
||||
xml_->get_widget("InstantPreviewNoMath", instprevnomathradio_);
|
||||
@ -84,7 +84,7 @@ void GPreferences::doBuild()
|
||||
xml_->get_widget("UseKeyboardMap", keyboardmapcheck_);
|
||||
xml_->get_widget("FirstKeyboardMap", keyboardmap1fcbutton_);
|
||||
xml_->get_widget("SecondKeyboardMap", keyboardmap2fcbutton_);
|
||||
|
||||
|
||||
Gtk::FileFilter kmapfilter;
|
||||
kmapfilter.set_name ("LyX keyboard maps");
|
||||
kmapfilter.add_pattern ("*.kmap");
|
||||
@ -98,12 +98,12 @@ void GPreferences::doBuild()
|
||||
keyboardmap2fcbutton_->add_filter (kmapfilter);
|
||||
keyboardmap2fcbutton_->add_filter (allfilter);
|
||||
keyboardmap2fcbutton_->set_filter (kmapfilter);
|
||||
|
||||
|
||||
keyboardmapcheck_->signal_toggled().connect(
|
||||
sigc::mem_fun(*this, &GPreferences::keyboard_sensitivity));
|
||||
|
||||
|
||||
// *** Language ***
|
||||
|
||||
|
||||
xml_->get_widget("DefaultLanguage", box);
|
||||
box->pack_start (defaultlanguagecombo_);
|
||||
defaultlanguagecombo_.show();
|
||||
@ -116,7 +116,7 @@ void GPreferences::doBuild()
|
||||
xml_->get_widget("RTLSupport", RTLsupportcheck_);
|
||||
xml_->get_widget("AutoBegin", autobegincheck_);
|
||||
xml_->get_widget("AutoEnd", autoendcheck_);
|
||||
|
||||
|
||||
// Store the lang identifiers for later
|
||||
vector<LanguagePair> const langs = getLanguageData(false);
|
||||
lang_ = getSecond(langs);
|
||||
@ -140,7 +140,7 @@ void GPreferences::doBuild()
|
||||
Gtk::FileFilter ispellfilter;
|
||||
ispellfilter.set_name ("iSpell Dictionary Files");
|
||||
ispellfilter.add_pattern ("*.ispell");
|
||||
|
||||
|
||||
personaldictionaryfcbutton_->add_filter (ispellfilter);
|
||||
personaldictionaryfcbutton_->add_filter (allfilter);
|
||||
personaldictionaryfcbutton_->set_filter (ispellfilter);
|
||||
@ -155,7 +155,7 @@ void GPreferences::doBuild()
|
||||
spellcheckercombo_.append_text (_("aspell (library)"));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ void GPreferences::update()
|
||||
instprevoffradio_->set_active();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// *** Keyboard ***
|
||||
keyboardmapcheck_->set_active (rc.use_kbmap);
|
||||
keyboardmap1fcbutton_->set_filename (rc.primary_kbmap);
|
||||
@ -219,7 +219,7 @@ void GPreferences::update()
|
||||
// *** Language ***
|
||||
int const pos = int(findPos(lang_, rc.default_language));
|
||||
defaultlanguagecombo_.set_active(pos);
|
||||
|
||||
|
||||
languagepackageentry_->set_text(rc.language_package);
|
||||
commandstartentry_->set_text(rc.language_command_begin);
|
||||
commandendentry_->set_text(rc.language_command_end);
|
||||
@ -247,7 +247,7 @@ void GPreferences::update()
|
||||
spellcheckercombo_.set_active (3);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// FIXME: remove isp_use_alt_lang
|
||||
alternativelanguageentry_->set_text(rc.isp_alt_lang);
|
||||
// FIXME: remove isp_use_esc_chars
|
||||
@ -316,7 +316,7 @@ void GPreferences::apply()
|
||||
rc.primary_kbmap = keyboardmap1fcbutton_->get_filename();
|
||||
rc.secondary_kbmap = keyboardmap2fcbutton_->get_filename();
|
||||
}
|
||||
|
||||
|
||||
// *** Language ***
|
||||
rc.default_language = lang_[
|
||||
defaultlanguagecombo_.get_active_row_number()];
|
||||
|
@ -62,7 +62,7 @@ bufferModelColumns bufferColumns;
|
||||
|
||||
|
||||
GRef::GRef(Dialog & parent)
|
||||
: GViewCB<ControlRef, GViewGladeB>(parent, _("Cross-reference"), false)
|
||||
: GViewCB<ControlRef, GViewGladeB>(parent, lyx::to_utf8(_("Cross-reference")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ void GRef::doBuild()
|
||||
xml_->get_widget("Back", backbutton_);
|
||||
xml_->get_widget("Refresh", refreshbutton_);
|
||||
|
||||
refview_->append_column(_("Label"), refColumns.name);
|
||||
refview_->append_column(lyx::to_utf8(_("Label")), refColumns.name);
|
||||
|
||||
buffercombo_->signal_changed().connect(
|
||||
sigc::mem_fun(*this, &GRef::buffer_changed));
|
||||
@ -194,8 +194,8 @@ void GRef::update()
|
||||
vector<string>::const_iterator it = buffers.begin();
|
||||
vector<string>::const_iterator const end = buffers.end();
|
||||
for (; it != end; ++it) {
|
||||
Gtk::TreeModel::iterator iter = bufferstore_->append();
|
||||
(*iter)[bufferColumns.name] = *it;
|
||||
Gtk::TreeModel::iterator iter = bufferstore_->append();
|
||||
(*iter)[bufferColumns.name] = *it;
|
||||
}
|
||||
|
||||
buffercombo_->set_active(controller().getBufferNum());
|
||||
@ -226,7 +226,7 @@ void GRef::update_labels()
|
||||
refview_->set_sensitive(true);
|
||||
} else {
|
||||
Gtk::TreeModel::iterator iter =refListStore_->append();
|
||||
(*iter)[refColumns.name] = _("No labels found.");
|
||||
(*iter)[refColumns.name] = lyx::to_utf8(_("No labels found."));
|
||||
refview_->set_sensitive(false);
|
||||
}
|
||||
refview_->set_model(refListStore_);
|
||||
|
@ -33,7 +33,7 @@ typedef GViewCB<ControlSearch, GViewGladeB> base_class;
|
||||
|
||||
|
||||
GSearch::GSearch(Dialog & parent)
|
||||
: base_class(parent, _("Find and Replace"), false)
|
||||
: base_class(parent, lyx::to_utf8(_("Find and Replace")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -81,31 +81,31 @@ void GSearch::update()
|
||||
void GSearch::onFindNext()
|
||||
{
|
||||
controller().find(findentry->get_text(),
|
||||
casecheck->get_active(),
|
||||
matchwordcheck->get_active(),
|
||||
!backwardscheck->get_active());
|
||||
casecheck->get_active(),
|
||||
matchwordcheck->get_active(),
|
||||
!backwardscheck->get_active());
|
||||
}
|
||||
|
||||
|
||||
void GSearch::onReplace()
|
||||
{
|
||||
controller().replace(findentry->get_text(),
|
||||
replaceentry->get_text(),
|
||||
casecheck->get_active(),
|
||||
matchwordcheck->get_active(),
|
||||
!backwardscheck->get_active(),
|
||||
false);
|
||||
replaceentry->get_text(),
|
||||
casecheck->get_active(),
|
||||
matchwordcheck->get_active(),
|
||||
!backwardscheck->get_active(),
|
||||
false);
|
||||
}
|
||||
|
||||
|
||||
void GSearch::onReplaceAll()
|
||||
{
|
||||
controller().replace(findentry->get_text(),
|
||||
replaceentry->get_text(),
|
||||
casecheck->get_active(),
|
||||
matchwordcheck->get_active(),
|
||||
!backwardscheck->get_active(),
|
||||
true);
|
||||
replaceentry->get_text(),
|
||||
casecheck->get_active(),
|
||||
matchwordcheck->get_active(),
|
||||
!backwardscheck->get_active(),
|
||||
true);
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GSendto::GSendto(Dialog & parent)
|
||||
: GViewCB<ControlSendto, GViewGladeB>(parent, _("Send document to command"), false)
|
||||
: GViewCB<ControlSendto, GViewGladeB>(parent, lyx::to_utf8(_("Send document to command")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GShowFile::GShowFile(Dialog & parent)
|
||||
: GViewCB<ControlShowFile, GViewGladeB>(parent, _("Show File"), false)
|
||||
: GViewCB<ControlShowFile, GViewGladeB>(parent, lyx::to_utf8(_("Show File")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ void GShowFile::update()
|
||||
if (!contents.empty())
|
||||
contentbuffer_->set_text(contents);
|
||||
else
|
||||
contentbuffer_->set_text(_("Error reading file!"));
|
||||
contentbuffer_->set_text(lyx::to_utf8(_("Error reading file!")));
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -31,8 +31,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GSpellchecker::GSpellchecker(Dialog & parent)
|
||||
: GViewCB<ControlSpellchecker, GViewGladeB>
|
||||
(parent, _("Spellchecker"), false)
|
||||
: GViewCB<ControlSpellchecker, GViewGladeB>(parent, lyx::to_utf8(_("Spellchecker")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -133,7 +132,7 @@ void GSpellchecker::partialUpdate(int s)
|
||||
int const progress = controller().getProgress();
|
||||
if (progress != 0) {
|
||||
progress_->set_fraction(float(progress)/100.0f);
|
||||
progress_->set_text(convert<string>(progress) + "% " + _("checked"));
|
||||
progress_->set_text(convert<string>(progress) + "% " + lyx::to_utf8(_("checked")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GTableCreate::GTableCreate(Dialog & parent)
|
||||
: GViewCB<ControlTabularCreate, GViewGladeB>(parent, _("Insert Table"))
|
||||
: GViewCB<ControlTabularCreate, GViewGladeB>(parent, lyx::to_utf8(_("Insert Table")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GTabular::GTabular(Dialog & parent)
|
||||
: GViewCB<ControlTabular, GViewGladeB>(parent, _("Table Settings"), false)
|
||||
: GViewCB<ControlTabular, GViewGladeB>(parent, lyx::to_utf8(_("Table Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -354,11 +354,11 @@ void GTabular::updateHorzAlignCombo(bool extraoption)
|
||||
// Deprecated in favor of clear_items in gtkmm >= 2.8
|
||||
unsigned int const oldselection = horzaligncombo_->get_active_row_number();
|
||||
horzaligncombo_->clear();
|
||||
horzaligncombo_->append_text(_("Left"));
|
||||
horzaligncombo_->append_text(_("Center"));
|
||||
horzaligncombo_->append_text(_("Right"));
|
||||
horzaligncombo_->append_text(lyx::to_utf8(_("Left")));
|
||||
horzaligncombo_->append_text(lyx::to_utf8(_("Center")));
|
||||
horzaligncombo_->append_text(lyx::to_utf8(_("Right")));
|
||||
if (extraoption)
|
||||
horzaligncombo_->append_text(_("Block"));
|
||||
horzaligncombo_->append_text(lyx::to_utf8(_("Block")));
|
||||
if (oldselection < horzaligncombo_->get_model()->children().size())
|
||||
horzaligncombo_->set_active(oldselection);
|
||||
else
|
||||
|
@ -34,7 +34,7 @@ namespace frontend {
|
||||
|
||||
|
||||
GTexinfo::GTexinfo(Dialog & parent)
|
||||
: GViewCB<ControlTexinfo, GViewGladeB>(parent, _("TeX Information"), false),
|
||||
: GViewCB<ControlTexinfo, GViewGladeB>(parent, lyx::to_utf8(_("TeX Information")), false),
|
||||
activeStyle(ControlTexinfo::cls)
|
||||
{}
|
||||
|
||||
@ -80,18 +80,18 @@ void GTexinfo::doBuild() {
|
||||
sigc::mem_fun(*this, >exinfo::onTypeComboChanged));
|
||||
|
||||
Gtk::TreeModel::iterator row = typestore_->append();
|
||||
(*row)[listCol_] = _("LaTeX classes");
|
||||
(*row)[listCol_] = lyx::to_utf8(_("LaTeX classes"));
|
||||
(*row)[listColIndex_] = ControlTexinfo::cls;
|
||||
// This is the default selection
|
||||
typecombo_->set_active(row);
|
||||
activeStyle = ControlTexinfo::cls;
|
||||
|
||||
row = typestore_->append();
|
||||
(*row)[listCol_] = _("LaTeX styles");
|
||||
(*row)[listCol_] = lyx::to_utf8(_("LaTeX styles"));
|
||||
(*row)[listColIndex_] = ControlTexinfo::sty;
|
||||
|
||||
row = typestore_->append();
|
||||
(*row)[listCol_] = _("BibTeX styles");
|
||||
(*row)[listCol_] = lyx::to_utf8(_("BibTeX styles"));
|
||||
(*row)[listColIndex_] = ControlTexinfo::bst;
|
||||
|
||||
updateStyles();
|
||||
|
@ -44,7 +44,7 @@ synModelColumns synColumns;
|
||||
|
||||
|
||||
GThesaurus::GThesaurus(Dialog & parent)
|
||||
: GViewCB<ControlThesaurus, GViewGladeB>(parent, _("Thesaurus"), false)
|
||||
: GViewCB<ControlThesaurus, GViewGladeB>(parent, lyx::to_utf8(_("Thesaurus")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ void GThesaurus::doBuild()
|
||||
xml_->get_widget("Keyword", keywordentry_);
|
||||
xml_->get_widget("Meanings", meaningsview_);
|
||||
|
||||
meaningsview_->append_column(_("Synonym"), synColumns.name);
|
||||
meaningsview_->append_column(lyx::to_utf8(_("Synonym")), synColumns.name);
|
||||
|
||||
|
||||
// Keyword entry changed
|
||||
@ -146,14 +146,14 @@ void GThesaurus::update_lists()
|
||||
|
||||
for (std::vector<string>::const_iterator cit2 = cit->second.begin();
|
||||
cit2 != cit->second.end(); ++cit2) {
|
||||
Gtk::TreeModel::Row childrow = *(synTreeStore_->append(row.children()));
|
||||
Gtk::TreeModel::Row childrow = *(synTreeStore_->append(row.children()));
|
||||
childrow[synColumns.name] = *cit2;
|
||||
}
|
||||
}
|
||||
meaningsview_->set_sensitive(true);
|
||||
} else {
|
||||
Gtk::TreeModel::Row row = *(synTreeStore_->append());
|
||||
row[synColumns.name] = _("No synonyms found");
|
||||
row[synColumns.name] = lyx::to_utf8(_("No synonyms found"));
|
||||
meaningsview_->set_sensitive(false);
|
||||
}
|
||||
meaningsview_->set_model(synTreeStore_);
|
||||
|
@ -30,7 +30,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GToc::GToc(Dialog & parent)
|
||||
: GViewCB<ControlToc, GViewGladeB>(parent, _("Table of Contents"), false)
|
||||
: GViewCB<ControlToc, GViewGladeB>(parent, lyx::to_utf8(_("Table of Contents")), false)
|
||||
{}
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ void GToc::updateContents()
|
||||
{
|
||||
if (typestore_->children().empty()) {
|
||||
tocstore_->clear();
|
||||
(*tocstore_->append())[listCol_] = _("*** No Lists ***");
|
||||
(*tocstore_->append())[listCol_] = lyx::to_utf8(_("*** No Lists ***"));
|
||||
tocview_->set_sensitive(false);
|
||||
return;
|
||||
}
|
||||
@ -142,7 +142,7 @@ void GToc::updateContents()
|
||||
|
||||
if (contents.empty()) {
|
||||
tocstore_->clear();
|
||||
(*tocstore_->append())[listCol_] = _("*** No Items ***");
|
||||
(*tocstore_->append())[listCol_] = lyx::to_utf8(_("*** No Items ***"));
|
||||
tocview_->set_sensitive(false);
|
||||
return;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ namespace frontend {
|
||||
|
||||
|
||||
GUrl::GUrl(Dialog & parent)
|
||||
: GViewCB<ControlCommand, GViewGladeB>(parent, _("URL"))
|
||||
: GViewCB<ControlCommand, GViewGladeB>(parent, lyx::to_utf8(_("URL")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GVSpace::GVSpace(Dialog & parent)
|
||||
: GViewCB<ControlVSpace, GViewGladeB>(parent, _("VSpace Settings"), false)
|
||||
: GViewCB<ControlVSpace, GViewGladeB>(parent, lyx::to_utf8(_("VSpace Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GWrap::GWrap(Dialog & parent)
|
||||
: GViewCB<ControlWrap, GViewGladeB>(parent, _("Text Wrap Settings"), false)
|
||||
: GViewCB<ControlWrap, GViewGladeB>(parent, lyx::to_utf8(_("Text Wrap Settings")), false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ int prompt_pimpl(string const & tit, string const & question,
|
||||
int default_button, int cancel_button,
|
||||
string const & b1, string const & b2, string const & b3)
|
||||
{
|
||||
string const title = bformat(_("LyX: %1$s"), tit);
|
||||
string const title = bformat(lyx::to_utf8(_("LyX: %1$s")), tit);
|
||||
|
||||
QWidget * const parent = qApp->focusWidget() ?
|
||||
qApp->focusWidget() : qApp->mainWidget();
|
||||
@ -61,7 +61,7 @@ void warning_pimpl(string const & tit, string const & message)
|
||||
QWidget * const parent = qApp->focusWidget() ?
|
||||
qApp->focusWidget() : qApp->mainWidget();
|
||||
|
||||
string const title = bformat(_("LyX: %1$s"), tit);
|
||||
string const title = bformat(lyx::to_utf8(_("LyX: %1$s")), tit);
|
||||
QMessageBox::warning(parent,
|
||||
toqstr(title),
|
||||
toqstr(formatted(message)));
|
||||
@ -73,7 +73,7 @@ void error_pimpl(string const & tit, string const & message)
|
||||
QWidget * const parent = qApp->focusWidget() ?
|
||||
qApp->focusWidget() : qApp->mainWidget();
|
||||
|
||||
string const title = bformat(_("LyX: %1$s"), tit);
|
||||
string const title = bformat(lyx::to_utf8(_("LyX: %1$s")), tit);
|
||||
QMessageBox::critical(parent,
|
||||
toqstr(title),
|
||||
toqstr(formatted(message)));
|
||||
@ -85,7 +85,7 @@ void information_pimpl(string const & tit, string const & message)
|
||||
QWidget * const parent = qApp->focusWidget() ?
|
||||
qApp->focusWidget() : qApp->mainWidget();
|
||||
|
||||
string const title = bformat(_("LyX: %1$s"), tit);
|
||||
string const title = bformat(lyx::to_utf8(_("LyX: %1$s")), tit);
|
||||
QMessageBox::information(parent,
|
||||
toqstr(title),
|
||||
toqstr(formatted(message)));
|
||||
@ -98,7 +98,7 @@ askForText_pimpl(string const & msg, string const & dflt)
|
||||
QWidget * const parent = qApp->focusWidget() ?
|
||||
qApp->focusWidget() : qApp->mainWidget();
|
||||
|
||||
string const title = bformat(_("LyX: %1$s"), msg);
|
||||
string const title = bformat(lyx::to_utf8(_("LyX: %1$s")), msg);
|
||||
QAskForTextDialog d(parent, toqstr(title), true);
|
||||
// less than ideal !
|
||||
d.askLA->setText(toqstr('&' + msg));
|
||||
|
@ -216,13 +216,13 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
} else if (name == "index") {
|
||||
dialog->setController(new ControlCommand(*dialog, name));
|
||||
dialog->setView(new QIndex(*dialog,
|
||||
_("Index Entry"),
|
||||
lyx::to_utf8(_("Index Entry")),
|
||||
qt_("&Keyword:")));
|
||||
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
||||
} else if (name == "label") {
|
||||
dialog->setController(new ControlCommand(*dialog, name));
|
||||
dialog->setView(new QIndex(*dialog,
|
||||
_("Label"),
|
||||
lyx::to_utf8(_("Label")),
|
||||
qt_("&Label:")));
|
||||
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
||||
} else if (name == "log") {
|
||||
|
@ -152,7 +152,7 @@ FileDialog::Result const FileDialog::opendir(string const & path,
|
||||
qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(),
|
||||
title_.c_str()));
|
||||
#else
|
||||
FileFilterList const filter(_("Directories"));
|
||||
FileFilterList const filter(lyx::to_utf8(_("Directories")));
|
||||
|
||||
LyXFileDialog dlg(path, filter, title_, private_->b1, private_->b2);
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace frontend {
|
||||
typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
|
||||
|
||||
QAbout::QAbout(Dialog & parent)
|
||||
: base_class(parent, _("About LyX"))
|
||||
: base_class(parent, lyx::to_utf8(_("About LyX")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ typedef QController<ControlCommand, QView<QBibitemDialog> > base_class;
|
||||
|
||||
|
||||
QBibitem::QBibitem(Dialog & parent)
|
||||
: base_class(parent, _("Bibliography Entry Settings"))
|
||||
: base_class(parent, lyx::to_utf8(_("Bibliography Entry Settings")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ namespace frontend {
|
||||
typedef QController<ControlBibtex, QView<QBibtexDialog> > base_class;
|
||||
|
||||
QBibtex::QBibtex(Dialog & parent)
|
||||
: base_class(parent, _("BibTeX Bibliography"))
|
||||
: base_class(parent, lyx::to_utf8(_("BibTeX Bibliography")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace frontend {
|
||||
typedef QController<ControlBox, QView<QBoxDialog> > base_class;
|
||||
|
||||
QBox::QBox(Dialog & parent)
|
||||
: base_class(parent, _("Box Settings"))
|
||||
: base_class(parent, lyx::to_utf8(_("Box Settings")))
|
||||
{}
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ typedef QController<ControlBranch, QView<QBranchDialog> > base_class;
|
||||
|
||||
|
||||
QBranch::QBranch(Dialog & parent)
|
||||
: base_class(parent, _("Branch Settings"))
|
||||
: base_class(parent, lyx::to_utf8(_("Branch Settings")))
|
||||
{}
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
|
||||
|
||||
|
||||
QChanges::QChanges(Dialog & parent)
|
||||
: base_class(parent, _("Merge Changes"))
|
||||
: base_class(parent, lyx::to_utf8(_("Merge Changes")))
|
||||
{
|
||||
}
|
||||
|
||||
@ -55,9 +55,9 @@ void QChanges::update_contents()
|
||||
string date(controller().getChangeDate());
|
||||
|
||||
if (!author.empty())
|
||||
text += bformat(_("Change by %1$s\n\n"), author);
|
||||
text += bformat(lyx::to_utf8(_("Change by %1$s\n\n")), author);
|
||||
if (!date.empty())
|
||||
text += bformat(_("Change made at %1$s\n"), date);
|
||||
text += bformat(lyx::to_utf8(_("Change made at %1$s\n")), date);
|
||||
|
||||
dialog_->changeTV->setText(toqstr(text));
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ typedef QController<ControlCharacter, QView<QCharacterDialog> > base_class;
|
||||
|
||||
|
||||
QCharacter::QCharacter(Dialog & parent)
|
||||
: base_class(parent, _("Text Style"))
|
||||
: base_class(parent, lyx::to_utf8(_("Text Style")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ namespace frontend {
|
||||
typedef QController<ControlCitation, QView<QCitationDialog> > base_class;
|
||||
|
||||
QCitation::QCitation(Dialog & parent)
|
||||
: base_class(parent, _("Citation"))
|
||||
: base_class(parent, lyx::to_utf8(_("Citation")))
|
||||
{}
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ char const * encodings[] = { "LaTeX default", "latin1", "latin2",
|
||||
|
||||
|
||||
QDocument::QDocument(Dialog & parent)
|
||||
: base_class(parent, _("Document Settings")),
|
||||
: base_class(parent, lyx::to_utf8(_("Document Settings"))),
|
||||
lang_(getSecond(getLanguageData(false)))
|
||||
{}
|
||||
|
||||
@ -132,7 +132,7 @@ void QDocument::build_dialog()
|
||||
dialog_->latexModule->classCO->insertItem(toqstr(cit->description()));
|
||||
} else {
|
||||
string item =
|
||||
bformat(_("Unavailable: %1$s"), cit->description());
|
||||
bformat(lyx::to_utf8(_("Unavailable: %1$s")), cit->description());
|
||||
dialog_->latexModule->classCO->insertItem(toqstr(item));
|
||||
}
|
||||
}
|
||||
|
@ -77,20 +77,20 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
branchesModule = new BranchesModuleBase(this);
|
||||
preambleModule = new PreambleModuleBase(this);
|
||||
|
||||
docPS->addPanel(latexModule, _("Document Class"));
|
||||
docPS->addPanel(fontModule, _("Fonts"));
|
||||
docPS->addPanel(textLayoutModule, _("Text Layout"));
|
||||
docPS->addPanel(pageLayoutModule, _("Page Layout"));
|
||||
docPS->addPanel(marginsModule, _("Page Margins"));
|
||||
docPS->addPanel(langModule, _("Language"));
|
||||
docPS->addPanel(numberingModule, _("Numbering & TOC"));
|
||||
docPS->addPanel(biblioModule, _("Bibliography"));
|
||||
docPS->addPanel(mathsModule, _("Math Options"));
|
||||
docPS->addPanel(floatModule, _("Float Placement"));
|
||||
docPS->addPanel(bulletsModule, _("Bullets"));
|
||||
docPS->addPanel(branchesModule, _("Branches"));
|
||||
docPS->addPanel(preambleModule, _("LaTeX Preamble"));
|
||||
docPS->setCurrentPanel(_("Document Class"));
|
||||
docPS->addPanel(latexModule, lyx::to_utf8(_("Document Class")));
|
||||
docPS->addPanel(fontModule, lyx::to_utf8(_("Fonts")));
|
||||
docPS->addPanel(textLayoutModule, lyx::to_utf8(_("Text Layout")));
|
||||
docPS->addPanel(pageLayoutModule, lyx::to_utf8(_("Page Layout")));
|
||||
docPS->addPanel(marginsModule, lyx::to_utf8(_("Page Margins")));
|
||||
docPS->addPanel(langModule, lyx::to_utf8(_("Language")));
|
||||
docPS->addPanel(numberingModule, lyx::to_utf8(_("Numbering & TOC")));
|
||||
docPS->addPanel(biblioModule, lyx::to_utf8(_("Bibliography")));
|
||||
docPS->addPanel(mathsModule, lyx::to_utf8(_("Math Options")));
|
||||
docPS->addPanel(floatModule, lyx::to_utf8(_("Float Placement")));
|
||||
docPS->addPanel(bulletsModule, lyx::to_utf8(_("Bullets")));
|
||||
docPS->addPanel(branchesModule, lyx::to_utf8(_("Branches")));
|
||||
docPS->addPanel(preambleModule, lyx::to_utf8(_("LaTeX Preamble")));
|
||||
docPS->setCurrentPanel(lyx::to_utf8(_("Document Class")));
|
||||
|
||||
// preamble
|
||||
connect(preambleModule->preambleMLE, SIGNAL(textChanged()), this, SLOT(change_adaptor()));
|
||||
@ -225,7 +225,7 @@ QDocumentDialog::~QDocumentDialog()
|
||||
|
||||
void QDocumentDialog::showPreamble()
|
||||
{
|
||||
docPS->setCurrentPanel(_("LaTeX Preamble"));
|
||||
docPS->setCurrentPanel(lyx::to_utf8(_("LaTeX Preamble")));
|
||||
}
|
||||
|
||||
|
||||
@ -356,7 +356,7 @@ void QDocumentDialog::updateFontsize(string const & items, string const & sel)
|
||||
void QDocumentDialog::romanChanged(int item)
|
||||
{
|
||||
string const font = tex_fonts_roman[item];
|
||||
|
||||
|
||||
fontModule->fontScCB->setEnabled(
|
||||
form_->controller().providesSC(font));
|
||||
fontModule->fontOsfCB->setEnabled(
|
||||
@ -367,7 +367,7 @@ void QDocumentDialog::romanChanged(int item)
|
||||
void QDocumentDialog::sansChanged(int item)
|
||||
{
|
||||
string const font = tex_fonts_sans[item];
|
||||
|
||||
|
||||
fontModule->scaleSansSB->setEnabled(
|
||||
form_->controller().providesScale(font));
|
||||
}
|
||||
@ -376,7 +376,7 @@ void QDocumentDialog::sansChanged(int item)
|
||||
void QDocumentDialog::ttChanged(int item)
|
||||
{
|
||||
string const font = tex_fonts_monospaced[item];
|
||||
|
||||
|
||||
fontModule->scaleTypewriterSB->setEnabled(
|
||||
form_->controller().providesScale(font));
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ typedef QController<ControlERT, QView<QERTDialog> > base_class;
|
||||
|
||||
|
||||
QERT::QERT(Dialog & parent)
|
||||
: base_class(parent, _("TeX Code Settings"))
|
||||
: base_class(parent, lyx::to_utf8(_("TeX Code Settings")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,7 @@ void getExtra(external::ExtraData & data,
|
||||
typedef QController<ControlExternal, QView<QExternalDialog> > base_class;
|
||||
|
||||
QExternal::QExternal(Dialog & parent)
|
||||
: base_class(parent, _("External Material"))
|
||||
: base_class(parent, lyx::to_utf8(_("External Material")))
|
||||
{}
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ typedef QController<ControlFloat, QView<QFloatDialog> > base_class;
|
||||
|
||||
|
||||
QFloat::QFloat(Dialog & parent)
|
||||
: base_class(parent, _("Float Settings"))
|
||||
: base_class(parent, lyx::to_utf8(_("Float Settings")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ namespace frontend {
|
||||
typedef QController<ControlGraphics, QView<QGraphicsDialog> > base_class;
|
||||
|
||||
QGraphics::QGraphics(Dialog & parent)
|
||||
: base_class(parent, _("Graphics"))
|
||||
: base_class(parent, lyx::to_utf8(_("Graphics")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ typedef QController<ControlInclude, QView<QIncludeDialog> > base_class;
|
||||
|
||||
|
||||
QInclude::QInclude(Dialog & parent)
|
||||
: base_class(parent, _("Child Document"))
|
||||
: base_class(parent, lyx::to_utf8(_("Child Document")))
|
||||
{}
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ typedef QController<ControlMath, QView<QMathDialog> > math_base;
|
||||
|
||||
|
||||
QMath::QMath(Dialog & parent)
|
||||
: math_base(parent, _("Math Panel"))
|
||||
: math_base(parent, lyx::to_utf8(_("Math Panel")))
|
||||
{}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ typedef QController<ControlMath, QView<QMathMatrixDialog> > matrix_base;
|
||||
|
||||
|
||||
QMathMatrix::QMathMatrix(Dialog & parent)
|
||||
: matrix_base(parent, _("Math Matrix"))
|
||||
: matrix_base(parent, lyx::to_utf8(_("Math Matrix")))
|
||||
{}
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ typedef QController<ControlMath, QView<QDelimiterDialog> > delimiter_base;
|
||||
|
||||
|
||||
QMathDelimiter::QMathDelimiter(Dialog & parent)
|
||||
: delimiter_base(parent, _("Math Delimiter"))
|
||||
: delimiter_base(parent, lyx::to_utf8(_("Math Delimiter")))
|
||||
{}
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ typedef QController<ControlNote, QView<QNoteDialog> > base_class;
|
||||
|
||||
|
||||
QNote::QNote(Dialog & parent)
|
||||
: base_class(parent, _("Note Settings"))
|
||||
: base_class(parent, lyx::to_utf8(_("Note Settings")))
|
||||
{}
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ typedef QController<ControlParagraph, QView<QParagraphDialog> > base_class;
|
||||
|
||||
|
||||
QParagraph::QParagraph(Dialog & parent)
|
||||
: base_class(parent, _("Paragraph Settings"))
|
||||
: base_class(parent, lyx::to_utf8(_("Paragraph Settings")))
|
||||
{}
|
||||
|
||||
|
||||
@ -116,8 +116,8 @@ void QParagraph::update_contents()
|
||||
|
||||
// label width
|
||||
string const & labelwidth = params.labelWidthString();
|
||||
// _() is correct here (this is stupid though !)
|
||||
if (labelwidth != _("Senseless with this layout!")) {
|
||||
// lyx::to_utf8(_() is correct here (this is stupid though !))
|
||||
if (labelwidth != lyx::to_utf8(_("Senseless with this layout!"))) {
|
||||
dialog_->labelwidthGB->setEnabled(true);
|
||||
dialog_->labelWidth->setText(toqstr(labelwidth));
|
||||
} else {
|
||||
|
@ -78,7 +78,7 @@ namespace frontend {
|
||||
typedef QController<ControlPrefs, QView<QPrefsDialog> > base_class;
|
||||
|
||||
QPrefs::QPrefs(Dialog & parent)
|
||||
: base_class(parent, _("Preferences"))
|
||||
: base_class(parent, lyx::to_utf8(_("Preferences")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -93,36 +93,36 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
||||
uiModule = new QPrefUIModule(this);
|
||||
identityModule = new QPrefIdentityModule(this);
|
||||
|
||||
string const laf = _("Look and feel");
|
||||
string const laf = lyx::to_utf8(_("Look and feel"));
|
||||
prefsPS->addCategory(laf);
|
||||
prefsPS->addPanel(uiModule, _("User interface"), laf);
|
||||
prefsPS->addPanel(screenfontsModule, _("Screen fonts"), laf);
|
||||
prefsPS->addPanel(colorsModule, _("Colors"), laf);
|
||||
prefsPS->addPanel(displayModule, _("Graphics"), laf);
|
||||
prefsPS->addPanel(keyboardModule, _("Keyboard"), laf);
|
||||
prefsPS->addPanel(uiModule, lyx::to_utf8(_("User interface")), laf);
|
||||
prefsPS->addPanel(screenfontsModule, lyx::to_utf8(_("Screen fonts")), laf);
|
||||
prefsPS->addPanel(colorsModule, lyx::to_utf8(_("Colors")), laf);
|
||||
prefsPS->addPanel(displayModule, lyx::to_utf8(_("Graphics")), laf);
|
||||
prefsPS->addPanel(keyboardModule, lyx::to_utf8(_("Keyboard")), laf);
|
||||
|
||||
string const ls = _("Language settings");
|
||||
string const ls = lyx::to_utf8(_("Language settings"));
|
||||
prefsPS->addCategory(ls);
|
||||
prefsPS->addPanel(languageModule, _("Language"), ls);
|
||||
prefsPS->addPanel(spellcheckerModule, _("Spellchecker"), ls);
|
||||
prefsPS->addPanel(languageModule, lyx::to_utf8(_("Language")), ls);
|
||||
prefsPS->addPanel(spellcheckerModule, lyx::to_utf8(_("Spellchecker")), ls);
|
||||
|
||||
string const op = _("Outputs");
|
||||
string const op = lyx::to_utf8(_("Outputs"));
|
||||
prefsPS->addCategory(op);
|
||||
prefsPS->addPanel(asciiModule, _("Plain text"), op);
|
||||
prefsPS->addPanel(dateModule, _("Date format"), op);
|
||||
prefsPS->addPanel(latexModule, _("LaTeX"), op);
|
||||
prefsPS->addPanel(asciiModule, lyx::to_utf8(_("Plain text")), op);
|
||||
prefsPS->addPanel(dateModule, lyx::to_utf8(_("Date format")), op);
|
||||
prefsPS->addPanel(latexModule, lyx::to_utf8(_("LaTeX")), op);
|
||||
#if defined(__CYGWIN__) || defined(_WIN32)
|
||||
prefsPS->addPanel(cygwinpathModule, _("Paths"), op);
|
||||
prefsPS->addPanel(cygwinpathModule, lyx::to_utf8(_("Paths")), op);
|
||||
#endif
|
||||
prefsPS->addPanel(printerModule, _("Printer"), op);
|
||||
prefsPS->addPanel(printerModule, lyx::to_utf8(_("Printer")), op);
|
||||
|
||||
prefsPS->addPanel(identityModule, _("Identity"));
|
||||
prefsPS->addPanel(pathsModule, _("Paths"));
|
||||
prefsPS->addPanel(fileformatsModule, _("File formats"));
|
||||
prefsPS->addPanel(convertersModule, _("Converters"));
|
||||
prefsPS->addPanel(copiersModule, _("Copiers"));
|
||||
prefsPS->addPanel(identityModule, lyx::to_utf8(_("Identity")));
|
||||
prefsPS->addPanel(pathsModule, lyx::to_utf8(_("Paths")));
|
||||
prefsPS->addPanel(fileformatsModule, lyx::to_utf8(_("File formats")));
|
||||
prefsPS->addPanel(convertersModule, lyx::to_utf8(_("Converters")));
|
||||
prefsPS->addPanel(copiersModule, lyx::to_utf8(_("Copiers")));
|
||||
|
||||
prefsPS->setCurrentPanel(_("User interface"));
|
||||
prefsPS->setCurrentPanel(lyx::to_utf8(_("User interface")));
|
||||
|
||||
// FIXME: put in controller
|
||||
for (int i = 0; i < LColor::ignore; ++i) {
|
||||
@ -807,7 +807,7 @@ void QPrefsDialog::new_format()
|
||||
bool const document = fileformatsModule->documentCB->isChecked();
|
||||
|
||||
form_->formats().add(name, extension, prettyname, shortcut, viewer,
|
||||
editor, document);
|
||||
editor, document);
|
||||
form_->formats().sort();
|
||||
updateFormats();
|
||||
fileformatsModule->formatsLB->setCurrentItem(form_->formats().getNumber(name));
|
||||
@ -838,7 +838,7 @@ void QPrefsDialog::modify_format()
|
||||
bool const document = fileformatsModule->documentCB->isChecked();
|
||||
|
||||
form_->formats().add(name, extension, prettyname, shortcut, viewer,
|
||||
editor, document);
|
||||
editor, document);
|
||||
form_->formats().sort();
|
||||
|
||||
fileformatsModule->formatsLB->setUpdatesEnabled(false);
|
||||
@ -863,9 +863,9 @@ void QPrefsDialog::remove_format()
|
||||
return;
|
||||
string const current_text = form_->formats().get(nr).name();
|
||||
if (form_->converters().formatIsUsed(current_text)) {
|
||||
Alert::error(_("Format in use"),
|
||||
_("Cannot remove a Format used by a Converter. "
|
||||
"Remove the converter first."));
|
||||
Alert::error(lyx::to_utf8(_("Format in use")),
|
||||
lyx::to_utf8(_("Cannot remove a Format used by a Converter. "
|
||||
"Remove the converter first.")));
|
||||
return;
|
||||
}
|
||||
form_->formats().erase(current_text);
|
||||
@ -933,11 +933,11 @@ void QPrefsDialog::select_dict()
|
||||
}
|
||||
|
||||
|
||||
// NB: the _() is OK here because it gets passed back and we toqstr() them
|
||||
// NB: the lyx::to_utf8(_() is OK here because it gets passed back and we toqstr()) them
|
||||
|
||||
void QPrefsDialog::select_templatedir()
|
||||
{
|
||||
string file(form_->controller().browsedir(fromqstr(pathsModule->templateDirED->text()), _("Select a document templates directory")));
|
||||
string file(form_->controller().browsedir(fromqstr(pathsModule->templateDirED->text()), lyx::to_utf8(_("Select a document templates directory"))));
|
||||
if (!file.empty())
|
||||
pathsModule->templateDirED->setText(toqstr(file));
|
||||
}
|
||||
@ -945,7 +945,7 @@ void QPrefsDialog::select_templatedir()
|
||||
|
||||
void QPrefsDialog::select_tempdir()
|
||||
{
|
||||
string file(form_->controller().browsedir(fromqstr(pathsModule->tempDirED->text()), _("Select a temporary directory")));
|
||||
string file(form_->controller().browsedir(fromqstr(pathsModule->tempDirED->text()), lyx::to_utf8(_("Select a temporary directory"))));
|
||||
if (!file.empty())
|
||||
pathsModule->tempDirED->setText(toqstr(file));
|
||||
}
|
||||
@ -953,7 +953,7 @@ void QPrefsDialog::select_tempdir()
|
||||
|
||||
void QPrefsDialog::select_backupdir()
|
||||
{
|
||||
string file(form_->controller().browsedir(fromqstr(pathsModule->backupDirED->text()), _("Select a backups directory")));
|
||||
string file(form_->controller().browsedir(fromqstr(pathsModule->backupDirED->text()), lyx::to_utf8(_("Select a backups directory"))));
|
||||
if (!file.empty())
|
||||
pathsModule->backupDirED->setText(toqstr(file));
|
||||
}
|
||||
@ -961,7 +961,7 @@ void QPrefsDialog::select_backupdir()
|
||||
|
||||
void QPrefsDialog::select_workingdir()
|
||||
{
|
||||
string file(form_->controller().browsedir(fromqstr(pathsModule->workingDirED->text()), _("Select a document directory")));
|
||||
string file(form_->controller().browsedir(fromqstr(pathsModule->workingDirED->text()), lyx::to_utf8(_("Select a document directory"))));
|
||||
if (!file.empty())
|
||||
pathsModule->workingDirED->setText(toqstr(file));
|
||||
}
|
||||
@ -969,7 +969,7 @@ void QPrefsDialog::select_workingdir()
|
||||
|
||||
void QPrefsDialog::select_lyxpipe()
|
||||
{
|
||||
string file(form_->controller().browse(fromqstr(pathsModule->lyxserverDirED->text()), _("Give a filename for the LyX server pipe")));
|
||||
string file(form_->controller().browse(fromqstr(pathsModule->lyxserverDirED->text()), lyx::to_utf8(_("Give a filename for the LyX server pipe"))));
|
||||
if (!file.empty())
|
||||
pathsModule->lyxserverDirED->setText(toqstr(file));
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ typedef QController<ControlPrint, QView<QLPrintDialog> > base_class;
|
||||
|
||||
|
||||
QPrint::QPrint(Dialog & parent)
|
||||
: base_class(parent, _("Print Document"))
|
||||
: base_class(parent, lyx::to_utf8(_("Print Document")))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ typedef QController<ControlRef, QView<QRefDialog> > base_class;
|
||||
|
||||
|
||||
QRef::QRef(Dialog & parent)
|
||||
: base_class(parent, _("Cross-reference")),
|
||||
: base_class(parent, lyx::to_utf8(_("Cross-reference"))),
|
||||
sort_(false), at_ref_(false)
|
||||
{
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user