Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: linguito
Sidwebworks418b687211da
diff --git a/.husky/pre-commit b/.husky/pre-commitindex 2a7b749a3b..46a2cb621e 100755--- a/.husky/pre-commit+++ b/.husky/pre-commit@@ -7,7 +7,13 @@ npx lint-stagedif git diff --cached --name-only | grep -qE '\.(tsx?|jsx?)$|\.po$'; thenecho "Compiling translations..."npm run lingui:check-++ # Strip `#:` origin refs before committing — they shift on any upstream+ # code edit and are the biggest PR-conflict source. They're kept in the+ # working dir during the translate flow (linguito needs them for LLM+ # context) and only stripped right before commit.+ node scripts/strip-po-headers.mjs+# Add compiled locale files to the commitgit add packages/locale/locales/**/*.pofidiff --git a/lingui.config.js b/lingui.config.jsindex aefd2a450d..73f8d9ab58 100644--- a/lingui.config.js+++ b/lingui.config.js@@ -1,5 +1,4 @@import { defineConfig } from "@lingui/cli";-import { formatter } from "@lingui/format-po";export default defineConfig({sourceLocale: "en",@@ -7,10 +6,11 @@ export default defineConfig({fallbackLocales: {default: "en"},- // Drop `#: path:lineno` origins — they churn on every PR as soon as any- // upstream code shifts and account for ~half the diff in our .po files.- // POT-Creation-Date is stripped post-extract (see scripts/strip-po-headers.mjs).- format: formatter({ origins: false, lineNumbers: false }),+ // Plain string format kept for tooling compat (linguito, weblate). Origin+ // refs (`#: path:lineno`) and POT-Creation-Date are stripped post-extract+ // in scripts/strip-po-headers.mjs — those metadata lines churn on every PR+ // and account for ~half of the diff in our .po files.+ format: "po",catalogs: [{path: "packages/locale/locales/{locale}/erp",diff --git a/package.json b/package.jsonindex af3ee69a37..4d106987fd 100755--- a/package.json+++ b/package.json@@ -55,12 +55,12 @@"lint": "turbo run lint","lingui:check": "pnpm run lingui:extract && pnpm run lingui:compile","lingui:compile": "lingui compile --namespace es",- "lingui:extract": "lingui extract --clean && node scripts/strip-po-headers.mjs",+ "lingui:extract": "lingui extract --clean","novu:sync": "pnpm dlx novu@latest sync --bridge-url https://app.carbon.ms/api/novu --secret-key $NOVU_SECRET_KEY --api-url https://api.novu.co","prepare": "pnpm exec husky install","test": "turbo run test","tool:new": "tsx scripts/create-tool.ts",- "translate": "pnpm dlx linguito translate --llm",+ "translate": "pnpm run lingui:extract && pnpm dlx linguito translate --llm","agent:new": "tsx scripts/create-agent.ts","typecheck": "turbo run typecheck --filter='*'","typegen": "turbo run typegen"diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 1ee965c593..609a46ca4a 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "Entity ist {status}"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "PDF-Wasserzeichen"msgid "PDFs"msgstr "PDFs"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "Synchronisierungsoptionen anzeigen"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "Wird als schwacher Hintergrund hinter jeder Seite generierter PDFs angezeigt"msgid "Shown to the user when this rule fails."msgstr "Wird dem Benutzer angezeigt, wenn diese Regel fehlschlägt."diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 1122476156..5c03e83090 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "La entidad es {status}"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "Marca de agua PDF"msgid "PDFs"msgstr "PDFs"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "Mostrar opciones de sincronización"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "Se muestra como un fondo tenue detrás de cada página de los PDF generados"msgid "Shown to the user when this rule fails."msgstr "Se muestra al usuario cuando esta regla falla."diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 1159ad2b5e..e6bfed3535 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "L'entité est {status}"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "Filigrane PDF"msgid "PDFs"msgstr "PDFs"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "Afficher les options de synchronisation"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "Affiché en arrière-plan discret sur chaque page des PDF générés"msgid "Shown to the user when this rule fails."msgstr "Affiché à l'utilisateur lorsque cette règle échoue."diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 820ce11cae..f215974383 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "Entity {status} है"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "PDF वॉटरमार्क"msgid "PDFs"msgstr "PDFs"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "सिंक विकल्प दिखाएं"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "जनरेट की गई PDF के हर पेज के पीछे हल्की पृष्ठभूमि के रूप में दिखाया जाता है"msgid "Shown to the user when this rule fails."msgstr "जब यह नियम विफल हो तो उपयोगकर्ता को दिखाया जाता है।"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex e5a255bee4..6e03ef9467 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "L'entità è {status}"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "Filigrana PDF"msgid "PDFs"msgstr "PDF"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "Mostra opzioni di sincronizzazione"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "Mostrato come sfondo tenue dietro ogni pagina dei PDF generati"msgid "Shown to the user when this rule fails."msgstr "Mostrato all'utente quando questa regola non riesce."diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex a4777daabe..a600449566 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "エンティティは {status} です"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP、MES、QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "PDF透かし"msgid "PDFs"msgstr "PDF"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "同期オプションを表示"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "生成されたPDFの各ページの背景に薄く表示されます"msgid "Shown to the user when this rule fails."msgstr "このルールが失敗したときにユーザーに表示されます。"diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex abd2a364f9..67399e69c8 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "Jednostka ma status {status}"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "Znak wodny PDF"msgid "PDFs"msgstr "Pliki PDF"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "Pokaż opcje synchronizacji"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "Wyświetlany jako delikatne tło za każdą stroną wygenerowanych plików PDF"msgid "Shown to the user when this rule fails."msgstr "Wyświetlane użytkownikowi, gdy ta reguła się nie powiedzie."diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex 7f2da9c16e..5f29c6430c 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "Entidade é {status}"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "Marca d'água do PDF"msgid "PDFs"msgstr "PDFs"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "Mostrar opções de sincronização"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "Exibido como um fundo suave atrás de cada página dos PDFs gerados"msgid "Shown to the user when this rule fails."msgstr "Mostrado ao usuário quando esta regra falha."diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 95de3b6724..6d5d1c7258 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "Сущность имеет статус {status}"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "Водяной знак PDF"msgid "PDFs"msgstr "PDF-файлы"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "Показать параметры синхронизации"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "Отображается как бледный фон на каждой странице сгенерированных PDF-файлов"msgid "Shown to the user when this rule fails."msgstr "Показывается пользователю при ошибке этого правила."diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex c2bfe2a52b..3bea4841c4 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -2924,7 +2924,7 @@ msgid "Entity is {status}"msgstr "实体为 {status}"msgid "EORI"-msgstr ""+msgstr "EORI"msgid "ERP, MES, QMS"msgstr "ERP, MES, QMS"@@ -5412,7 +5412,7 @@ msgid "PDF"msgstr "PDF"msgid "PDF Watermark"-msgstr ""+msgstr "PDF 水印"msgid "PDFs"msgstr "PDF"@@ -6880,7 +6880,7 @@ msgid "Show sync options"msgstr "显示同步选项"msgid "Shown as a faint background behind every page of generated PDFs"-msgstr ""+msgstr "作为淡色背景显示在每个生成的PDF页面后面"msgid "Shown to the user when this rule fails."msgstr "当此规则失败时向用户显示。"diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 476f22efc3..f674d54e78 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -666,7 +666,7 @@ importers:version: 0.7.3([email protected])([email protected])'@novu/framework':specifier: 2.10.0'@novu/headless':specifier: 2.7.0-alpha.0version: 2.7.0-alpha.0@@ -774,7 +774,7 @@ importers:version: 11.18.2(@emotion/[email protected])([email protected]([email protected]))([email protected])inngest:specifier: ^3.52.7- version: 3.54.0(@opentelemetry/[email protected](@opentelemetry/[email protected]))([email protected])([email protected])([email protected])([email protected])+ version: 3.54.0(@opentelemetry/[email protected](@opentelemetry/[email protected]))([email protected])([email protected])([email protected])([email protected])intl-parse-accept-language:specifier: 'catalog:'version: 1.0.0@@ -14047,7 +14047,7 @@ snapshots:dependencies:'@novu/shared': 2.6.6- '@novu/[email protected]([email protected])([email protected]([email protected]))([email protected])':+ '@novu/[email protected]([email protected])([email protected]([email protected]))([email protected])':dependencies:ajv: 8.18.0ajv-formats: 2.1.1([email protected])@@ -14060,7 +14060,7 @@ snapshots:pluralize: 8.0.0sanitize-html: 2.17.3optionalDependencies:- express: 4.22.1+ express: 5.2.1zod: 3.25.76zod-to-json-schema: 3.25.2([email protected])transitivePeerDependencies:@@ -20456,43 +20456,6 @@ snapshots:- [email protected](@opentelemetry/[email protected](@opentelemetry/[email protected]))([email protected])([email protected])([email protected])([email protected]):- dependencies:- '@bufbuild/protobuf': 2.11.0- '@inngest/ai': 0.1.7- '@jpwilliams/waitgroup': 2.1.1- '@opentelemetry/api': 1.9.0- '@opentelemetry/auto-instrumentations-node': 0.72.0(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected]))- '@opentelemetry/context-async-hooks': 2.6.1(@opentelemetry/[email protected])- '@opentelemetry/exporter-trace-otlp-http': 0.214.0(@opentelemetry/[email protected])- '@opentelemetry/instrumentation': 0.214.0(@opentelemetry/[email protected])- '@opentelemetry/resources': 2.6.1(@opentelemetry/[email protected])- '@opentelemetry/sdk-trace-base': 2.6.1(@opentelemetry/[email protected])- '@standard-schema/spec': 1.1.0- '@traceloop/instrumentation-anthropic': 0.20.0- '@types/debug': 4.1.13- '@types/ms': 2.1.0- canonicalize: 1.0.8- chalk: 4.1.2- cross-fetch: 4.1.0- debug: 4.4.3([email protected])- hash.js: 1.1.7- json-stringify-safe: 5.0.1- ms: 2.1.3- serialize-error-cjs: 0.1.4- strip-ansi: 5.2.0- temporal-polyfill: 0.2.5- ulid: 2.4.0- zod: 3.25.76- optionalDependencies:- express: 4.22.1- hono: 4.12.14- typescript: 5.8.3- transitivePeerDependencies:- - '@opentelemetry/core'- - encoding- - supports-color-[email protected](@opentelemetry/[email protected](@opentelemetry/[email protected]))([email protected])([email protected])([email protected])([email protected]):dependencies:'@bufbuild/protobuf': 2.11.0diff --git a/scripts/strip-po-headers.mjs b/scripts/strip-po-headers.mjsindex f34587a1bb..3048e97328 100644--- a/scripts/strip-po-headers.mjs+++ b/scripts/strip-po-headers.mjs@@ -1,17 +1,25 @@#!/usr/bin/env node-// Strip churny metadata from .po files after `lingui extract`.-// Right now: drop POT-Creation-Date (changes every run, conflicts on every PR).-// Origins (`#: path:lineno`) are disabled in lingui.config.js itself.+// Normalize .po files before commit. Strips two churn sources:+//+// 1. `POT-Creation-Date` header — wall clock at extract time, produces a+// 1-line diff per file on every run even when nothing changed.+// 2. `#: path:lineno` origin refs — shift on any upstream code edit, the+// biggest PR-conflict source.+//+// `pnpm run translate` deliberately runs `lingui:extract` BEFORE invoking+// linguito so origins exist while linguito resolves source files for LLM+// context. After commit they're stripped here.import { readFileSync, writeFileSync } from "node:fs";import { glob } from "node:fs/promises";const CATALOG_GLOB = "packages/locale/locales/*/*.po";-const STRIP_PATTERN = /^"POT-Creation-Date: .*\\n"\n/m;+const STRIP_DATE = /^"POT-Creation-Date: .*\\n"\n/m;+const STRIP_ORIGIN = /^#:.*\n/gm;let touched = 0;for await (const path of glob(CATALOG_GLOB)) {const src = readFileSync(path, "utf8");- const out = src.replace(STRIP_PATTERN, "");+ const out = src.replace(STRIP_DATE, "").replace(STRIP_ORIGIN, "");if (out !== src) {writeFileSync(path, out);touched += 1;