(empty log message)
@@ -81,7 +81,7 @@ | ||
81 | 81 | viewer.setSelection(new StructuredSelection(registDb), true); |
82 | 82 | } |
83 | 83 | } catch (SameDbNameException e) { |
84 | - config.setDbName(config.getDbName() + Messages.getString("ImpDBConfigWizard.0")); //$NON-NLS-1$ | |
84 | + config.setDbName(Messages.getFormattedString("ImpDBConfigWizard.0", new Object[]{config.getDbName()})); //$NON-NLS-1$ | |
85 | 85 | saveDBConfig(config); |
86 | 86 | } |
87 | 87 | } |
@@ -5,6 +5,7 @@ | ||
5 | 5 | */ |
6 | 6 | package zigen.plugin.db.ui.wizard; |
7 | 7 | |
8 | +import java.text.MessageFormat; | |
8 | 9 | import java.util.MissingResourceException; |
9 | 10 | import java.util.ResourceBundle; |
10 | 11 |
@@ -23,4 +24,14 @@ | ||
23 | 24 | return '!' + key + '!'; |
24 | 25 | } |
25 | 26 | } |
27 | + | |
28 | + public static String getFormattedString(String key, Object[] args) { | |
29 | + try { | |
30 | + String str = RESOURCE_BUNDLE.getString(key); | |
31 | + return MessageFormat.format(str, args); | |
32 | + } catch (MissingResourceException e) { | |
33 | + return '!' + key + '!'; | |
34 | + } | |
35 | + } | |
36 | + | |
26 | 37 | } |
@@ -99,7 +99,7 @@ | ||
99 | 99 | |
100 | 100 | private boolean confirmOverwrite(Shell shell, String fileName) { |
101 | 101 | MessageBox msg = new MessageBox(shell, SWT.YES | SWT.NO | SWT.ICON_QUESTION); |
102 | - msg.setMessage(Messages.getString("ExpDBConfigWizard.6") + fileName + Messages.getString("ExpDBConfigWizard.7")); //$NON-NLS-1$ //$NON-NLS-2$ | |
102 | + msg.setMessage(Messages.getFormattedString("ExpDBConfigWizard.6", new Object[]{fileName})); //$NON-NLS-1$ | |
103 | 103 | msg.setText(Messages.getString("ExpDBConfigWizard.8")); //$NON-NLS-1$ |
104 | 104 | int res = msg.open(); |
105 | 105 | if (res == SWT.YES) { |