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

Bug 412592

Summary: Prepare org.eclipse.emf.ecp.edit and org.eclipse.emf.ecp.edit.swt for I18N
Product: [Modeling] ECP Reporter: Markus Knauer <mknauer>
Component: CommonAssignee: Markus Knauer <mknauer>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eneufeld, mkoegel
Version: 1.0.0   
Target Milestone: 1.1.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
I18N for actions and control packages of ECP SWT bundle
none
I18N for all Java packages in o.e.emf.ecp.edit, o.e.emf.ecp.edit.swt eneufeld: iplog+

Description Markus Knauer CLA 2013-07-09 10:24:01 EDT
The org.eclipse.emf.ecp.edit.swt bundle is currently not prepared for internationalization. Because this is important in our use case scenarios I'd like to work on a patch that enables I18N for this bundle.
Comment 1 Markus Knauer CLA 2013-07-09 10:57:48 EDT
Created attachment 233278 [details]
I18N for actions and control packages of ECP SWT bundle

This little patch...

* removes and adds NON-NLS markers where appropriate
* externalizes strings and
* adds messages.properties files to the action and to the controls packages.

If this patch looks good to you, I would invest the time to work on the remaining Java packages and the remaining strings in this bundle.

I've seen many duplicate strings but I think this is a different issue.
Comment 2 Maximilian Koegel CLA 2013-07-09 13:28:40 EDT
Thank you for your time and effort! The patch looks good to me. Awaiting final contribution...;)
Comment 3 Markus Knauer CLA 2013-07-11 07:24:07 EDT
One additional requirement that I like to address is the internationalization in our RAP multi-user environment.

The current patch includes changes required for the standard RCP use-case and uses the static initialization of the strings, in RAP we need to bind the strings dynamically in a session specific way [1].

We need to discuss how we can solve this in a single-sourced way that works in both, RCP and RAP, environments. I'll work on a draft that we can use for further discussion.


[1] http://eclipse.org/rap/developers-guide/devguide.php?topic=internationalization.html
Comment 4 Maximilian Koegel CLA 2013-07-11 10:40:49 EDT
Sure, RAP Support is also important to us.

(In reply to comment #3)
> One additional requirement that I like to address is the
> internationalization in our RAP multi-user environment.
> 
> The current patch includes changes required for the standard RCP use-case
> and uses the static initialization of the strings, in RAP we need to bind
> the strings dynamically in a session specific way [1].
> 
> We need to discuss how we can solve this in a single-sourced way that works
> in both, RCP and RAP, environments. I'll work on a draft that we can use for
> further discussion.
> 
> 
> [1]
> http://eclipse.org/rap/developers-guide/devguide.
> php?topic=internationalization.html
Comment 5 Markus Knauer CLA 2013-07-22 08:37:32 EDT
Created attachment 233666 [details]
I18N for all Java packages in o.e.emf.ecp.edit, o.e.emf.ecp.edit.swt

This patch includes the first out of two steps that are required to enable I18N for the bundles org.eclipse.emf.ecp.edit and org.eclipse.emf.ecp.edit.swt. As discussed offline, it uses the standard Eclipse RCP method for I18N with static initializers.

(
Note that I had to ignore whitespace characters when applying this patch with
  git am --ignore-whitespace 0001-Bug-412592-Prepare-o.e.emf.ecp.edit-o.e.emf.ecp.edit.patch
)

The second step (i.e. a single sourced RCP + RAP solution) will follow at a later time, but for now I think that this is a good step forward.
Comment 6 Maximilian Koegel CLA 2013-07-22 09:23:32 EDT
We will review and apply the patch, thank you very much for your time and effort to make this great contribution!

I opened a follow-up bug to track the further progress on single sourcing I18N:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=413446

(In reply to comment #5)
> Created attachment 233666 [details]
> I18N for all Java packages in o.e.emf.ecp.edit, o.e.emf.ecp.edit.swt
> 
> This patch includes the first out of two steps that are required to enable
> I18N for the bundles org.eclipse.emf.ecp.edit and
> org.eclipse.emf.ecp.edit.swt. As discussed offline, it uses the standard
> Eclipse RCP method for I18N with static initializers.
> 
> (
> Note that I had to ignore whitespace characters when applying this patch with
>   git am --ignore-whitespace
> 0001-Bug-412592-Prepare-o.e.emf.ecp.edit-o.e.emf.ecp.edit.patch
> )
> 
> The second step (i.e. a single sourced RCP + RAP solution) will follow at a
> later time, but for now I think that this is a good step forward.
Comment 7 Eugen Neufeld CLA 2013-07-22 13:42:29 EDT
applied patch in commit b9960ddddc88f1617e8787973c99c487da06883c
Comment 8 Jonas Helming CLA 2013-08-19 07:21:54 EDT
closed