Add some extra strings for the toolbar in en.ini

This commit is contained in:
David Capello 2018-03-28 11:43:35 -03:00
parent 91bc5c2845
commit 8d9c3c7c11
2 changed files with 11 additions and 5 deletions

View File

@ -1200,6 +1200,9 @@ contour = Contour Tool
polygon = Polygon Tool polygon = Polygon Tool
blur = Blur Tool blur = Blur Tool
jumble = Jumble Tool jumble = Jumble Tool
shortcut = Shortcut: {0}
preview_hide = Hide Preview
preview_show = Show Preview
[undo_history] [undo_history]
title = Undo History title = Undo History

View File

@ -1,5 +1,5 @@
// Aseprite // Aseprite
// Copyright (C) 2001-2017 David Capello // Copyright (C) 2001-2018 David Capello
// //
// This program is distributed under the terms of // This program is distributed under the terms of
// the End-User License Agreement for Aseprite. // the End-User License Agreement for Aseprite.
@ -13,6 +13,7 @@
#include "app/app.h" #include "app/app.h"
#include "app/commands/command.h" #include "app/commands/command.h"
#include "app/commands/commands.h" #include "app/commands/commands.h"
#include "app/i18n/strings.h"
#include "app/modules/editors.h" #include "app/modules/editors.h"
#include "app/modules/gfx.h" #include "app/modules/gfx.h"
#include "app/tools/active_tool.h" #include "app/tools/active_tool.h"
@ -24,6 +25,7 @@
#include "app/ui/status_bar.h" #include "app/ui/status_bar.h"
#include "app/ui_context.h" #include "app/ui_context.h"
#include "base/bind.h" #include "base/bind.h"
#include "fmt/format.h"
#include "gfx/size.h" #include "gfx/size.h"
#include "obs/signal.h" #include "obs/signal.h"
#include "she/surface.h" #include "she/surface.h"
@ -506,15 +508,16 @@ void ToolBar::openTipWindow(int group_index, Tool* tool)
// Tool shortcut // Tool shortcut
Key* key = KeyboardShortcuts::instance()->tool(tool); Key* key = KeyboardShortcuts::instance()->tool(tool);
if (key && !key->accels().empty()) { if (key && !key->accels().empty()) {
tooltip += "\n\nShortcut: "; tooltip += "\n\n";
tooltip += key->accels().front().toString(); tooltip += fmt::format(Strings::tools_shortcut(),
key->accels().front().toString());
} }
} }
else if (group_index == PreviewVisibilityIndex) { else if (group_index == PreviewVisibilityIndex) {
if (App::instance()->mainWindow()->getPreviewEditor()->isPreviewEnabled()) if (App::instance()->mainWindow()->getPreviewEditor()->isPreviewEnabled())
tooltip = "Hide Preview"; tooltip = Strings::tools_preview_hide();
else else
tooltip = "Show Preview"; tooltip = Strings::tools_preview_show();
} }
else else
return; return;