# String translation definition file # The purpose of this file is to # # There are three separate sections in this file # [session-translation] # This is the primary string mapping that is processed by # the translation engine before it goes through the CoffeeMud # filtration process. # [filter-translation] # During the filtration process, certain codes may be replaced # with hard-coded english words. This short section is to # handle those words specifically. # [final-translation] # After the string has gone through session translation and # filter-translation, it will finally be parsed by the definitions # in this section to catch any stray strings which may not be handled # by either of the first two sections. # # there are several commands defined for each section: # replacewhole "string literal" with "string literal" # This command will replace the first string with the second string # only if the entire translatable string is equal to the first # string argument. This is easily the best performing command for # doing translations, and should be preferred above others wherever # possible and practical. # replace "regular expression pattern" with "replacement pattern" # This command will search for the given reguar expression pattern in # the string. If it is found, the string following the with clause # will be used to change the string to something else. Regular # expressions are exactly as they are defined in the Java API. # Replacement expressions may include literals, or a slash followed # by a number to insert Java "capturing groups" from the search # expression. The double quotes around the expressions are required. # This is the worst performing command, but also the most versatile. # Still use it sparingly, be careful with your regular expression syntax, # and read the information about escape sequences below. # replaceall "sub-string literal" with "string literal" # This command will search for all instances of the given sub-string in the # translatable string and replace them with the given string literal. This # command is good for catching references to hard coded named things, such # as spell names and the like. It performs much better than the normal replace # command, but is still far more of a performance hit than replacewhole. # ignorewhole "string literal" # This command will cause the entire string to be ignored by the translator # if it matches the given string. This is easily the best performing ignore for # ignoring translation strings, and should be preferred above ignore and # ignoreall wherever possible and practical. # ignore "regular expression pattern" # This command will search for the given reguar expression pattern in # the string. If it is found, the entire string is ignored by the translator. # Regular expressions are exactly as they are defined in the Java API. # This is the worst performing ignore command, but also the most versatile. # Still use it sparingly, be careful with your regular expression syntax, # and read the information about escape sequences below. # ignoreall "sub-string literal" with "string literal" # This command will search for an instance of the given sub-string in the # translatable string and, if found, ignore then entire translatable string. # This command is good for catching references to hard coded named things, such # as spell names and the like. It performs much better than the normal ignore # command, but is still far more of a performance hit than ignorewhole. # autoignore <max-string-length> # This command will cause any translatable strings which were not modified by # the translator in any way to be added automatically to the section list as # a "IGNOREWHOLE" command, thus preventing it from being re-parsed the next # time it is encountered. Because variables are often included inside # translatable strings, you should be careful with this command. If it is # used, your file should be re-examined regularly and the newly adde IGNOREWHOLE # strings changed to some other command. # define "variable string" as "replacement string" # This command is used to define strings which will be replaced inside of # other commands. A variable definition will apply only to the section in # which it is defined. The replacement will be applied to both expressions # and replacement strings in the REPLACE command, as well as in the # replacement string of other DEFINE commands. This command may be placed # before the first section to make it "global" to all sections. # # Escape characters: # In the commands IGNOREALL/REPLACEALL and IGNOREWHOLE, REPLACEWHOLE, # the only characters which must be escaped are " with \", tabs with \t, \ with \\, # and cr/lf \n\r. # For the REPLACE/IGNORE commands, the regular expression parameter must have all # special regular expression characters escaped in order to be matched. Those include: # . ( ) { } [ ] ^ $ ? * + | [filter-translation] IGNOREWHOLE "your" IGNOREWHOLE "you" IGNOREWHOLE "his" IGNOREWHOLE "hers" IGNOREWHOLE "him" IGNOREWHOLE "her" IGNOREWHOLE "is" IGNOREWHOLE "are" IGNOREWHOLE "someone" IGNOREWHOLE "something" #autoignore 100 [session-translation] IGNOREALL "<CHANNEL \"" IGNOREALL "<RName\^>" IGNOREALL "<RDesc\^>" IGNOREALL "<RExits\^>" IGNOREALL "<RMob " IGNORE "<[a-zA-Z][a-zA-Z]Item " IGNORE "<[a-zA-Z]Item " IGNOREWHOLE "\n\r\n\r" IGNOREWHOLE "\n\r" #autoignore 100 [final-translation]