Skip to content

feat: add Greek (el) language support#1193

Open
angelospk wants to merge 7 commits into
HiEventsDev:developfrom
angelospk:pr/greek-translation
Open

feat: add Greek (el) language support#1193
angelospk wants to merge 7 commits into
HiEventsDev:developfrom
angelospk:pr/greek-translation

Conversation

@angelospk
Copy link
Copy Markdown

@angelospk angelospk commented May 15, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

angelospk added 7 commits May 16, 2026 08:03
- Add 'el' locale to lingui.config.ts
- Add Greek to SupportedLocales type, availableLocales, flag and name
  maps in src/locales.ts
- Add Greek case to LanguageSwitcher component
- Create frontend/src/locales/el.po with hybrid translation strategy
  (core UI strings translated, remainder falls back to English)
- Create backend/lang/el.json covering sort options, error messages,
  email templates, status labels
- Run yarn messages:extract --clean to sync all catalogs and compile
  el.js for production
- Add commit guidelines to CLAUDE.md
- Translated virtually all frontend strings in el.po (from 199 to ~2324)
- Only 7 empty entries remain (empty string, {0}, {0} {1} placeholders)
- Compiled el.js via yarn messages:compile
- Complete el.json from 255 to 664 keys, matching de.json coverage
- Adds error messages, email templates, product/ticket validation,
  check-in messages, Stripe/payment errors, VIES VAT validation,
  admin/webhook strings, and email body content
…ations

- Add case EL = 'el' to Locale enum so locale validation accepts Greek
- Fix Hi/Hello greeting to use informal 'Γεια :name'
- Fix impersonation strings to use descriptive 'Σύνδεση ως χρήστης'
- Add import 'dayjs/locale/el' to dateLocales.ts
- Add 'el' entry to localeFormats Record (fixes TS type error)
- Uses European 24h day-month-year format matching Greek conventions
…igation

- Write cookie before dynamicActivateLocale so the SSR request always
  carries the new locale even if the dynamic import is slow
- Replace window.location.reload() with href navigation to bypass
  browser back-forward cache that can serve stale SSR HTML
@angelospk angelospk force-pushed the pr/greek-translation branch from b68d321 to 723c390 Compare May 16, 2026 08:04
@angelospk
Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant