提交 37fed3ae 编写于 作者: A Alexander Fedorov

#2556 i18n for pg.debug.core

Former-commit-id: 6b0504bb
上级 4b54990e
......@@ -33,6 +33,7 @@ import org.jkiss.dbeaver.ext.postgresql.model.PostgreProcedure;
import org.jkiss.dbeaver.ext.postgresql.model.PostgreSchema;
import org.jkiss.dbeaver.model.DBPDataSourceContainer;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.dbeaver.postgresql.internal.debug.core.PostgreSqlDebugCoreMessages;
public class PostgreSqlDebugCore {
......@@ -66,7 +67,7 @@ public class PostgreSqlDebugCore {
throws CoreException {
boolean isInstance = launchable instanceof PostgreProcedure;
if (!isInstance) {
throw PostgreSqlDebugCore.abort("PostgreSQL procedure is required to create PL/pgSQL launch configuration");
throw PostgreSqlDebugCore.abort(PostgreSqlDebugCoreMessages.PostgreSqlDebugCore_e_procedure_required);
}
PostgreProcedure procedure = (PostgreProcedure) launchable;
PostgreDataSource dataSource = procedure.getDataSource();
......@@ -77,7 +78,7 @@ public class PostgreSqlDebugCore {
String databaseName = database.getName();
Object[] bindings = new Object[] {dataSourceContainer.getName(), databaseName,
procedure.getName(), schema.getName()};
String name = NLS.bind("{0}({1}) - {2}({3})", bindings);
String name = NLS.bind(PostgreSqlDebugCoreMessages.PostgreSqlDebugCore_launch_configuration_name, bindings);
//Let's use metadata area for storage
IContainer container = null;
ILaunchConfigurationWorkingCopy workingCopy = createConfiguration(container, name);
......
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
* Copyright (C) 2017 Alexander Fedorov (alexander.fedorov@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.postgresql.internal.debug.core;
import org.eclipse.osgi.util.NLS;
public class PostgreSqlDebugCoreMessages extends NLS {
private static final String BUNDLE_NAME = "org.jkiss.dbeaver.postgresql.internal.debug.core.PostgreSqlDebugCoreMessages"; //$NON-NLS-1$
public static String PostgreSqlDebugCore_e_procedure_required;
public static String PostgreSqlDebugCore_launch_configuration_name;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, PostgreSqlDebugCoreMessages.class);
}
private PostgreSqlDebugCoreMessages()
{
}
}
PostgreSqlDebugCore_e_procedure_required=PostgreSQL procedure is required to create PL/pgSQL launch configuration
PostgreSqlDebugCore_launch_configuration_name={0}({1}) - {2}({3})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册