Context
- Project: video game using Accent self-hosted to translate game texts.
- Stack: VPS (Hostinger KVM4) → Portainer → Docker containers from the (
accent_app, accent_db with PostgreSQL).
- Reverse proxy managed.
- Accent is running: the web UI is accessible and the
accent stats command works correctly (API is reachable).
File organization
-
Local repo (Git): texts are stored as CSV, converted to JSONs by language during CI/CD in a folder named output/json.
- Example:
output/json/en.json, output/json/fr.json, etc.
-
On Accent (server): there is a single global document game_texts.json containing all languages.
Problem
# ============================
# 4️⃣ Push to Accent (manual)
# ============================
push_to_accent:
stage: push_accent
image: node:16
script:
- |
if [ -z "$ACCENT_API_KEY" ] || [ -z "$ACCENT_API_URL" ]; then
echo "[ERROR] ACCENT_API_KEY or ACCENT_API_URL not set. Aborting. ❌"
exit 1
fi
- echo "[INFO] Checking if accent.json is present..."
- if [ -f "./accent.json" ]; then echo "[INFO] accent.json found"; else echo "[ERROR] accent.json missing"; exit 1; fi
- |
if [ -d "./output/json" ] && [ "$(ls -A ./output/json)" ]; then
echo "[INFO] JSON files to be pushed:"
ls -la ./output/json
else
echo "[ERROR] No JSON files found in ./output/json to push!"
exit 1
fi
- npm install -g accent-cli
- echo "[INFO] Pushing JSON to Accent... ⬆️"
- mkdir -p ./output/json_output
- accent sync --add-translations --merge-type=passive --config ./accent.json
- echo "[INFO] Push to Accent completed successfully ✅"
artifacts:
paths:
- ./output/
expire_in: 1 week
needs:
- job: csv_to_json
artifacts: true
- job: check_json_integrity
rules:
- when: manual
GitLab CI/CD variables ACCENT_API_KEY, ACCENT_API_URL & ACCENT_PROJECT have been set to prevent adding secrets on the repo.
Observed behavior:
accent stats works (API OK ✅):
^ Game Texts • 69.26% reviewed
⎯
Last synced
2025-09-14T13:10:57Z
Master language
French – fr
Translations (8)
Chinese Simplified – zh-Hans • 0% reviewed
English – en • 100% reviewed
German – de • 84.83% reviewed
Italian – it • 84.78% reviewed
Japanese – ja • 84.29% reviewed
Korean – ko • 84.24% reviewed
Portuguese, Brazilian – pt-BR • 0% reviewed
Spanish – es • 85.17% reviewed
Documents (1)
game_texts - JSON (No matches in config file)
accent sync --add-translations --merge-type=passive --config ./accent.json returns error on the CI/CD:
Fetch config in ./accent.json... API Client ✓
Syncing sources → fr ✓
› Error: {"error":"Internal error","message":"An error occurred, someone has
› been notified"}
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1
accent export returns an error:
Fetch config in accent.json... API Client ✓
Writing files locally
↓ output/json_output/fr.json output/json → fr
» Error: Not found
- Logs show that
fr.json is used as source, but Accent does not update the server-side document game_texts.json.
Hypothesis
- Accent might expect a configuration that matches the single global document
game_texts.json stored on the server (field documents.path in the DB).
- The CLI documentation mentions a placeholder
%document_path% for source/target, but it’s unclear how to use it when:
- server side → one global document (
game_texts.json)
- local repo → multiple per-language files (
fr.json, en.json, etc.).
Questions
- What is the correct
accent.json configuration to map a single global document (game_texts.json) on the Accent server to multiple per-language files (fr.json, en.json, etc.) in the repo?
- Should
%document_path% be used in target?
- Are there any known limitations when running Accent behind a reverse proxy (Nginx Proxy Manager)?
- Last bonus question, if I want to use my GitLab CI/CD to pull translations from accent, bring back each translation into the
output/json_output/ folder as a single json file per language (i.e. fr.json), do I need to use a different config file or Accent is already able to do that using accent sync?
Context
accent_app,accent_dbwith PostgreSQL).accent statscommand works correctly (API is reachable).File organization
Local repo (Git): texts are stored as CSV, converted to JSONs by language during CI/CD in a folder named
output/json.output/json/en.json,output/json/fr.json, etc.On Accent (server): there is a single global document
game_texts.jsoncontaining all languages.Problem
Running:
Current
accent.json:{ "files": [ { "format": "json", "source": "./output/json/fr.json", "target": "./output/json_output/%slug%.json" } ] }CI/CD script for
push_to_accentjob:GitLab CI/CD variables
ACCENT_API_KEY,ACCENT_API_URL&ACCENT_PROJECThave been set to prevent adding secrets on the repo.Observed behavior:
accent statsworks (API OK ✅):^ Game Texts • 69.26% reviewed ⎯ Last synced 2025-09-14T13:10:57Z Master language French – fr Translations (8) Chinese Simplified – zh-Hans • 0% reviewed English – en • 100% reviewed German – de • 84.83% reviewed Italian – it • 84.78% reviewed Japanese – ja • 84.29% reviewed Korean – ko • 84.24% reviewed Portuguese, Brazilian – pt-BR • 0% reviewed Spanish – es • 85.17% reviewed Documents (1) game_texts - JSON (No matches in config file)accent sync --add-translations --merge-type=passive --config ./accent.jsonreturns error on the CI/CD:accent exportreturns an error:Fetch config in accent.json... API Client ✓ Writing files locally ↓ output/json_output/fr.json output/json → fr » Error: Not foundfr.jsonis used as source, but Accent does not update the server-side documentgame_texts.json.Hypothesis
game_texts.jsonstored on the server (fielddocuments.pathin the DB).%document_path%forsource/target, but it’s unclear how to use it when:game_texts.json)fr.json,en.json, etc.).Questions
accent.jsonconfiguration to map a single global document (game_texts.json) on the Accent server to multiple per-language files (fr.json,en.json, etc.) in the repo?%document_path%be used intarget?output/json_output/folder as a single json file per language (i.e.fr.json), do I need to use a different config file or Accent is already able to do that usingaccent sync?