提交 b170eff7 编写于 作者: L liuyuanyuan

Add i18n and l10n for undo and redo。

上级 1d379f25
......@@ -1241,5 +1241,9 @@ obj_editor_properties_control_action_configure_columns = \u914D\u7F6E\u5B57\u6BB
obj_editor_properties_control_action_configure_columns_description = \u914D\u7F6E\u5B57\u6BB5\u53EF\u89C1\u6027
## object properties editor ##
##toolbar editor menu item##
toolbar_cmd_undo_name = \u64A4\u9500
toolbar_cmd_redo_name = \u91CD\u505A
##toolbar editor menu item##
......@@ -1337,7 +1337,10 @@ public class CoreMessages extends NLS {
public static String obj_editor_properties_control_action_configure_columns_description;
//object properties editor
//toolbar editor menu item
public static String toolbar_cmd_undo_name;
public static String toolbar_cmd_redo_name;
//toolbar editor menu item
static {
// initialize resource bundle
......
......@@ -1295,6 +1295,10 @@ obj_editor_properties_control_action_configure_columns = Configure columns
obj_editor_properties_control_action_configure_columns_description = Configure columns visibility
## object properties editor ##
##toolbar editor menu item##
toolbar_cmd_undo_name = Undo
toolbar_cmd_redo_name = Redo
##toolbar editor menu item##
......@@ -24,6 +24,7 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.commands.IElementUpdater;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.menus.UIElement;
import org.jkiss.dbeaver.core.CoreMessages;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.ui.editors.entity.EntityEditor;
import org.jkiss.dbeaver.utils.RuntimeUtils;
......@@ -54,7 +55,7 @@ public class RedoChangesHandler extends AbstractHandler implements IElementUpdat
final IEditorPart activeEditor = workbenchWindow.getActivePage().getActiveEditor();
if (activeEditor instanceof EntityEditor) {
final DBECommandContext commandContext = ((EntityEditor) activeEditor).getCommandContext();
String text = "Redo";
String text = CoreMessages.toolbar_cmd_redo_name;
if (commandContext != null && commandContext.getRedoCommand() != null) {
text += " " + commandContext.getRedoCommand().getTitle();
}
......
......@@ -24,6 +24,7 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.commands.IElementUpdater;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.menus.UIElement;
import org.jkiss.dbeaver.core.CoreMessages;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.ui.editors.entity.EntityEditor;
import org.jkiss.dbeaver.utils.RuntimeUtils;
......@@ -54,7 +55,7 @@ public class UndoChangesHandler extends AbstractHandler implements IElementUpdat
final IEditorPart activeEditor = workbenchWindow.getActivePage().getActiveEditor();
if (activeEditor instanceof EntityEditor) {
final DBECommandContext commandContext = ((EntityEditor) activeEditor).getCommandContext();
String text = "Undo";
String text = CoreMessages.toolbar_cmd_undo_name;
if (commandContext != null && commandContext.getUndoCommand() != null) {
text += " " + commandContext.getUndoCommand().getTitle();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册