mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
feat: add contributing guidelines and pull request template; update schema comments and documentation
This commit is contained in:
@@ -2,6 +2,9 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const vm = require('vm');
|
||||
|
||||
// CONTRACT:
|
||||
// This list is the script-side locale source of truth. Keep it in sync with
|
||||
// webapp/src/lib/i18n.ts whenever adding/removing a locale.
|
||||
const localeDir = path.join(__dirname, '..', 'webapp', 'src', 'lib', 'i18n', 'locales');
|
||||
|
||||
const localeFiles = [
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
const { localeFiles, readLocale } = require('./i18n-utils.cjs');
|
||||
|
||||
// CONTRACT:
|
||||
// This is the authoritative locale consistency gate. It checks key parity,
|
||||
// placeholder parity, and accidental mostly-English locale files. Run after any
|
||||
// user-facing text or locale-file change.
|
||||
const locales = Object.fromEntries(
|
||||
localeFiles.map(([locale, fileName, variableName]) => [locale, readLocale(fileName, variableName)])
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user