X-Git-Url: http://jaekl.net/gitweb/?a=blobdiff_plain;f=prod%2Fnet%2Fjaekl%2Fcfb%2FCfbBundle.java;h=b46b2905722a3eaaed88a054f2ed188b4a9405e1;hb=a4a577abc3f9b2b1147caafd1cb39fa8c2622cd4;hp=8ea3c68f669d8306f6e43027251f47aa22e46ed8;hpb=1b35159cf2ff8d86b037f7d442f7b1f4c8e3b2f3;p=cfb.git diff --git a/prod/net/jaekl/cfb/CfbBundle.java b/prod/net/jaekl/cfb/CfbBundle.java index 8ea3c68..b46b290 100644 --- a/prod/net/jaekl/cfb/CfbBundle.java +++ b/prod/net/jaekl/cfb/CfbBundle.java @@ -13,9 +13,13 @@ import net.jaekl.qd.QDBundleFactory; public class CfbBundle { public static final String ANALYSIS_FAILED = "analysis.failed"; public static final String ANALYZED_AT = "analyzed.at"; + public static final String BUG_CATEGORY_UNKNOWN = "bug.category.unknown"; + public static final String BUG_TYPE_UNKNOWN = "bug.type.unknown"; public static final String CANNOT_CONNECT = "cannot.connect.to.db"; public static final String CANNOT_EXEC = "cannot.exec"; + public static final String CANNOT_SEND_MAIL = "cannot.send.mail"; public static final String CFB = "cfb"; + public static final String CFB_MAIL_SUBJECT = "cfb.mail.subject"; public static final String CFB_REPORT = "cfb.report"; public static final String COMPARING_RUNS = "comparing.runs"; public static final String COMPARING_VERSIONS = "comparing.versions"; @@ -54,6 +58,11 @@ public class CfbBundle { m_bundle = QDBundleFactory.getInst().getBundle(BUNDLE_NAME, locale); } + // This constructor is intended only for use during unit testing. + CfbBundle() { + m_bundle = null; + } + public String get(String key, Object... arguments) { try { if (null != m_bundle) { @@ -67,10 +76,15 @@ public class CfbBundle { // Fall through to the fallback behaviour below } + return fallbackGet(key, arguments); + } + + String fallbackGet(String key, Object... arguments) { StringBuilder sb = new StringBuilder("[" + key + "]"); for (Object obj : arguments) { sb.append("[" + obj + "]"); } return sb.toString(); + } }