Self-hosted service
Nriver/trilium-translation avatar
Nriver/trilium-translation

Nriver/trilium-translation: a regex-patched Chinese build of Trilium Notes

Translation for Trilium Notes. Trilium Notes 中文适配, 体验优化

2,862 stars313 forksHTMLAGPL-3.0

At a glance

What is it?
This fork does not add a language pack to Trilium Notes. It downloads the official release, rewrites UI strings with regular expressions, and repacks the binaries. That choice explains both what it is good for and why it cannot offer a language switch.
Who is it for?
Adopt it if you want a Chinese-language Trilium Notes desktop or server build and you accept that the language is baked into the binaries, with no runtime switch and a backup required before the first launch. Do not adopt it if you need multi-language switching, if you cannot rebuild from source when a translation string breaks the UI, or if you expect upstream releases to be tracked automatically.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 70 days ago.
What is it written in?
Mainly HTML, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap this fork fills, and the gap it creates

Trilium Notes ships as an English application. The upstream project has no language pack mechanism that this repository can hook into, so Nriver/trilium-translation takes a different route: it produces a pre-patched Chinese build of Trilium itself. The README describes the goal as 中文适配 with 体验优化, meaning Chinese adaptation plus experience tweaks, and the screenshots show a Nier theme alongside the stock dark and light themes. So the deliverable is not a plugin or a locale file. It is a set of downloadable binaries for Linux, Linux server, Windows and macOS, plus a Docker image published as nriver/trilium-cn on Docker Hub. The audience is Chinese-speaking users who want the notes application itself in Chinese and are willing to run a fork rather than upstream. That framing matters because every consequence in this review follows from it. If you want upstream Trilium with a Chinese interface, this repository is the only thing in the material that offers it, and it offers it at the cost of staying off the official release channel.

How the translation is actually produced

The mechanism is stated plainly in the README: the scripts extract resource files from the latest official Trilium Notes release, apply regular expression replacements to UI text in each file, then pack the translated files back into the package. There is no gettext catalogue, no JSON locale directory, no runtime lookup. A build is a binary with substituted strings. The translation pipeline is a sequence of Python scripts driven by two data files. settings.py holds path and configuration values that the README says you must adjust by the comments, and translations.py holds the string mapping, with translations_cn.py given as the working Chinese example running past 1000 lines. Two constraints on that mapping are worth reading twice. Some entries deliberately begin or end with quotes because the quotes are part of the regex match, and the README warns not to remove them during translation. Placeholders of the form ${xxxx} come from the original Trilium source and must not be modified. Both rules exist because the replacement is textual, not structural: the script does not know what a placeholder means, so a careless edit produces a string that compiles and then misbehaves at runtime.

Building it yourself: the four scripts and what they need

The README gives the build sequence in order. Run python3 init.py to download the latest Trilium Notes, then python3 trans.py to make a translation patch, then python3 make_release.py to apply that patch to releases for all platforms. Before any of that, you edit settings.py and translations.py. The environment requirements are listed as Python 3 with the requests module installed via pip3 install requests --user, Node.js with asar, webpack and webpack-cli installed globally plus webpack saved as a dev dependency, and 7z if you intend to produce a release archive. The author states the development environment is Manjaro-based and that path configuration in the code needs changing to work elsewhere, so a macOS or Windows build from source is not a supported path out of the box. One warning is printed in capitals and deserves to be taken literally: the scripts include rm -rf commands. That is the single most important line in the README for anyone who intends to run this on a machine holding real data. Read the scripts before executing them, and do not run them from a directory you care about.

Running the server image instead of building

