Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 259439 - The embedded marker ({n}) is not included in the externalized string
Summary: The embedded marker ({n}) is not included in the externalized string
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-20 05:59 EST by Hiroyuki CLA
Modified: 2009-07-08 11:34 EDT (History)
2 users (show)

See Also:


Attachments
ecf_embedded_mark.patch (15.15 KB, patch)
2008-12-20 10:00 EST, Hiroyuki CLA
no flags Details | Diff
example_collab.patch (10.46 KB, patch)
2009-07-08 07:46 EDT, Hiroyuki CLA
slewis: iplog+
Details | Diff
sharedobject.patch (9.54 KB, patch)
2009-07-08 07:48 EDT, Hiroyuki CLA
slewis: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroyuki CLA 2008-12-20 05:59:10 EST
The embedded marker ({n}) is necessary for the message text for correct internationalization. 
Some do not have the embedded marker ({n}). 

It is necessary to correct the Java source with the resource. 
If you need the patch, I will offer the patch. 

In org.eclipse.ecf.example.collab
/src/org/eclipse/ecf/internal/example/collab/messages.properties

EclipseCollabSharedObject_SCREEN_CAPTURE_FROM=Screen capture from 

||
V

EclipseCollabSharedObject_SCREEN_CAPTURE_FROM=Screen capture from {0}

/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties

ChatComposite.MESSAGE_TO_TITLE=Message to 
ChatComposite.PRIVATE_MESSAGE_TITLE=Private Message for 
ChatComposite.RING_TITLE=Ring 
ChatComposite.START_PROGRAM_TEXT=Program to Start for 
ChatComposite.START_PROGRAM_TITLE=Start Program for 
EclipseFileTransferAndLaunch.EXCEPTION_LAUNCHING=Exception launching 

||
V

ChatComposite.MESSAGE_TO_TITLE=Message to {0}
ChatComposite.PRIVATE_MESSAGE_TITLE=Private Message for {0}
ChatComposite.RING_TITLE=Ring {0}
ChatComposite.START_PROGRAM_TEXT=Program to Start for {0}
ChatComposite.START_PROGRAM_TITLE=Start Program for {0}
EclipseFileTransferAndLaunch.EXCEPTION_LAUNCHING=Exception launching {0}

In org.eclipse.ecf.sharedobject

/src/org/eclipse/ecf/internal/core/sharedobject/messages.properties

TwoPhaseCommitEventProcessor_Exception_Commit_Timeout=Timeout adding 
TwoPhaseCommitEventProcessor_Exception_Timeout_Adding_To=\ to 

||
V

TwoPhaseCommitEventProcessor_Exception_Commit_Timeout=Timeout adding {0} to {1}
Comment 1 Remy Suen CLA 2008-12-20 09:44:41 EST
(In reply to comment #0)
> If you need the patch, I will offer the patch. 

We always welcome external contributions, Hiroyuki.
Comment 2 Hiroyuki CLA 2008-12-20 10:00:49 EST
Created attachment 121000 [details]
ecf_embedded_mark.patch
Comment 3 Remy Suen CLA 2008-12-30 15:08:44 EST
(In reply to comment #2)
> Created an attachment (id=121000) [details]
> ecf_embedded_mark.patch

I noticed you added colons in this patch to a few of the strings. This actually causes two colons to appear at the moment since the string construction operation itself will also add its own colon.

I think in most if not all of the cases NLS's bind methods can be used instead of MessageFormats.
Comment 4 Hiroyuki CLA 2009-07-04 20:32:49 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Created an attachment (id=121000) [details]
> > ecf_embedded_mark.patch
> 
> I noticed you added colons in this patch to a few of the strings. This actually
> causes two colons to appear at the moment since the string construction
> operation itself will also add its own colon.

Please ignore following updates

-SharedObjectContainerUI_JAVA_VERSION_LABEL=Java
-SharedObjectContainerUI_LANGUAGE_LABEL=Language
-SharedObjectContainerUI_OS_LABEL=OS
-SharedObjectContainerUI_OSGI_VERSION_LABEL=OSGi Version 
-SharedObjectContainerUI_PROJECT_LABEL=Project
-SharedObjectContainerUI_TIME_LABEL=Time
-SharedObjectContainerUI_TIME_ZONE_LABEL=Time Zone
+SharedObjectContainerUI_JAVA_VERSION_LABEL=Java: 
+SharedObjectContainerUI_LANGUAGE_LABEL=Language: 
+SharedObjectContainerUI_OS_LABEL=OS: 
+SharedObjectContainerUI_OSGI_VERSION_LABEL=OSGi Version: 
+SharedObjectContainerUI_PROJECT_LABEL=Project: 
+SharedObjectContainerUI_TIME_LABEL=Time: 
+SharedObjectContainerUI_TIME_ZONE_LABEL=Time Zone: 

FYI: The ECF 3.0 translation rate for Japanese is 98%.
  If this fix is applied, it is likely to become almost 100%. 
Comment 5 Scott Lewis CLA 2009-07-07 13:34:11 EDT
Hi Hiroyuki,

Thanks for the patch.  Before applying these fixes, I would like to request that Messages.format methods be removed (from both Messages classes) and replaced with this call

NLS.bind(String,Object[])

This is the idiom used within Equinox/ECF for formatting externalized strings with variable substitution.

Would you mind making these changes and attaching a new version of the patch?

Thanks much.


(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Created an attachment (id=121000) [details] [details]
> > > ecf_embedded_mark.patch
> > 
> > I noticed you added colons in this patch to a few of the strings. This actually
> > causes two colons to appear at the moment since the string construction
> > operation itself will also add its own colon.
> 
> Please ignore following updates
> 
> -SharedObjectContainerUI_JAVA_VERSION_LABEL=Java
> -SharedObjectContainerUI_LANGUAGE_LABEL=Language
> -SharedObjectContainerUI_OS_LABEL=OS
> -SharedObjectContainerUI_OSGI_VERSION_LABEL=OSGi Version 
> -SharedObjectContainerUI_PROJECT_LABEL=Project
> -SharedObjectContainerUI_TIME_LABEL=Time
> -SharedObjectContainerUI_TIME_ZONE_LABEL=Time Zone
> +SharedObjectContainerUI_JAVA_VERSION_LABEL=Java: 
> +SharedObjectContainerUI_LANGUAGE_LABEL=Language: 
> +SharedObjectContainerUI_OS_LABEL=OS: 
> +SharedObjectContainerUI_OSGI_VERSION_LABEL=OSGi Version: 
> +SharedObjectContainerUI_PROJECT_LABEL=Project: 
> +SharedObjectContainerUI_TIME_LABEL=Time: 
> +SharedObjectContainerUI_TIME_ZONE_LABEL=Time Zone: 
> 
> FYI: The ECF 3.0 translation rate for Japanese is 98%.
>   If this fix is applied, it is likely to become almost 100%. 
> 

Comment 6 Hiroyuki CLA 2009-07-08 07:46:57 EDT
Created attachment 141069 [details]
example_collab.patch

New patch for org.eclipse.ecf.example.collab plug-in
Comment 7 Hiroyuki CLA 2009-07-08 07:48:05 EDT
Created attachment 141070 [details]
sharedobject.patch

New patch for org.eclipse.ecf.sharedobject plug-in
Comment 8 Scott Lewis CLA 2009-07-08 11:34:24 EDT
Patches 141069 and 141070 applied and released to HEAD and Release_3_0 branch.  Thanks very much Hiroyuki.  Resolving this bug as fixed.