Skip to content

docs: migrate README.md / README.zh_CN.md to a single NRG template#139

Closed
andriishin wants to merge 1 commit into
trpc-group:masterfrom
andriishin:nrg-migration
Closed

docs: migrate README.md / README.zh_CN.md to a single NRG template#139
andriishin wants to merge 1 commit into
trpc-group:masterfrom
andriishin:nrg-migration

Conversation

@andriishin
Copy link
Copy Markdown

Why

README.md and README.zh_CN.md are hand-maintained side-by-side. Every README change means editing the same paragraph in two places.

This PR migrates both files to a single source-of-truth template using Nanolaba Readme Generator (NRG) — a small Java 8 Maven plugin that turns one README.src.md into N localized README files on every build.

What changes

  • New: README.src.md — the unified source. Each line is tagged <!--en--> or <!--zh_CN-->. Generated programmatically; outputs are byte-identical to today's files (modulo a 2-line auto-generated header).
  • Modified: pom.xml — adds com.nanolaba:nrg-maven-plugin:1.1 to the parent POM's <build><plugins> after maven-compiler-plugin with <inherited>false</inherited>. Bound to the compile phase.
  • Modified: README.md (+2 lines), README.zh_CN.md (+2 lines) — regenerated. The only change is the 2-line auto-generated header at the top.

Verification

Locally, regenerating with NRG 1.1 from Maven Central against current master produces output that diffs against the originals only by the 2-line auto-generated header. Zero functional content change.

How to regenerate locally

mvn compile

About NRG

com.nanolaba:readme-generator — open-source, Apache 2.0, Java 8+. Ships as CLI, Maven plugin, GitHub Action, and library.

Replaces the two hand-maintained READMEs with a single
README.src.md, regenerated by nrg-maven-plugin during the compile
phase. Both outputs are byte-identical to the originals (modulo a
2-line auto-generated header NRG injects at the top).

The Chinese filename README.zh_CN.md is produced by declaring the
language as zh_CN — NRG's default output pattern <base>.<lang>.md
yields the right name directly, no override needed.
@github-actions
Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


alexander.andriishin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.83954%. Comparing base (953a3c6) to head (cad834d).

Additional details and impacted files

Impacted file tree graph

@@                  Coverage Diff                  @@
##                master        #139         +/-   ##
=====================================================
- Coverage     85.86041%   85.83954%   -0.02088%     
+ Complexity        4325        4318          -7     
=====================================================
  Files              436         436                 
  Lines            14371       14371                 
  Branches          1286        1286                 
=====================================================
- Hits             12339       12336          -3     
- Misses            2032        2035          +3     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andriishin
Copy link
Copy Markdown
Author

Closing this — the Tencent CLA requirement is broader than I want to commit to in exchange for a docs-only contribution. If a maintainer would like the NRG migration applied internally without going through the CLA path, the template and pom snippet are at https://github.com/andriishin/trpc-java/tree/nrg-migration. Thanks!

@andriishin andriishin closed this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant