Skip to content

[Payment due @abzokhattab] Add Greek (el) as beta locale - #95655

Merged
chuckdries merged 35 commits into
mainfrom
rory-657039-greek-locale
Aug 3, 2026
Merged

chuckdries merged 35 commits into
mainfrom
rory-657039-greek-locale

Conversation

@roryabraham

@roryabraham roryabraham commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Adds Greek (el) as a new beta locale. Registers el in LOCALES.ts, wires runtime loading in IntlStore (translations + date-fns locale), maps Apple Sign In's el_GR locale, loads Greek Intl.ListFormat polyfill data, adds a Greek translation prompt/glossary, and generates src/languages/el.ts from en.ts (6,048 strings, zero translation failures). Excludes the generated file from ESLint and cspell, matching every other beta locale's pattern.

This lands the infra prerequisite for Add Greek as a language to E/App, part of the translator-hiring epic #504749. Greek ships as beta: AI-generated, unaudited, no localized emoji keywords — same limitations as de/fr/ja/etc. Promoting to fully-supported happens after expert audit in a follow-up.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/657039
PROPOSAL:

Tests

  1. Start the web dev server.
  2. Sign in and go to Settings > Preferences > Language.
  3. Confirm Ελληνικά appears in the language list.
  4. Select Ελληνικά. Confirm the UI switches to Greek and the "translations generated automatically" hint shows under the Language row.
  5. Navigate to Home, Inbox, and other Account tabs. Confirm nav labels and settings render in Greek with no raw English fallback, no undefined/[object Object], and no missing-key errors.
  6. Switch back to English. Confirm the list re-sorts correctly and English strings are unaffected.
  • Verify that no errors appear in the JS console

Offline tests

N/A — locale files are bundled at build time; no network-dependent behavior changes.

QA Steps

Same as Tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

N/A — web-only locale infra change, no native platform code touched.

Android: mWeb Chrome

N/A — see MacOS: Chrome / Safari for representative web coverage.

iOS: Native

N/A — web-only locale infra change, no native platform code touched.

iOS: mWeb Safari

N/A — see MacOS: Chrome / Safari for representative web coverage.

MacOS: Chrome / Safari image image image image image

roryabraham and others added 7 commits July 8, 2026 18:17
Add el to BETA_LOCALES with Ελληνικά display name.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add el loader to IntlStore (date-fns/locale/el), map el to Apple
Sign In's el_GR locale, and load el Intl.ListFormat polyfill data.

Note: src/languages/el.ts does not exist yet; typecheck passes once
added in a follow-up commit.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add glossary and tone rules for Greek to guide translation
generation (formal register, gender/case agreement).

Co-authored-by: Cursor <cursoragent@cursor.com>
Generate src/languages/el.ts from en.ts via generateTranslations.ts,
using the base and Greek-specific prompts. 6,048 strings translated
with zero failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match the existing pattern for other AI-generated locale files;
still type-checked, just not linted as hand-authored source.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match the existing ignorePaths pattern for other beta locales;
without this, CI spell-check fails on ~10k lines of Greek text.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ελληνικά in LOCALES.ts's LOCALE_TO_LANGUAGE_STRING is hand-written
(not covered by ignorePaths), so it needs a words entry like the
other locales' native display names (Deutsch, Français, etc.).

Co-authored-by: Cursor <cursoragent@cursor.com>
@roryabraham

Copy link
Copy Markdown
Contributor Author

