[PR #46] [MERGED] Feature/i18n #96

Closed
opened 2026-05-07 00:18:54 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/glenndehaan/unifi-voucher-site/pull/46
Author: @glenndehaan
Created: 10/14/2024
Status: Merged
Merged: 10/14/2024
Merged by: @glenndehaan

Base: masterHead: feature/i18n


📝 Commits (7)

  • 79b75cd Setup initial locales folder for translations. Added English translations for email. Added _locales.json for mapping
  • 1b1a934 Implemented the translation.js module. Implemented the 'TRANSLATION_DEBUG' environment variable. Updated the README.md to include the Translations chapter. Moved en.json to en/email.json to better utilize Crowdin
  • 467ce7e Implemented mail translations. Updated debug output from translation.js
  • 1bc459d Swapped mail function parameters. Replaced throw errors for log warnings. Implemented fallback language in translation.js. Added express-locale for future web i18n use
  • d5c19d0 Removed _locales.json implementation. Added language parameter to mail.js. Implemented regex check to translation.js. Added language dropdown to email component. Added languages.js
  • c3b36b5 Implemented the print.json translation file. Added a new print dialog. Moved /print function to a post request. Updated translation.js debug output. Implemented translator within print.js. Fixed typos. Removed unused utils from email and print components render function
  • eafd7aa Updated README.md

📊 Changes

16 files changed (+308 additions, -57 deletions)

View changed files

📝 README.md (+26 -0)
📝 docker-compose.yml (+1 -0)
locales/en/email.json (+19 -0)
locales/en/print.json (+15 -0)
📝 modules/mail.js (+11 -3)
📝 modules/print.js (+37 -28)
modules/translation.js (+48 -0)
📝 modules/variables.js (+1 -0)
📝 package-lock.json (+7 -0)
📝 package.json (+1 -0)
📝 server.js (+38 -5)
📝 template/components/email.ejs (+11 -1)
template/components/print.ejs (+44 -0)
📝 template/email/voucher.ejs (+16 -16)
📝 template/voucher.ejs (+26 -4)
utils/languages.js (+7 -0)

📄 Description

No description provided


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/glenndehaan/unifi-voucher-site/pull/46 **Author:** [@glenndehaan](https://github.com/glenndehaan) **Created:** 10/14/2024 **Status:** ✅ Merged **Merged:** 10/14/2024 **Merged by:** [@glenndehaan](https://github.com/glenndehaan) **Base:** `master` ← **Head:** `feature/i18n` --- ### 📝 Commits (7) - [`79b75cd`](https://github.com/glenndehaan/unifi-voucher-site/commit/79b75cd56ce580b065b9ea5bbacb0e4ee5bb39e8) Setup initial locales folder for translations. Added English translations for email. Added _locales.json for mapping - [`1b1a934`](https://github.com/glenndehaan/unifi-voucher-site/commit/1b1a934f87fe6702a6e80618ac07a3f2de65fd3e) Implemented the translation.js module. Implemented the 'TRANSLATION_DEBUG' environment variable. Updated the README.md to include the Translations chapter. Moved en.json to en/email.json to better utilize Crowdin - [`467ce7e`](https://github.com/glenndehaan/unifi-voucher-site/commit/467ce7edb1fed52bba2ce5613081cdafa07f4b29) Implemented mail translations. Updated debug output from translation.js - [`1bc459d`](https://github.com/glenndehaan/unifi-voucher-site/commit/1bc459de66d71b410fafcfc1f0eec127b132d87e) Swapped mail function parameters. Replaced throw errors for log warnings. Implemented fallback language in translation.js. Added express-locale for future web i18n use - [`d5c19d0`](https://github.com/glenndehaan/unifi-voucher-site/commit/d5c19d021dcd8f1ad33b131caa3526c55e039641) Removed _locales.json implementation. Added language parameter to mail.js. Implemented regex check to translation.js. Added language dropdown to email component. Added languages.js - [`c3b36b5`](https://github.com/glenndehaan/unifi-voucher-site/commit/c3b36b55a3de653797d0becc0c2398a8677a6663) Implemented the print.json translation file. Added a new print dialog. Moved /print function to a post request. Updated translation.js debug output. Implemented translator within print.js. Fixed typos. Removed unused utils from email and print components render function - [`eafd7aa`](https://github.com/glenndehaan/unifi-voucher-site/commit/eafd7aaffac5886ccfea76bbb587a1159d83f4b7) Updated README.md ### 📊 Changes **16 files changed** (+308 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+26 -0) 📝 `docker-compose.yml` (+1 -0) ➕ `locales/en/email.json` (+19 -0) ➕ `locales/en/print.json` (+15 -0) 📝 `modules/mail.js` (+11 -3) 📝 `modules/print.js` (+37 -28) ➕ `modules/translation.js` (+48 -0) 📝 `modules/variables.js` (+1 -0) 📝 `package-lock.json` (+7 -0) 📝 `package.json` (+1 -0) 📝 `server.js` (+38 -5) 📝 `template/components/email.ejs` (+11 -1) ➕ `template/components/print.ejs` (+44 -0) 📝 `template/email/voucher.ejs` (+16 -16) 📝 `template/voucher.ejs` (+26 -4) ➕ `utils/languages.js` (+7 -0) </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:18:54 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/unifi-voucher-site#96
No description provided.