]> git.lyx.org Git - features.git/commitdiff
Make things a little better with respect to bug #8587.
authorRichard Heck <rgheck@lyx.org>
Mon, 18 Mar 2013 23:47:17 +0000 (19:47 -0400)
committerRichard Heck <rgheck@lyx.org>
Mon, 18 Mar 2013 23:47:17 +0000 (19:47 -0400)
Is it possible to figure out the current language from within
an InsetRef? If so, how?

src/insets/InsetRef.cpp

index 42e7fabe1a69074e8c8a3650e7940db0d372bd5c..9bfb3d488c03806ef6a7b9baf1b5e076b521712e 100644 (file)
@@ -222,8 +222,10 @@ docstring InsetRef::xhtml(XHTMLStream & xs, OutputParams const &) const
                        // normally, would be "ref on page #", but we have no pages
                        display_string = value;
                else if (cmd == "pageref" || cmd == "vpageref")
-                       // normally would be "on page #", but we have no pages
-                       display_string = _("elsewhere");
+                       // normally would be "on page #", but we have no pages.
+                       // FIXME this is wrong, as it should be the current language,
+                       // but it is better than _(), which is what we had before.
+                       display_string = buffer().B_("elsewhere");
                else if (cmd == "eqref")
                        display_string = '(' + value + ')';
                else if (cmd == "formatted")