100 Commits

Author SHA1 Message Date
f7d0dfdfb6 feat: UI polish — AI enhancements branding, footer year, admin background fix
- Header: add "+ AI enhancements" italic subtitle below logo
- Footer: update copyright year to 2021–current, add "AI enhancements by Cloud Host" link
- Admin page: wrap all states in pageBg Box so dark-mode background shows correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 11:21:34 +01:00
171b40f525 fix: serialise local Cog model calls with a queue to prevent 409 conflicts 2026-03-10 10:39:06 +01:00
41d2aa7295 fix: respect JigsawStack 5000-char limit with proper batching
- buildBatches: groups texts into chunks that fit within 4800 chars
  (200 char safety margin) when joined with the separator
- translateLongText: splits individual cells/paragraphs that exceed
  the limit at paragraph/sentence boundaries, translates each chunk,
  then rejoins — instead of hitting the API with oversized input
- Process batches sequentially to avoid overloading the local model
- Separator fallback still works: if separator gets translated,
  falls back to individual calls per text within that batch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 10:26:22 +01:00
38c3e3e2cb fix: chown entire /app to nextjs before build so .next dir can be created 2026-03-10 10:03:55 +01:00
b0f7f30f17 fix: replace Progress component with plain Box bar + use npm ci in Docker
- DocumentTranslator: replace Chakra Progress (broken types in 2.2.1
  with fresh installs) with a simple Box-based progress bar — no type
  issues, same visual result
- Dockerfile: switch from npm install to npm ci so Docker uses exact
  locked versions from package-lock.json, preventing type discrepancies
  between local and Docker builds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 10:00:04 +01:00
c795ef5a54 fix: replace colorScheme on Progress with sx workaround for Chakra 2.2.1 type strictness 2026-03-10 09:52:48 +01:00
a435e8c749 fix: add explicit types to all event handler params in DocumentTranslator 2026-03-10 09:45:51 +01:00
7a30d14f0f fix: skip Cypress binary download in Docker build (CYPRESS_INSTALL_BINARY=0) 2026-03-10 09:42:48 +01:00
2354ddf9be fix: add explicit React.DragEvent type on onDragOver handler 2026-03-10 09:38:06 +01:00
466459373a fix: move next build to image build time, drop yarn, add runner stage
- Build Next.js app during docker build (not on container start) —
  fixes yarn cache permission errors and makes container startup instant
- Remove yarn.lock during build so nothing can accidentally invoke yarn
- Add lean runner stage: copies only .next, node_modules, public —
  reduces final image size
- npm start is now the only thing that runs at container start

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 09:18:23 +01:00
8f98e54b18 fix: explicit subnet for docker-compose to avoid pool exhaustion
Assign a fixed subnet (10.100.50.0/24) to lingvai-net so Docker
doesn't try to auto-allocate from its default address pool, which
fails with 'all predefined address pools have been fully subnetted'
on hosts running many containers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 09:13:32 +01:00
a7ca88cabb fix: docker-compose networking and local translator endpoint
- Replace per-service network_mode:bridge with a shared lingvai-net
  so lingvai-app can reach lingvai-translator by hostname
- Set LOCAL_MODEL_ENDPOINT=http://lingvai-translator:5000/predictions
  and REPLICATE_MODE=local via environment so admin panel defaults
  are pre-configured for the local container
- Add depends_on: translator so the app starts after the model is up
- Host port 5030->5000 kept for direct debugging access

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 09:10:54 +01:00
0be8b0b0f0 fix: resolve 422 from Replicate + add local Cog Docker mode
- replicate-translate: parse owner/model:hash correctly — extract only
  the hash portion for the version field, and use the model endpoint
  (POST /v1/models/{owner}/{model}/predictions) which avoids 422
  'Invalid version' errors when sending the full owner/model:hash string.

- Add local Cog mode: when replicateMode="local", calls the local Docker
  container directly (no Replicate API key needed), default endpoint
  http://localhost:5030/predictions (host port 5030 → container port 5000).

- settings-store: add replicateMode ("cloud"|"local") and localEndpoint
  fields with env var fallbacks REPLICATE_MODE and LOCAL_MODEL_ENDPOINT.

- admin panel: Radio selector for Cloud vs Local mode; shows docker run
  command snippet and local endpoint URL field when local is selected;
  hides Replicate API token field in local mode (not needed).

Local model startup:
  docker run -d -p 5030:5000 \
    r8.im/jigsawstack/text-translate@sha256:454df4c...

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 08:50:40 +01:00
e034771087 fix: handle EACCES on data/settings.json in Docker containers
- settings-store: auto-detect writable path at startup — tries
  <cwd>/data/settings.json first, falls back to /tmp/lingvai-settings.json
  if the directory is not writable. Logs a warning when fallback is used.
  Also supports SETTINGS_PATH env var for explicit override.

- Dockerfile: switch from yarn to npm, explicitly create /app/data with
  chown nextjs:nodejs so the directory is writable at runtime without
  needing a privileged volume mount.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 08:23:29 +01:00
0799101da3 feat: add admin panel, Replicate AI translation, and document translation
- Admin panel (/admin) with JWT auth: configure Replicate API token,
  JigsawStack API key, model version, enable/disable AI translation,
  change admin password. Settings persisted in data/settings.json.

- Replicate AI translation: POST /api/translate/replicate uses
  JigsawStack text-translate model via Replicate API. Main page
  switches to client-side AI translation when enabled.

