equal
deleted
inserted
replaced
746 */ |
746 */ |
747 public String localize(String key, Object... args) { |
747 public String localize(String key, Object... args) { |
748 return localize(PrefixKind.COMPILER_MISC, key, args); |
748 return localize(PrefixKind.COMPILER_MISC, key, args); |
749 } |
749 } |
750 |
750 |
|
751 public String localize(JCDiagnostic.DiagnosticInfo diagInfo) { |
|
752 if (useRawMessages) { |
|
753 return diagInfo.key(); |
|
754 } else { |
|
755 return messages.getLocalizedString(diagInfo.key(), diagInfo.args); |
|
756 } |
|
757 } |
|
758 |
751 /** Find a localized string in the resource bundle. |
759 /** Find a localized string in the resource bundle. |
752 * @param key The key for the localized string. |
760 * @param key The key for the localized string. |
753 * @param args Fields to substitute into the string. |
761 * @param args Fields to substitute into the string. |
754 */ |
762 */ |
755 public String localize(PrefixKind pk, String key, Object... args) { |
763 public String localize(PrefixKind pk, String key, Object... args) { |