|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.g11ntoolkit.detokenizer.DetokMCFile
Replaces all the token identifiers in the specified tokenized resource bundle file with the strings taken from the specified string file.
Writes out the specified output file when finished replacing the tokens.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See License Agreement.
| Field Summary | |
private java.lang.String |
encoding
Specifies the encoding to use for the input file. |
private static java.util.logging.Logger |
log
The log used for all messages from this class. |
private static java.util.ResourceBundle |
mrb
Message Resource Bundle. |
private StrFile |
strFile
Collection the strings that will be used to resolve the tokens. |
private java.util.Locale |
targetLocale
Specifies the locale to use for the resulting resource bundle. |
private static java.util.ResourceBundle |
vrb
Variables Resource Bundle. |
(package private) static boolean |
XML
Switch to indicate if we are using XML or not. |
| Constructor Summary | |
DetokMCFile(java.lang.String anEncoding,
java.util.Locale aLocale)
Creates an instance of this class setting the locale and encoding. |
|
| Method Summary | |
static void |
detokenize(java.lang.String strFileName,
java.lang.String outFileName,
java.lang.String contextFileName,
java.lang.String encoding,
java.util.Locale targetLocale)
Finds and replaces the tokens with their strings. |
static void |
main(java.lang.String[] args)
Allows this tool to be run from the command line. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.util.logging.Logger log
private static java.util.ResourceBundle mrb
private static java.util.ResourceBundle vrb
private StrFile strFile
private java.lang.String encoding
The encoding will also be used on the output files.
private java.util.Locale targetLocale
static boolean XML
| Constructor Detail |
public DetokMCFile(java.lang.String anEncoding,
java.util.Locale aLocale)
anEncoding - a String specifying the encoding of the resulting Resource Bundle fileaLocale - a Locale object| Method Detail |
public static void main(java.lang.String[] args)
throws DetokRunError
Sets up the environment then calls the detokenize method to do the work.
args - a String containing the command line parameters.
DetokRunError
public static void detokenize(java.lang.String strFileName,
java.lang.String outFileName,
java.lang.String contextFileName,
java.lang.String encoding,
java.util.Locale targetLocale)
throws DetokRunError
This method begins from an XLIFF format StrFile.
strFileName - a String containing the name of the input StrFileoutFileName - a String containing the name of the output filecontextFileName - a String containing the name of the file to be used as the context file nameencoding - a String containing the code identifying how the output file should be encoded. This must be a valid encoding code.targetLocale - a Locale for the desired target locale.
DetokRunError - for any error detected during the processing.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||