MessageGeneration class





allLocales Set<String>
A list of all the locales for which we have translations. Code that does the reading of translations should add to this.
read / write
closing → dynamic
Constant string used in generateMainImportFile as the end of the file.
codegenMode String
The mode to generate in - either 'release' or 'debug'. [...]
read / write
extraImports String
Any additional imports the individual message files need.
generatedFilePrefix String
If we have more than one set of messages to generate in a particular directory we may want to prefix some to distinguish them.
read / write
generatedImportPath String
If the path to the generated files is something other than the current directory, update the generatedImportPath variable to change the import directives in the generated code.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
intlImportPath String
If the import path following package: is something else, modify the intlImportPath variable to change the import directives in the generated code.
read / write
jsonMode bool
mainPrologue → dynamic
Constant string used in generateMainImportFile for the beginning of the file.
messagesDeclaration String
output StringBuffer
Holds the generated translations.
read / write
overrideLookup String
read / write
package String
What is the path to the package for which we are generating. [...]
read / write
releaseMode bool
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
useDeferredLoading bool
Should we use deferred loading for the generated libraries.
read / write


clearOutput() → void
contentForLocale(String basicLocale, Iterable<TranslatedMessage> translations) String
Generate a string that containts the dart code with the translations in locale.
generateIndividualMessageFile(String basicLocale, Iterable<TranslatedMessage> translations, String targetDir) → void
Generate a file <generated_file_prefix>messages<locale>.dart for the translations in locale and put it in targetDir.
generateMainImportFile() String
This section generates the messages_all.dart file based on the list of allLocales.
importForGeneratedFile(String file) String
Given a base file, return the file prefixed with the path to import it. By default, that is in the current directory, but if generatedImportPath has been set, then use that as a prefix.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
prologue(String locale) String
generateIndividualMessageFile for the beginning of the file, parameterized by locale.
toString() String
A string representation of this object. [...]
writeTranslations(Iterable<TranslatedMessage> usableTranslations, String locale) → void
Write out the translated forms.


operator ==(Object other) bool
The equality operator. [...]