mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Fix display of page references when language is not specified
Using translateIfPossible with null language does not make sense (and
gives an error on console).
Using translateIfPossible there actually does not make sense at all: it
is only for string from layout files that may already be translated.
We use the GUI language when no language has been specified (this is
different and probably safer than what is done in master).
A consequence of the commit is that "elsewhere" will be in the po
files and now really translatable ;)
(cherry picked from commit 6f6d9b631d
)
This commit is contained in:
parent
4b9e1d8b09
commit
f64349db8d
@ -32,6 +32,7 @@
|
||||
#include "support/docstream.h"
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/Messages.h"
|
||||
#include "support/textutils.h"
|
||||
|
||||
using namespace lyx::support;
|
||||
@ -399,8 +400,8 @@ docstring InsetRef::displayString(docstring const & ref, string const & cmd,
|
||||
display_string = value;
|
||||
else if (cmd == "pageref" || cmd == "vpageref") {
|
||||
// normally would be "on page #", but we have no pages.
|
||||
display_string =
|
||||
translateIfPossible(from_ascii("elsewhere"), language);
|
||||
display_string = language.empty() ? _("elsewhere")
|
||||
: getMessages(language).get("elsewhere");
|
||||
} else if (cmd == "eqref")
|
||||
display_string = '(' + value + ')';
|
||||
else if (cmd == "formatted") {
|
||||
|
Loading…
Reference in New Issue
Block a user