Generate README.md and README.fr.md from a single README.src.md (NRG)#1383
Open
andriishin wants to merge 1 commit intoInseeFr:mainfrom
Open
Generate README.md and README.fr.md from a single README.src.md (NRG)#1383andriishin wants to merge 1 commit intoInseeFr:mainfrom
andriishin wants to merge 1 commit intoInseeFr:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why / Pourquoi
Maintaining two parallel READMEs drifts over time. A single source of truth keeps them in lockstep — and it's a small change since the existing files already follow NRG's
<base>.md/<base>.<lang>.mdnaming convention, no rename needed.What changed / Ce qui change
README.src.md(~37 lines) — single template covering both languages. Identical content (logo, badges, headings) appears once; per-language strings use the inline${en:'…', fr:'…'}form. The Setup subsection lives in the EN file only (matching current behaviour whereREADME.fr.mdlinks back to the EN#Setupanchor).pom.xml— addscom.nanolaba:nrg-maven-plugin:1.0(≈22-line<plugin>block at the end of the parent<build><plugins>). Default phase iscompile, no extra config. Multi-module: the plugin runs once at the parent level, no per-module setup needed.README.mdandREADME.fr.md— regenerated from the template; the only semantic change is a 2-line NRG-added header (<!-- This file was automatically generated by NRG 1.0 -->) so future contributors know to editREADME.src.mdinstead. Body content is byte-identical to the current files.How to verify / Vérification
mvn compile(or./mvnw compileif applicable) — NRG will regenerate both READMEs fromREADME.src.md.git diffshould be empty.README.src.md.What NRG is
NRG is an Apache 2.0, Java 8 Markdown template engine purpose-built for multi-language READMEs. Distributed as a CLI, Maven plugin (already on Maven Central as
com.nanolaba:nrg-maven-plugin:1.0), and Java library. Used to generate its own README fromREADME.src.md.If the migration angle doesn't fit Eno's direction, no problem — feel free to close. Happy to adjust the template (e.g. switch the inline form to per-line
<!--lang-->markers, or split the Setup section). 🙇