For most users the Python toolchain is unnecessary, because the repository publishes a Docker image. The README points at a docker-compose.yml in the repository root and gives the command docker-compose up -d. That pulls the Chinese build from Docker Hub and, according to the README, places your note data in the same directory as the compose file. The server is then reachable at http://127.0.0.1:8080. This is the lowest-friction route: no Node.js, no asar, no 7z, no path edits. It also means you inherit whatever Trilium version the image was built against rather than choosing it. The releases in the material are tagged with both a Trilium version and a date, for example v0.63.7_20240530, v0.63.5_20240401 and v0.63.3_20240312, so the version pairing is explicit in the naming. If you need a specific Trilium version, read the tag rather than assuming the image tracks upstream continuously. The README also carries a blunt instruction in its opening section: if you have old data, back it up before use. That applies to both the desktop binaries and the server image.

The hard-coded translation is the design, not a bug

The Limitations section is unusually direct. The translation is hard-coded in the frontend and backend source code, so you cannot switch between languages. There is no toggle, no locale setting, no fallback. The second limitation is the one that should shape your risk assessment: if there are mistakes in the translation, Trilium Notes may not function correctly. This is not a cosmetic concern. Because the replacement is regex-based over resource files, a pattern that matches more than intended can alter code rather than a label. The README's remedy is also the clearest statement of the recovery cost: if you break Trilium Notes, you need to redownload everything with init.py. There is no incremental repair path and no diagnostic mode described. A user who edits translations.py and produces a broken build has to start the download again. For a translation project that is a reasonable trade, but it means the fork is a build-time product rather than a configurable one, and it should be evaluated as such.

Where this sits against upstream Trilium and against a locale-file approach

The natural alternative is upstream Trilium Notes as published by Zadam. The difference in approach is architectural, not cosmetic. Upstream ships English text compiled into the application and has no supported hook for replacing it, which is exactly why this fork exists. A locale-file approach, the pattern used by many desktop applications where translations live in external catalogues loaded at startup, would let a user switch languages and would let a translator fix a string without rebuilding a binary. Trilium does not offer that in the material shown here, so the fork substitutes text before packaging instead. The trade is visible in both directions. Upstream users get official releases, automatic updates and a single language. Users of this fork get a Chinese interface and lose the language switch, and they depend on the maintainer rebuilding whenever upstream changes. The repository's own history reflects that dependency: the translation code for Zadam's Trilium was moved to a zadam-version branch, and the main branch now develops a modified version of Trilium rather than only translating it. That is a meaningful scope change, and anyone evaluating the project should decide whether they want a translation or a fork with its own feature direction.

Maintenance cost, version drift and the AGPL-3.0 boundary

The maintenance model is the weakest part of the picture. Each release tag pairs a Trilium version with a build date, and the gap between v0.63.3 in March 2024 and v0.63.7 in May 2024 shows the cadence is tied to upstream movement plus the maintainer's own time. Nothing in the material describes an automated pipeline that watches upstream and rebuilds. A user who wants a Trilium version newer than the latest tag has to run init.py, trans.py and make_release.py themselves, which means maintaining a Python and Node.js toolchain and re-checking translations.py against any UI text upstream has changed. On licensing, the repository is AGPL-3.0. Trilium Notes itself is also distributed under a copyleft licence, and the fork repackages upstream binaries with modified resources, so anyone redistributing a build carries the obligations that come with that. This is a description of the licence identifier in the repository metadata, not legal advice; if you plan to redistribute a patched build inside an organisation, have someone read the actual licence text rather than this paragraph.

Editorial conclusion

Adopt it if you want a Chinese-language Trilium Notes desktop or server build and you accept that the language is baked into the binaries, with no runtime switch and a backup required before the first launch. Do not adopt it if you need multi-language switching, if you cannot rebuild from source when a translation string breaks the UI, or if you expect upstream releases to be tracked automatically. Before installing, verify the release tag matches the Trilium version you intend to run, confirm the database path used by your platform so your backup covers it, and read the rm -rf warnings in the build scripts if you plan to compile the translation yourself.

Official sources

  1. Issues
  2. License: AGPL-3.0
  3. Nriver/trilium-translation on GitHub
  4. README
  5. Releases
Community notes

Community notes