mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
l10n work:
* src/Buffer.cpp: - make view-source string translatable * src/frontends/controllers/ControlToc.h: - make getGuiName public * src/frontends/qt4/TocWidget.cpp: - use getGuiName for the combo. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18505 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1d99202d88
commit
ce3eeaea1c
@ -3,7 +3,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Lars Gullik Bjønnes
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
@ -1739,7 +1739,7 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
|
||||
runparams.dryrun = true;
|
||||
|
||||
if (full_source) {
|
||||
os << "% Preview source code\n\n";
|
||||
os << "% " << _("Preview source code") << "\n\n";
|
||||
if (isLatex())
|
||||
writeLaTeXSource(os, filePath(), runparams, true, true);
|
||||
else {
|
||||
@ -1749,10 +1749,15 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
|
||||
runparams.par_begin = par_begin;
|
||||
runparams.par_end = par_end;
|
||||
if (par_begin + 1 == par_end)
|
||||
os << "% Preview source code for paragraph " << par_begin << "\n\n";
|
||||
os << "% "
|
||||
<< bformat(_("Preview source code for paragraph %1$s"), par_begin)
|
||||
<< "\n\n";
|
||||
else
|
||||
os << "% Preview source code from paragraph " << par_begin
|
||||
<< " to " << par_end - 1 << "\n\n";
|
||||
os << "% "
|
||||
<< bformat(_("Preview source code from paragraph %1$s to %2$s"),
|
||||
convert<docstring>(par_begin),
|
||||
convert<docstring>(par_end - 1))
|
||||
<< "\n\n";
|
||||
// output paragraphs
|
||||
if (isLatex()) {
|
||||
texrow().reset();
|
||||
|
@ -44,6 +44,9 @@ public:
|
||||
std::vector<docstring> const & typeNames() const
|
||||
{ return type_names_; }
|
||||
|
||||
/// Return the guiname from a given cmdName of the TOC param
|
||||
docstring const getGuiName(std::string const & type) const;
|
||||
|
||||
///
|
||||
int selectedType() { return selected_type_; }
|
||||
|
||||
@ -64,9 +67,6 @@ public:
|
||||
void updateBackend();
|
||||
|
||||
private:
|
||||
/// Return the guiname from a given cmdName of the TOC param
|
||||
docstring const getGuiName(std::string const & type) const;
|
||||
|
||||
std::vector<std::string> types_;
|
||||
std::vector<docstring> type_names_;
|
||||
int selected_type_;
|
||||
|
@ -249,12 +249,13 @@ void TocWidget::updateGui()
|
||||
}
|
||||
|
||||
QString current_text = typeCO->currentText();
|
||||
lyxerr << "current_text " << fromqstr(current_text) << endl;
|
||||
//lyxerr << "current_text " << fromqstr(current_text) << endl;
|
||||
typeCO->blockSignals(true);
|
||||
typeCO->clear();
|
||||
int current_type = -1;
|
||||
for (size_t i = 0; i != type_names.size(); ++i) {
|
||||
QString item = toqstr(type_names[i]);
|
||||
QString item =
|
||||
toqstr(form_->getGuiName(to_utf8(type_names[i])));
|
||||
typeCO->addItem(item);
|
||||
if (item == current_text)
|
||||
current_type = i;
|
||||
|
Loading…
Reference in New Issue
Block a user