CI failed on two unrelated, pre-existing test failures (both look like date/time-bomb bugs, not caused by this PR's Greek locale changes):

  • test (job 3): tests/unit/ReportSecondaryActionUtilsTest.ts › getSecondaryAction › should include SUBMIT option for admin with only pending transactions — expected true, got false. Run
  • test (job 8): tests/actions/ReportPreviewActionUtilsTest.ts › getReportPreviewAction › canSubmit should return true for expense preview report with only pending transactions — expected "submit", got "view". Run

Both tests use a hardcoded transaction created: '2025-01-01' and appear to depend on the gap between that fixed date and the real current date. Confirmed unrelated to this PR:

  • Reproduces locally on this branch with today's real system date (npx jest tests/unit/ReportSecondaryActionUtilsTest.ts -t "should include SUBMIT option for admin with only pending transactions").
  • main's own last test.yml run (2026-07-01) was green; the regression appeared sometime after that, before this PR's diff (which only touches src/CONST/LOCALES.ts, src/languages/IntlStore.ts, AppleSignInLocales.ts, polyfillListFormat.ts, translation prompts, and the generated el.ts — nothing in ReportSecondaryActionUtils/ReportPreviewActionUtils).

Tracked in Fix flaky test ReportSecondaryActionUtilsTest/ReportPreviewActionUtilsTest.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@dubielzyk-expensify
dubielzyk-expensify self-requested a review July 13, 2026 23:01
Expensify Neue/Mono/New Kansas and the emoji fonts only cover Latin
script and emoji glyphs. With no generic fallback at the end of the
web font stack, glyphs missing from all of them (e.g. Greek) fell
through to the browser's own default font, which is a serif font.

Append a standard system font stack after the emoji fonts so
uncovered scripts render in a sans-serif system font instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

roryabraham and others added 2 commits July 14, 2026 23:46
main gained new copy (Agents, Rillet, onboarding, card statuses, etc.)
since el.ts was generated, breaking typecheck. Regenerate incrementally
against the pre-merge branch tip and manually fix Rillet export value
keys the translator flattened incorrectly.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@codecov

codecov Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/LOCALES.ts 100.00% <ø> (ø)
...ents/HTMLEngineProvider/BaseHTMLEngineProvider.tsx 83.11% <100.00%> (ø)
...ponents/Search/SearchRouter/SearchRouterHelpers.ts 95.55% <100.00%> (+0.10%) ⬆️
...ts/SignInButtons/AppleSignIn/AppleSignInLocales.ts 0.00% <ø> (ø)
src/libs/EmojiTrie.ts 96.00% <100.00%> (ø)
src/libs/SearchQueryUtils.ts 87.30% <100.00%> (ø)
src/libs/StringUtils/index.ts 83.60% <100.00%> (+1.15%) ⬆️
src/libs/filterArrayByMatch.ts 97.72% <100.00%> (ø)
src/pages/inbox/sidebar/NavigationTabBarAvatar.tsx 91.30% <100.00%> (ø)
src/libs/IntlPolyfill/polyfillListFormat.ts 20.00% <0.00%> (-1.43%) ⬇️
... and 2 more
... and 7 files with indirect coverage changes

@github-actions

This comment has been minimized.

@dubielzyk-expensify

dubielzyk-expensify commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Tested again and that's looking a lot better 👍 cc @Expensify/design for viz

CleanShot 2026-07-16 at 08 25 25@2x

@dubielzyk-expensify

Copy link
Copy Markdown
Contributor

Wonder if we could shrink this as it's messing with me:

CleanShot 2026-07-16 at 08 26 06@2x

Account is also weird:

CleanShot 2026-07-16 at 08 26 24@2x

I guess it's part of the RSS so it makes sense, but I kinda would still assume the announcement type would be translated. I think we're removing it though so it's fine

CleanShot 2026-07-16 at 08 26 56@2x

@dubielzyk-expensify

Copy link
Copy Markdown
Contributor

Serif font found here:

CleanShot 2026-07-16 at 08 27 37@2x

Same with description on workspace overview:

CleanShot 2026-07-16 at 08 29 00@2x

And domain RHP:

CleanShot 2026-07-16 at 08 30 02@2x

react-native-render-html keeps only the first whitelisted face, so
Greek in RenderHTML lost our system sans-serif fallbacks and rendered
as serif. Remap brand faces to full platform stacks via fallbackFonts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@roryabraham

Copy link
Copy Markdown
Contributor Author

@dubielzyk-expensify I think that newest AdHoc build should fix the pieces of serif font you pointed out. However, I'd love your advice on how to fix the LHN word wrapping issues we were seeing. It sounds like there's no shorter word that would be a natural fit for either Inbox or Account, so that gives us a few options:

  1. Decrease the font size for that text in Greek
    a. For just the items that are too long, OR
    b. For all LHN items for consistency
  2. Widen the LHN. It's 72 pixels and there's kind of a lot of layout math that depends on that. Medium-to-high-effort to widen it to say 80 pixels, but certainly not impossible:
    a. Widen it just for Greek, OR
    b. Widen it for all locales
  3. Embrace the wrapping:
    1. Make sure that Account wraps like Inbox
    2. Insert a zero-width character in the middle of each, so that even though they'll take up two lines, at least we won't have just 1 or 2 characters on their own line.

roryabraham and others added 2 commits July 15, 2026 21:50
Fill missing el.ts keys from main and satisfy ESLint naming on the
HTML font fallback map key for the CSS sans-serif generic family.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB: i would recommend adding unit tests for the newly added removeZeroWidthCharacters and normalizeForMatch functions in this util file

@abzokhattab abzokhattab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me

@abzokhattab

Copy link
Copy Markdown
Contributor

lets fix the failing pipeline

@melvin-bot
melvin-bot Bot requested a review from chuckdries July 29, 2026 21:00
@melvin-bot

melvin-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

@chuckdries Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot changed the title Add Greek (el) as beta locale [Payment due @abzokhattab] Add Greek (el) as beta locale Jul 29, 2026
@melvin-bot

melvin-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🎯 @abzokhattab, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/657039.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@roryabraham

Copy link
Copy Markdown
Contributor Author

@MelvinBot please fix failing typecheck in this pull request.

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Fixed the failing typecheck and pushed to this branch.

Root cause: main added three new keys to the gps section of src/languages/en.ts — edit, editStop, totalDistance — after el.ts was generated. The typecheck runs against the PR merged with main, so the generated Greek file was missing those keys and el.ts failed to satisfy TranslationDeepObject<typeof en> (TS2739). It passed on the raw branch head, which is why it looked confusing.

Fix:

  1. Merged latest main into the branch (brings the updated en.ts).
  2. Added the three Greek translations to gps in src/languages/el.ts, matching existing usage (edit → Επεξεργασία from common.edit, waypoint "stop" → στάσης from distance.addStop, totalDistance → Συνολική απόσταση from distance.odometer).

npm run typecheck (tsc) now passes locally with no el.ts errors.

@chuckdries

Copy link
Copy Markdown
Contributor

Types still failing

@roryabraham
roryabraham force-pushed the rory-657039-greek-locale branch from 390529d to 061f68c Compare August 3, 2026 20:41
@chuckdries
chuckdries merged commit a6f90e0 into main Aug 3, 2026
42 checks passed
@chuckdries
chuckdries deleted the rory-657039-greek-locale branch August 3, 2026 21:06
@OSBotify

OSBotify commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚧 chuckdries has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify OSBotify mentioned this pull request Aug 3, 2026
77 tasks done
@OSBotify

OSBotify commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/chuckdries in version: 9.4.49-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

Help site review — docs update required ✅

This PR adds Greek (Ελληνικά) as a new beta locale. That is user-facing, and one help article documents the set of supported languages:

The rest of the diff (locale registration, font/emoji/Intl polyfill wiring, generated src/languages/el.ts) is internal infrastructure with no help-site impact.

Draft PR: #97739

I added Greek (Ελληνικά) to the Supported Languages list, matching the existing English name (Native name) format. I verified against the live New Expensify web UI (Account > Preferences > Language) that Ελληνικά now appears in the language picker, so the native name and its list position match current behavior.

@MelvinBot, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #97781 was identified to be related to this PR.

@melvin-bot

melvin-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #97830

@OSBotify

OSBotify commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/arosiclair in version: 9.4.49-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

8 participants