commonPlanTokens function
Tokens common to both import and describe plans, derived from
the loaded project. Commands layer their own command-specific
tokens (FROM, PATH, …) on top.
Implementation
Map<String, String> commonPlanTokens(DialectProject project) {
final projectName = _projectName(project);
final namespaces = _namespacesAcrossPlatforms(project);
return {
'SOURCE_LOCALE': project.config.sourceLocale,
'TARGET_LOCALES': project.config.targetLocales.isEmpty
? '(none configured yet)'
: project.config.targetLocales.join(', '),
'PROJECT_NAME': projectName,
'NAMESPACES': namespaces.isEmpty
? '(none configured yet)'
: namespaces.join(', '),
'GENERATED_AT': DateTime.now().toUtc().toIso8601String(),
};
}