Class ForgeI18n


  • public class ForgeI18n
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String ALLOWED_CHARS  
      private static java.util.Map<java.lang.String,​org.apache.commons.lang3.text.FormatFactory> customFactories  
      private static com.google.common.base.CharMatcher DISALLOWED_CHAR_MATCHER  
      private static java.util.Map<java.lang.String,​java.lang.String> i18n  
      private static org.apache.logging.log4j.Logger LOGGER  
      private static java.util.regex.Pattern PATTERN_CONTROL_CODE  
    • Constructor Summary

      Constructors 
      Constructor Description
      ForgeI18n()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getPattern​(java.lang.String patternName)  
      static void loadLanguageData​(java.util.Map<java.lang.String,​java.lang.String> properties)  
      private static void parseException​(java.lang.String formatString, java.lang.StringBuffer stringBuffer, java.lang.Object objectToParse)  
      static java.lang.String parseFormat​(java.lang.String format, java.lang.Object... args)  
      static java.lang.String parseMessage​(java.lang.String i18nMessage, java.lang.Object... args)  
      private static void parseModInfo​(java.lang.String formatString, java.lang.StringBuffer stringBuffer, java.lang.Object modInfo)  
      static java.lang.String stripControlCodes​(java.lang.String text)  
      static java.lang.String stripSpecialChars​(java.lang.String message)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • DISALLOWED_CHAR_MATCHER

        private static final com.google.common.base.CharMatcher DISALLOWED_CHAR_MATCHER
      • i18n

        private static java.util.Map<java.lang.String,​java.lang.String> i18n
      • customFactories

        private static java.util.Map<java.lang.String,​org.apache.commons.lang3.text.FormatFactory> customFactories
      • PATTERN_CONTROL_CODE

        private static final java.util.regex.Pattern PATTERN_CONTROL_CODE
    • Constructor Detail

      • ForgeI18n

        public ForgeI18n()
    • Method Detail

      • parseException

        private static void parseException​(java.lang.String formatString,
                                           java.lang.StringBuffer stringBuffer,
                                           java.lang.Object objectToParse)
      • parseModInfo

        private static void parseModInfo​(java.lang.String formatString,
                                         java.lang.StringBuffer stringBuffer,
                                         java.lang.Object modInfo)
      • getPattern

        public static java.lang.String getPattern​(java.lang.String patternName)
      • loadLanguageData

        public static void loadLanguageData​(java.util.Map<java.lang.String,​java.lang.String> properties)
      • parseMessage

        public static java.lang.String parseMessage​(java.lang.String i18nMessage,
                                                    java.lang.Object... args)
      • parseFormat

        public static java.lang.String parseFormat​(java.lang.String format,
                                                   java.lang.Object... args)
      • stripSpecialChars

        public static java.lang.String stripSpecialChars​(java.lang.String message)
      • stripControlCodes

        public static java.lang.String stripControlCodes​(java.lang.String text)