Skip to content

Commit 420506f

Browse files
committed
I18N for Profiling, Profiler, Sampler
1 parent 6c5bf31 commit 420506f

File tree

12 files changed

+74
-39
lines changed

12 files changed

+74
-39
lines changed

visualvm/profiler/src/com/sun/tools/visualvm/profiler/JDBCLivePanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected void popupHidden() {
190190
}
191191

192192
protected ProfilerClient getProfilerClient() {
193-
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
193+
throw new UnsupportedOperationException("Not supported yet."); // NOI18N
194194
}
195195

196196
protected void showSQLQuery(String query, String htmlQuery) {

visualvm/profiling/src/com/sun/tools/visualvm/profiling/presets/Bundle.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,12 @@ HINT_Define_roots=<define classes to be profiled>
149149

150150
CAPTION_DeletedRestart=Calibration Data Reset
151151
MSG_DeletedRestart=<html><b>Restart VisualVM?</b><br><br>Calibration data successfully reset. Do you want to restart<br>VisualVM now to perform a new calibration?</html>
152+
153+
ProfilerMemoryPanel_TOOLTIP_Filter=<html>Profile these classes:<br><br><code>&nbsp;org.mypackage.**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>all classes in package and subpackages<br><code>&nbsp;org.mypackage.*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>all classes in package<br><code>&nbsp;org.mypackage.MyClass&nbsp;&nbsp;</code>single class<br><br>Special cases:<br><br><code>&nbsp;char[]&nbsp;&nbsp;</code>primitive array<br><code>&nbsp;*&nbsp;or&nbsp;**&nbsp;</code>all classes<br><code>&nbsp;[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(on a separate line) include arrays matching the filter<br></html>
154+
ProfilerMemoryPanel_BTN_Track_live=Track only live objects
155+
ProfilerMemoryPanel_TOOLTIP_Track_live=Unselect to profile all created objects (including those already released from the heap)
156+
ProfilerMemoryPanel_BTN_Limit_alloc=Limit allocations depth\:
157+
ProfilerMemoryPanel_TOOLTIP_Limit_alloc=Unselect to collect full depth allocations call tree
158+
ProfilerMemoryPanel_TOOLTIP_Limit_alloc2=Limit depth of allocations call tree (select 0 for no allocation calls)
159+
ProfilerMemoryPanel_LBL_unlimited=unlimited
160+
ProfilerMemoryPanel_LBL_No_alloc=(no allocation calls)

visualvm/profiling/src/com/sun/tools/visualvm/profiling/presets/ProfilerCPUPanel.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ private void initComponents(boolean mnemonics) {
198198
GridBagConstraints constraints;
199199

200200
rootClassesLabel = new JLabel();
201-
setText(rootClassesLabel, NbBundle.getMessage(ProfilerCPUSettings.class,
202-
"LBL_Root_Classes"), mnemonics);
201+
setText(rootClassesLabel, NbBundle.getMessage(ProfilerCPUSettings.class, "LBL_Root_Classes"), mnemonics); // NOI18N
203202
Dimension d = rootClassesLabel.getPreferredSize();
204203
JRadioButton refRadion = new JRadioButton(NbBundle.getMessage(ProfilerCPUSettings.class, "LBL_Root_Classes")); // NOI18N
205204
refRadion.setBorder(rootClassesLabel.getBorder());

visualvm/profiling/src/com/sun/tools/visualvm/profiling/presets/ProfilerJDBCPanel.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ private void initComponents(boolean mnemonics) {
140140
GridBagConstraints constraints;
141141

142142
filterLabel = new JLabel();
143-
setText(filterLabel, NbBundle.getMessage(ProfilerCPUSettings.class,
144-
"LBL_Query_Filter"), mnemonics);
143+
setText(filterLabel, NbBundle.getMessage(ProfilerCPUSettings.class, "LBL_Query_Filter"), mnemonics); // NOI18N
145144
Dimension d = filterLabel.getPreferredSize();
146145
JRadioButton refRadion = new JRadioButton(NbBundle.getMessage(ProfilerCPUSettings.class, "LBL_Root_Classes")); // NOI18N
147146
refRadion.setBorder(filterLabel.getBorder());

visualvm/profiling/src/com/sun/tools/visualvm/profiling/presets/ProfilerMemoryPanel.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ private void initComponents(boolean mnemonics) {
177177
GridBagConstraints constraints;
178178

179179
JLabel filtersLabel = new JLabel();
180-
setText(filtersLabel, NbBundle.getMessage(ProfilerCPUSettings.class,
181-
"LBL_Root_Classes"), mnemonics);
180+
setText(filtersLabel, NbBundle.getMessage(ProfilerCPUSettings.class, "LBL_Root_Classes"), mnemonics); // NOI18N
182181
Dimension d = filtersLabel.getPreferredSize();
183182
JRadioButton refRadion = new JRadioButton(NbBundle.getMessage(ProfilerCPUSettings.class, "LBL_Root_Classes")); // NOI18N
184183
refRadion.setBorder(filtersLabel.getBorder());
@@ -197,7 +196,7 @@ private void initComponents(boolean mnemonics) {
197196

198197
filtersArea = createTextArea(2);
199198
filtersLabel.setLabelFor(filtersArea.getTextArea());
200-
filtersArea.getTextArea().setToolTipText("<html>Profile these classes:<br><br><code>&nbsp;org.mypackage.**&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>all classes in package and subpackages<br><code>&nbsp;org.mypackage.*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>all classes in package<br><code>&nbsp;org.mypackage.MyClass&nbsp;&nbsp;</code>single class<br><br>Special cases:<br><br><code>&nbsp;char[]&nbsp;&nbsp;</code>primitive array<br><code>&nbsp;*&nbsp;or&nbsp;**&nbsp;</code>all classes<br><code>&nbsp;[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>(on a separate line) include arrays matching the filter<br></html>");
199+
filtersArea.getTextArea().setToolTipText(NbBundle.getMessage(ProfilerMemoryPanel.class, "ProfilerMemoryPanel_TOOLTIP_Filter")); // NOI18N
201200
filtersArea.getTextArea().getDocument().addDocumentListener(new DocumentListener() {
202201
public void insertUpdate(DocumentEvent e) { checkRootValidity(); syncUI(); }
203202
public void removeUpdate(DocumentEvent e) { checkRootValidity(); syncUI(); }
@@ -215,13 +214,13 @@ private void initComponents(boolean mnemonics) {
215214
add(filtersArea, constraints);
216215

217216

218-
lifecycleCheckbox = new JCheckBox("Track only live objects") {
217+
lifecycleCheckbox = new JCheckBox(NbBundle.getMessage(ProfilerMemoryPanel.class, "ProfilerMemoryPanel_BTN_Track_live")) { // NOI18N
219218
protected void fireActionPerformed(ActionEvent e) {
220219
super.fireActionPerformed(e);
221220
syncUI();
222221
}
223222
};
224-
lifecycleCheckbox.setToolTipText("Unselect to profile all created objects (including those already released from the heap)");
223+
lifecycleCheckbox.setToolTipText(NbBundle.getMessage(ProfilerMemoryPanel.class, "ProfilerMemoryPanel_TOOLTIP_Track_live")); // NOI18N
225224
lifecycleCheckbox.setOpaque(false);
226225
constraints = new GridBagConstraints();
227226
constraints.gridx = 0;
@@ -232,14 +231,14 @@ protected void fireActionPerformed(ActionEvent e) {
232231
constraints.insets = new Insets(5, 10, 0, 5);
233232
add(lifecycleCheckbox, constraints);
234233

235-
outgoingCheckbox = new JCheckBox("Limit allocations depth:") {
234+
outgoingCheckbox = new JCheckBox(NbBundle.getMessage(ProfilerMemoryPanel.class, "ProfilerMemoryPanel_BTN_Limit_alloc")) { // NOI18N
236235
protected void fireActionPerformed(ActionEvent e) {
237236
super.fireActionPerformed(e);
238237
updateAllocControls();
239238
syncUI();
240239
}
241240
};
242-
outgoingCheckbox.setToolTipText("Unselect to collect full depth allocations call tree");
241+
outgoingCheckbox.setToolTipText(NbBundle.getMessage(ProfilerMemoryPanel.class, "ProfilerMemoryPanel_TOOLTIP_Limit_alloc")); // NOI18N
243242
outgoingCheckbox.setOpaque(false);
244243
constraints = new GridBagConstraints();
245244
constraints.gridx = 0;
@@ -255,7 +254,7 @@ protected void fireActionPerformed(ActionEvent e) {
255254
public Dimension getMaximumSize() { return getMinimumSize(); }
256255
protected void fireStateChanged() { updateAllocControls(); syncUI(); super.fireStateChanged(); }
257256
};
258-
outgoingSpinner.setToolTipText("Limit depth of allocations call tree (select 0 for no allocation calls)");
257+
outgoingSpinner.setToolTipText(NbBundle.getMessage(ProfilerMemoryPanel.class, "ProfilerMemoryPanel_TOOLTIP_Limit_alloc2")); // NOI18N
259258
JComponent editor = outgoingSpinner.getEditor();
260259
JTextField field = editor instanceof JSpinner.DefaultEditor ?
261260
((JSpinner.DefaultEditor)editor).getTextField() : null;
@@ -283,7 +282,7 @@ public void run() {
283282
constraints.insets = new Insets(5, 0, 5, 5);
284283
add(outgoingSpinner, constraints);
285284

286-
unlimited = new GrayLabel("unlimited");
285+
unlimited = new GrayLabel(NbBundle.getMessage(ProfilerMemoryPanel.class, "ProfilerMemoryPanel_LBL_unlimited")); // NOI18N
287286
constraints = new GridBagConstraints();
288287
constraints.gridx = 2;
289288
constraints.gridy = 4;
@@ -293,7 +292,7 @@ public void run() {
293292
constraints.insets = new Insets(5, 0, 5, 5);
294293
add(unlimited, constraints);
295294

296-
noAllocs = new GrayLabel("(no allocation calls)");
295+
noAllocs = new GrayLabel(NbBundle.getMessage(ProfilerMemoryPanel.class, "ProfilerMemoryPanel_LBL_No_alloc")); // NOI18N
297296
constraints = new GridBagConstraints();
298297
constraints.gridx = 3;
299298
constraints.gridy = 4;

visualvm/profiling/src/com/sun/tools/visualvm/profiling/presets/SamplerMemoryPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private void initComponents(boolean mnemonics) {
115115

116116
refreshRateLabel = new JLabel();
117117
setText(refreshRateLabel, NbBundle.getMessage(SamplerMemoryPanel.class,
118-
"LBL_Sampling_refresh"), mnemonics);
118+
"LBL_Sampling_refresh"), mnemonics); // NOI18N
119119
refreshRateLabel.setToolTipText(NbBundle.getMessage(SamplerMemoryPanel.class,
120120
"TOOLTIP_Sampling_refresh")); // NOI18N
121121
constraints = new GridBagConstraints();

visualvm/sampler/src/com/sun/tools/visualvm/sampler/cpu/Bundle.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ LBL_Thread_filter=Thread Name Filter
6666

6767
LBL_CPUTime=<b>Total CPU Time [ms]: </b>{0}
6868

69+
ThreadsCPUView_TOOLTIP_Col_name=Thread name
70+
ThreadsCPUView_TOOLTIP_Col_time=Total thread CPU time
71+
ThreadsCPUView_TOOLTIP_Col_timesec=Thread CPU time in last 1 second
72+
ThreadsCPUView_LBL_Statistics=Statistics\:
73+
ThreadsCPUView_LBL_TCount=Threads Count\:
74+
ThreadsCPUView_LBL_Total_time=Total Time (CPU)\:

visualvm/sampler/src/com/sun/tools/visualvm/sampler/cpu/FlatProfilerContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,6 @@ public double getWholeGraphNetTime1() {
9696

9797
@Override
9898
public ClientUtils.SourceCodeSelection getSourceCodeSelectionAtRow(int i) {
99-
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
99+
throw new UnsupportedOperationException("Not supported yet."); // NOI18N
100100
}
101101
}

visualvm/sampler/src/com/sun/tools/visualvm/sampler/cpu/ThreadsCPUView.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ protected void popupHidden() {
230230
}
231231
};
232232

233-
table.setColumnToolTips(new String[] { "Thread name", "Total thread CPU time", "Thread CPU time in last 1 second" });
233+
table.setColumnToolTips(new String[] { NbBundle.getMessage(ThreadsCPUView.class, "ThreadsCPUView_TOOLTIP_Col_name"), // NOI18N
234+
NbBundle.getMessage(ThreadsCPUView.class, "ThreadsCPUView_TOOLTIP_Col_time"), // NOI18N
235+
NbBundle.getMessage(ThreadsCPUView.class, "ThreadsCPUView_TOOLTIP_Col_timesec") // NOI18N
236+
});
234237

235238
table.providePopupMenu(true);
236239

@@ -275,15 +278,15 @@ protected void fireItemStateChanged(ItemEvent event) {
275278
if (!paused) refresher.refresh();
276279
}
277280
};
278-
lrPauseButton.setToolTipText(NbBundle.getMessage(CPUView.class, "TOOLTIP_Pause_results"));
281+
lrPauseButton.setToolTipText(NbBundle.getMessage(CPUView.class, "TOOLTIP_Pause_results")); // NOI18N
279282

280283
lrRefreshButton = new JButton(Icons.getIcon(GeneralIcons.UPDATE_NOW)) {
281284
protected void fireActionPerformed(ActionEvent e) {
282285
forceRefresh = true;
283286
refresher.refresh();
284287
}
285288
};
286-
lrRefreshButton.setToolTipText(NbBundle.getMessage(CPUView.class, "TOOLTIP_Update_results"));
289+
lrRefreshButton.setToolTipText(NbBundle.getMessage(CPUView.class, "TOOLTIP_Update_results")); // NOI18N
287290
lrRefreshButton.setEnabled(false);
288291

289292
Icon icon = Icons.getIcon(ProfilerIcons.DELTA_RESULTS);
@@ -295,7 +298,7 @@ protected void fireActionPerformed(ActionEvent e) {
295298
}
296299
}
297300
};
298-
lrDeltasButton.setToolTipText(NbBundle.getMessage(CPUView.class, "TOOLTIP_Deltas"));
301+
lrDeltasButton.setToolTipText(NbBundle.getMessage(CPUView.class, "TOOLTIP_Deltas")); // NOI18N
299302

300303
toolbar = ProfilerToolbar.create(true);
301304

@@ -315,10 +318,10 @@ protected void fireActionPerformed(ActionEvent e) {
315318
toolbar.addSeparator();
316319
toolbar.addSpace(5);
317320

318-
toolbar.add(new GrayLabel("Statistics:"));
321+
toolbar.add(new GrayLabel(NbBundle.getMessage(ThreadsCPUView.class, "ThreadsCPUView_LBL_Statistics"))); // NOI18N
319322
toolbar.addSpace(5);
320323

321-
toolbar.add(new JLabel("Threads Count:"));
324+
toolbar.add(new JLabel(NbBundle.getMessage(ThreadsCPUView.class, "ThreadsCPUView_LBL_TCount"))); // NOI18N
322325
final Dimension tcDim = new Dimension(-1, -1);
323326
final JLabel threadsCountL = new JLabel() {
324327
public Dimension getPreferredSize() {
@@ -351,7 +354,7 @@ public void setText(String text) {
351354

352355
toolbar.addSpace(5);
353356

354-
toolbar.add(new JLabel("Total Time (CPU):"));
357+
toolbar.add(new JLabel(NbBundle.getMessage(ThreadsCPUView.class, "ThreadsCPUView_LBL_Total_time"))); // NOI18N
355358
final JLabel threadsTotalTimeL = new JLabel();
356359
threadsTotalTime = new McsTimeRenderer() {
357360
public void setText(String text) {

visualvm/sampler/src/com/sun/tools/visualvm/sampler/memory/Bundle.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,17 @@ LBL_ABytes=<b>Total Allocated Bytes: </b>{0}
8080

8181
LBL_Threads=<b>Threads: </b>{0}
8282

83+
MemoryView_TOOLTIP_Col_name=Class name
84+
MemoryView_TOOLTIP_Col_size=Size of live instances
85+
MemoryView_TOOLTIP_Col_count=Number of live instances
86+
MemoryView_LBL_Results=Results\:
87+
MemoryView_LBL_Data=Collected data\:
88+
MemoryView_LBL_Snapshot=Snapshot
89+
90+
ThreadsMemoryView_TOOLTIP_Col_name=Thread name
91+
ThreadsMemoryView_TOOLTIP_Col_bytes=Total bytes allocated by thread
92+
ThreadsMemoryView_TOOLTIP_Col_bytessec=Bytes allocated by thread in last 1 second
93+
ThreadsMemoryView_LBL_Results=Results\:
94+
ThreadsMemoryView_LBL_Statistics=Statistics\:
95+
ThreadsMemoryView_LBL_TCount=Threads Count\:
96+
ThreadsMemoryView_LBL_Total_bytes=Total Allocated Bytes\:

0 commit comments

Comments
 (0)