feat: add Greek (el) language support#1193
Open
angelospk wants to merge 7 commits into
Open
Conversation
Contributor
|
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. |
- 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
b68d321 to
723c390
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ellocale inlingui.config.ts,locales.ts(SupportedLocales type, availableLocales, flag map, name map), andLanguageSwitcherfrontend/src/locales/el.po— ~2320 translated strings using a hybrid strategy: core UI strings are translated; less common strings fall back to Englishfrontend/src/locales/el.js— compiled Lingui catalogimport 'dayjs/locale/el'and Greek date format entry todateLocales.ts(fixes TypeScriptRecord<SupportedLocales, ...>completeness and ensures Greek-formatted dates)LanguageSwitcherto write the locale cookie before the dynamic import, and usewindow.location.hrefnavigation instead ofwindow.location.reload()to avoid browser back-forward cache serving stale SSR HTMLBackend
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 — matchingde.jsoncoveragecase EL = 'el'inbackend/app/Locale.phpsoPATCH /api/users/mewithlocale: "el"passes validationDocs
README.el.md— full Greek translation of the main READMEΕλληνικάlink to the language list inREADME.mdTranslation approach
The
.pocatalog 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
locale: "el"viaPATCH /api/users/mereturns 200 (previously 422)npx tsc --noEmitI have read the CLA Document and I hereby sign the CLA