code: protected StringBuffer translatedReplacements (String key, StringBuffer buf)
      {
          MessageBundle bundle = _ctx.getMessageManager().getBundle(_bundle);
          if (!bundle.exists(key)) {
              return buf;
          }
          StringTokenizer st = new StringTokenizer(bundle.get(key), "#");
          // apply the replacements to each mogrification that matches
          while (st.hasMoreTokens()) {
              String pattern = st.nextToken();
              String replace = st.nextToken();
              Matcher m = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE).matcher(buf);
              if (m.find()) {
                  buf = new StringBuffer();
                  m.appendReplacement(buf, replace);
                  // they may match more than once
                  while (m.find()) {
                      m.appendReplacement(buf, replace);
                  }
                  m.appendTail(buf);
              }
          }
          return buf;
      }
docs: Do all the replacements (mogrifications) specified in the translation string specified by
  the key.