public class OSXStringTableOutputProcessor extends OutputProcessor
Processor Name: OSXStringTable
The output processor processes the following command line options:
[-fileName <file-Name>] [-dir <root-directory>]
The <file-Name> specifies the name of the string table resource
files. When no file name is specified, the default name
Localizable.strings is used. The <root-directory>
specifies the directory, where the locale specific directories are created.
When no root directory is specified, the default directory is used.
The output processor creates language specific directories under the root directory with the name <language>[-<country>].lproj derived from the language locale of the messages. E.g. when the message file contains messages in the languages "en_GB", "en_US" and "de", the directories en-GB.lproj, en-US.lproj and de.lproj are created under the root directory. Each of these directories contains a language specific string table resource file with the specified file name.
The output processor processes the following options in the option block for the output processor defined in the message file:
Option | Description | Default Value | Sample |
---|---|---|---|
CHARACTERSET=<character-set> | The character set of the string table resource files. Note, that the standard requires, that the files are created with the encoding UTF-8 (see also String Resources). | UTF-8 | CHARACTERSET=ISO-8859-1 |
Constructor and Description |
---|
OSXStringTableOutputProcessor()
The constructor initializes the base class with the processor ID and the
version.
|
Modifier and Type | Method and Description |
---|---|
void |
appendMessageText(java.lang.String text)
This method overrides the method of the base class and is called when a
message text should be appended to the current text.
|
void |
closeFile()
This method overrides the method of the base class and is called when the
source file has been processed completely and the output files should be
closed.
|
void |
commandLineOptions(java.util.Vector<java.lang.String> options)
This method overrides the method of the base class.
|
void |
help()
This method overrides the method of the base class and prints the help
text for this output processor to standard output.
|
void |
option(java.lang.String option,
java.lang.String value,
int lineNumber)
This method overrides the method of the base class and processes options
for the output processor.
|
void |
startLanguage(java.util.Locale locale,
int lineNumber)
This method overrides the method of the base class and is called, when a
new language for the current message starts.
|
void |
startMessage(java.lang.String messageKey,
int lineNumber)
This method overrides the method of the base class and is called, when a
new message starts.
|
appendDocumentationText, beVerbose, getProcessorID, getVersion, setSeverity, startFile, version
public OSXStringTableOutputProcessor()
public void appendMessageText(java.lang.String text) throws java.io.IOException
appendMessageText
in class OutputProcessor
text
- The text to be appended.java.io.IOException
- Thrown, when writing the text to the output file.public void closeFile() throws java.io.IOException
closeFile
in class OutputProcessor
java.io.IOException
- Thrown, when closing a resource file fails.public void commandLineOptions(java.util.Vector<java.lang.String> options) throws CommandLineError
commandLineOptions
in class OutputProcessor
options
- The command line arguments to be processed.CommandLineError
- Thrown, when an invalid option is passed.public void help()
help
in class OutputProcessor
public void option(java.lang.String option, java.lang.String value, int lineNumber) throws SyntaxError
option
in class OutputProcessor
option
- The option keyword.value
- The assigned option value.lineNumber
- The line number of the option assignment in the message
file. This is used to initialize the syntax error exception.SyntaxError
- Thrown, when the passed option keyword is invalid.public void startLanguage(java.util.Locale locale, int lineNumber) throws java.io.IOException
startLanguage
in class OutputProcessor
locale
- The locale for the language to be started.lineNumber
- The line number of the language assignment in the
message file (not used here).java.io.IOException
- Thrown, when a new file cannot be created.public void startMessage(java.lang.String messageKey, int lineNumber)
startLanguage(Locale,int)
must follow to set the language
specific resource file.startMessage
in class OutputProcessor
messageKey
- The symbolic message key.lineNumber
- The line number of the message key assignment in the
message file.