]> git.lyx.org Git - features.git/commitdiff
Use localized length strings also in space label/tooltip
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 9 Aug 2022 15:28:41 +0000 (17:28 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 9 Aug 2022 15:28:41 +0000 (17:28 +0200)
src/VSpace.cpp
src/insets/InsetSpace.cpp

index 66e3a6c7c91753a435b39b1b877dbcc564c34d13..50fc2e50a7455d73cb466d2ecd725d1b583f355e 100644 (file)
@@ -21,6 +21,7 @@
 #include "support/convert.h"
 #include "support/Length.h"
 #include "support/lstrings.h"
+#include "support/qstring_helpers.h"
 
 #include "support/lassert.h"
 
@@ -207,7 +208,7 @@ docstring const VSpace::asGUIName() const
                result = _("Vertical fill");
                break;
        case LENGTH:
-               result = from_ascii(len_.asString());
+               result = locLengthDocString(from_ascii(len_.asString()));
                break;
        }
        if (keep_)
index 86c867042064d884765d5961eb01c074b493be3d..3f86eb8c074cf1c1775b6ca50c920d72e3fa85fc 100644 (file)
@@ -33,6 +33,7 @@
 #include "support/lassert.h"
 #include "support/Length.h"
 #include "support/lstrings.h"
+#include "support/qstring_helpers.h"
 
 #include "frontends/Application.h"
 #include "frontends/FontMetrics.h"
@@ -130,12 +131,12 @@ docstring InsetSpace::toolTip(BufferView const &, int, int) const
        case InsetSpaceParams::CUSTOM:
                // FIXME unicode
                message = support::bformat(_("Horizontal Space (%1$s)"),
-                               from_ascii(params_.length.asString()));
+                                          locLengthDocString(from_ascii(params_.length.asString())));
                break;
        case InsetSpaceParams::CUSTOM_PROTECTED:
                // FIXME unicode
                message = support::bformat(_("Non-Breaking Horizontal Space (%1$s)"),
-                               from_ascii(params_.length.asString()));
+                                          locLengthDocString(from_ascii(params_.length.asString())));
                break;
        }
        return message;