Hi.Events icon indicating copy to clipboard operation
Hi.Events copied to clipboard

feat: add Greek (el) language support

Open angelospk opened this issue 6 months ago • 3 comments

Hi team! First of all, thank you for building Hi.Events — I've been following the project closely and I'm really impressed with how it's progressing. I wanted to give back by contributing a Greek translation, and I'm also planning to recommend Hi.Events to a local municipality for self-hosting to manage the various events they organize.

Summary

This PR adds Greek (el) as a fully supported language across the frontend and backend.

What's included

Frontend

  • Register el locale in lingui.config.ts, locales.ts (SupportedLocales type, availableLocales, flag map, name map), and LanguageSwitcher
  • frontend/src/locales/el.po — ~2320 translated strings using a hybrid strategy: core UI strings are translated; less common strings fall back to English
  • frontend/src/locales/el.js — compiled Lingui catalog
  • Add import 'dayjs/locale/el' and Greek date format entry to dateLocales.ts (fixes TypeScript Record<SupportedLocales, ...> completeness and ensures Greek-formatted dates)
  • Fix LanguageSwitcher to write the locale cookie before the dynamic import, and use window.location.href navigation instead of window.location.reload() to avoid browser back-forward cache serving stale SSR HTML

Backend

  • backend/lang/el.json — 664 keys covering sort options, error messages, email templates, status labels, product/ticket validation, check-in messages, Stripe/payment errors, VIES VAT validation, and admin strings — matching de.json coverage
  • Register case EL = 'el' in backend/app/Locale.php so PATCH /api/users/me with locale: "el" passes validation

Docs

  • README.el.md — full Greek translation of the main README
  • Add Ελληνικά link to the language list in README.md

Translation approach

The .po catalog uses a hybrid strategy: high-frequency UI strings (buttons, labels, navigation, forms, notifications, error messages) are fully translated. Lower-frequency strings (complex legal text, highly technical error messages) fall back to English, which is the standard approach used by other language contributors in this project.

Testing

  • Selecting Greek from the language switcher correctly reloads the page in Greek without requiring a manual F5
  • Setting locale: "el" via PATCH /api/users/me returns 200 (previously 422)
  • Date formatting uses Greek month/day names via dayjs
  • TypeScript passes cleanly with npx tsc --noEmit

I have read the CLA Document and I hereby sign the CLA

angelospk avatar May 15 '26 15:05 angelospk

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar May 15 '26 15:05 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

angelospk avatar May 16 '26 08:05 angelospk

Thank you very much for this contribution, @angelospk!

daveearley avatar May 26 '26 06:05 daveearley