- Document translation tab: supports PDF, DOCX, XLSX, XLS, CSV.
  Excel/Word formatting fully preserved (SheetJS + JSZip XML manipulation).
  PDF uses pdf-parse extraction + pdf-lib reconstruction.
  Column selector UI for tabular data (per-sheet, All/None toggles).

- Updated README with full implementation documentation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 07:43:54 +01:00
David
0190ea5da9 Added instance lingva.lunar.icu [skip ci] (#147) 2023-01-13 17:53:04 +01:00
igna
bf9471ba56 Instances cleanup [skip ci] (#142) 2022-11-02 16:15:27 +01:00
David
d2d405c3e5 Added editorconfig [skip ci] (#141) 2022-10-25 01:10:16 +02:00
David
81fd11ee62 Fix tests typings (#140) 2022-10-21 15:57:53 +02:00
David
6e254e66a0 Update scraper languages & add and remove instances (#138) 2022-10-09 21:36:33 +02:00
David
af24caf962 Added Docker healthcheck and projectsegfau instance (#131) 2022-07-26 14:30:58 +02:00
Nico
5c3abdf4b6 Add Garudalinux' & dr460nf1r3's instances (#129)
* Add Garudalinux' & dr460nf1r3's instance

* [skip ci]

* Add instances to instances.json  [skip ci]
2022-07-26 13:34:46 +02:00
David
1ad5027412 Added instance lingva.opnxng.com [skip ci] (#125) 2022-06-29 00:16:17 +02:00
David
443e98146b Added instance translate.plausibility.cloud (#122) 2022-06-26 21:03:23 +02:00
igna
9073a267b7 Add translate.igna.ooo instance [skip ci] (#115)
* [skip ci] add `translate.igna.ooo`

* [skip ci] add `translate.igna.ooo`
2022-06-16 02:35:12 +02:00
David
2f461b1894 Revert Docker ARM images (#117) 2022-06-16 02:18:10 +02:00
David
c6e81f2be4 Fix Docker ARM images support in CI (#116) 2022-06-16 01:14:46 +02:00
David
0a22d26a98 Add Docker ARM images support in CI (#114) 2022-06-16 00:49:29 +02:00
David
274e7f1a4b Refactor to external scraper and update dependencies (#113) 2022-06-15 23:37:15 +02:00
David
ff1ad202ae Fix translation query overflow (#106) 2022-05-04 21:11:44 +02:00
David
a8ed159bf4 Fix audio being unclickable on textarea focus (#105)
* Fix audio being unclickable on textarea focus

* Small Readme fix
2022-05-04 20:28:59 +02:00
David
6fbf9fac4e Added instance lingva.lunar.icu (#104)
* Added instance lingva.lunar.icu

* Changed hosting provider
2022-05-04 19:44:30 +02:00
m2jest1c
210aa27e49 Added translate.plausibility.cloud [skip ci] (#98)
* added my instance

* updated instances.json
2022-03-06 11:21:34 +01:00
David
16ab855ccc Updated to new dependencies (#95) 2022-02-24 21:33:17 +01:00
David
5856776785 Default languages with env & langcodes typed (#94) 2022-02-24 19:53:31 +01:00
Esmail EL BoB
5e4db73a9f Add lingva.esmailelbob.xyz instance (#86)
* added my instance :)

* Update instances.json

* Fix markdown table formatting

Co-authored-by: David <info@thedaviddelta.com>
2022-02-08 21:28:34 +01:00
David
0d5d9a129e Create JSON file with instance list (#85)
* Create json file with instance list

* Remove trailing slashes
2022-02-07 19:51:59 +01:00
David
6b8ed50251 Add Vercel sponsor banner as environment (#83) 2022-01-24 10:13:26 +01:00
David
929721b3d4 Add datatunnel instance & change Next.js branding (#82) 2022-01-24 00:53:52 +01:00
David
adb90754ea Vercel OSS Sponsorship (#81) 2022-01-23 23:30:36 +01:00
David
260c603bed Add related projects to Readme (#78) 2022-01-19 17:13:43 +01:00
David
5ad055350e Docker Node version to LTS (#65) 2021-11-01 15:54:37 +01:00
David
3f0918edf3 Default dark theme with environment variable (#61)
* Created env variable for setting dark as default theme

* Docker variable simplified
2021-10-24 16:08:35 +02:00
allcontributors[bot]
064ce141cb docs: add TheFrenchGhosty as a contributor for doc (#60)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-24 13:51:08 +02:00
TheFrenchGhosty
8e45af1396 Enhance the deployment documentation and add a docker-compose [skip ci] (#55)
* Enhance the deployment documentation and add a docker-compose

* Fix a typo

* Fix various spelling mistake

* Apply the requested change
2021-10-24 13:49:40 +02:00
TheFrenchGhosty
420a7485a1 Add lingva.pussthecat.org [skip ci] (#53)
* [skip ci] Add lingva.pussthecat.org
* [skip ci] Update the hosting provider
2021-10-17 18:51:29 +02:00
David
80a925ab4d Save languages to LocalStorage (#52)
* Saving & restoring implemented
2021-10-10 21:45:14 +02:00
David
126ded01fd Added PORT param to start script (#50) 2021-10-03 20:51:36 +02:00
in the moon
f00703d52b Update tixte.gifts instance (#48)
* remove tixte.gifts

* Update README.md
2021-09-09 16:48:27 +02:00
David
15f440e698 Docker image autodeploy using Travis (#47)
* Docker travis initial test

* Added build command

* Final version
2021-09-05 17:21:51 +02:00