Skip to content

Commit

Permalink
Merge pull request #686 from bci-oss/681-allow-automatic-language-sel…
Browse files Browse the repository at this point in the history
…ection-in-documentation-generator

Reintroduce automatic language selection in documentation generator
  • Loading branch information
atextor authored Dec 10, 2024
2 parents 7d94def + 9fff872 commit ecbe2de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public Stream<DocumentationArtifact> generate() {
logMissingTranslations( aspect(), language );
templateContext.put( "i18n", new I18nLanguageBundle( language ) );
final TemplateEngine templateEngine = new TemplateEngine( templateContext, engineConfiguration );
final String artifactName = "%s_%s.html".formatted( aspect().getName(), config.locale().toLanguageTag() );
final String artifactName = "%s_%s.html".formatted( aspect().getName(), language.toLanguageTag() );
String source = templateEngine.apply( DOCU_ROOT_DIR + "/templates/html/aspect-model-documentation" );
source = insertAspectModelDiagram( source, language );
source = insertStaticPlaceholders( source );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,4 @@ public record DocumentationGenerationConfig(
Locale locale,
String stylesheet
) implements GenerationConfig {
public DocumentationGenerationConfig {
if ( locale == null ) {
locale = Locale.ENGLISH;
}
}
}

0 comments on commit ecbe2de

Please sign in to comment.