Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332689

Summary: Prepare XViewer for localization/internationalization/translation
Product: z_Archived Reporter: Chris Merrill <st.eclipsebugs3>
Component: NebulaAssignee: Donald Dunne <donald.g.dunne>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: krasnoff_p
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch file for localization support
none
Proposed patch to allow localization of text strings
wim.jongman: iplog+
XViewerText.java and XViewerText.properties files (zipped)
wim.jongman: iplog+
Patch for localization TableCustomizationAction
none
Patch for localization ViewSelectedCellDataAction
none
Patch for localization ViewTableReportAction.
none
Patch for localization XViewerCustomizeDialog
none
Patch for localization XViewerText.properties none

Description Chris Merrill CLA 2010-12-15 16:00:00 EST
Build Identifier: 

Text strings visible to the end-user should be removed from the code and placed into a properties file for translation.

Reproducible: Always
Comment 1 Chris Merrill CLA 2010-12-15 16:03:31 EST
Created attachment 185268 [details]
patch file for localization support

The proposed patch moves most of the user-visible text strings out of the source code and into a properties file. It also includes a utility class for convenient access to the strings, which also provides some handy error handling.

Note that I've moved all text strings for XViewer into a single properties file, rather than a separate file for each class. There are varying opinions on which approach is better. In my experience, this one is easier to maintain, but if the project leaders would prefer the other, I can re-work it.
Comment 2 Chris Merrill CLA 2010-12-16 14:05:43 EST
Arrgh.  My apologies Donald - I just noticed this patch include changes from 332333 (the CustomizeDialog refactoring).  I thought I had kept those changes out, but clearly my CVS skills are were not up to the task. I'll try again and attach a patch that contains only the localization support changes.
Comment 3 Chris Merrill CLA 2010-12-16 15:19:12 EST
Created attachment 185364 [details]
Proposed patch to allow localization of text strings

Here is a patch that moves most of the text strings into a properties file suitable for translation.
Comment 4 Donald Dunne CLA 2010-12-20 14:20:30 EST
Patch worked except I'm missing the new file XViewerText which has the strings.
Comment 5 Chris Merrill CLA 2010-12-20 14:30:05 EST
Created attachment 185588 [details]
XViewerText.java and XViewerText.properties files (zipped)

I'm not sure why they didn't come through when you applied the patch. I can see them if I view the diff directly from bugzilla.  I'm attaching XViewerText.zip, which contains the .class and .properties files.
Comment 6 Donald Dunne CLA 2011-01-04 16:15:39 EST
Through a little work, I was able to get these patches to apply correctly.  XViewer is now international-ready with label strings in the XViewerText.properties file.

Thanks Chris for the patch!

In the same commits, I created the org.eclipse.nebula.widgets.xviewer.example plugin and moved all the example code out of the org.eclipse.nebula.widgets.xviewer bundle.
Comment 7 Pavel Krasnov CLA 2014-04-09 07:20:58 EDT
Created attachment 241775 [details]
Patch for localization TableCustomizationAction

The proposed patch moves some of unlocalied user-visible text strings out of the source code and into a properties file.
Comment 8 Pavel Krasnov CLA 2014-04-09 07:21:54 EDT
Created attachment 241776 [details]
Patch for localization ViewSelectedCellDataAction
Comment 9 Pavel Krasnov CLA 2014-04-09 07:22:21 EDT
Created attachment 241777 [details]
Patch for localization ViewTableReportAction.
Comment 10 Pavel Krasnov CLA 2014-04-09 07:22:59 EDT
Created attachment 241778 [details]
Patch for localization XViewerCustomizeDialog
Comment 11 Pavel Krasnov CLA 2014-04-09 07:23:48 EDT
Created attachment 241779 [details]
Patch for localization XViewerText.properties
Comment 12 Donald Dunne CLA 2014-04-14 13:05:35 EDT
(In reply to Pavel Krasnov from comment #11)
> Created attachment 241779 [details]
> Patch for localization XViewerText.properties

Can you create a single patch file with all these changes.  I can't apply just diff text.

You should be able to select your org.eclipse.nebula.widgets.xviewer bundle > right-click > Team > create patch and save to your desktop.

Thanks,
Don