Bug 300472 [Dialogs] [JFace] Provide accessor for dialog messages
It would be nice to have access to the Dialog messages (eg. IDialogConstants.OK_LABEL) trough API instead of a field access. This would allow the RAP team to provide a session-based translation for the labels and furthermore improves the usability for our current users. Developers who want to single-source their applications for RCP and RAP cannot use the existing API of JFace as the labels are hardcoded as static fields and RAP has no chance to intervene this behavior without breaking API. I suggest to provide an accessor like SWT.getMessage() to get the translated string as this would allow developers to use the same API in RCP and JFace. I'd be happy to provide a patch once we decided on a possible approach. As suggested above, I'd introduce an accessor on Dialog itself and introduce message keys in IDialogConstants.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogConstants.java
* <p>
 * Within the dialog framework, all buttons are referred to by a button id.
 * Various common buttons, like "OK", "Cancel", and "Finish", have pre-assigned
 * button ids for convenience. If an application requires other dialog buttons,
 * they should be assigned application-specific button ids counting up from
 * <code>CLIENT_ID</code>.
 * </p>
 * <p>
 * Button label constants are also provided for the common buttons. JFace
 * automatically localizes these strings to the current locale; that is,
 * <code>YES_LABEL</code> would be bound to the string <code>"Si"</code> in
 * a Spanish locale, but to <code>"Oui"</code> in a French one.
 * </p>
 * <p>
 * All margins, spacings, and sizes are given in "dialog units" (DLUs), where
 * <ul>
 * <li>1 horizontal DLU = 1/4 average character width</li>
 * <li>1 vertical DLU = 1/8 average character height</li>
 * </ul>
 * </p>
 */
import org.eclipse.jface.resource.JFaceResources;
/**
 * IDialogConstants is the interface for common dialog strings and ids
 * used throughout JFace.
 * It is recommended that you use these labels and ids whereever 
 * for consistency with the JFace dialogs.
 */
public interface IDialogConstants {