From bee5f15ae49d779ad68c0a083f1bbc0ff577c574 Mon Sep 17 00:00:00 2001 From: Mathias Kinzler Date: Wed, 19 May 2010 07:40:23 +0200 Subject: [PATCH] Change UIText.java so that "Find Broken Externalized Strings" works The current implementation of UIText.java has the bundle name inlined. Unfortunately, this results in the "Source->Find Broken Externalized String" workbench action to not find any unused or otherwise inconsistent keys (an info dialog is displayed saying "No NLS properties files found...". This fix does not actually fix inconsistencies in the externalized Strings, just enables the tool to find such inconsistencies (there are currently 42 unused keys in the UIText.java). Bug: 309552 (not completed, just as preparation) Change-Id: I59d831cf1bce49cdc4043232277ec1c862fbce02 Signed-off-by: Mathias Kinzler --- org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java index 0be04401..f12dc6a1 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java @@ -2034,7 +2034,14 @@ public class UIText extends NLS { /** */ public static String CommitCombo_showSuggestedCommits; + /** + * Do not in-line this into the static initializer as the + * "Find Broken Externalized Strings" tool will not be + * able to find the corresponding bundle file. + */ + private static final String BUNDLE_NAME = "org.eclipse.egit.ui.uitext"; //$NON-NLS-1$ + static { - initializeMessages("org.eclipse.egit.ui.uitext", UIText.class); //$NON-NLS-1$ + initializeMessages(BUNDLE_NAME, UIText.class); } } -- 2.11.4.GIT