-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add Greek (el) as beta locale #95655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
roryabraham
wants to merge
19
commits into
main
Choose a base branch
from
rory-657039-greek-locale
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7158ae9
feat(i18n): register Greek locale
roryabraham 4a7b373
feat(i18n): wire Greek runtime loaders
roryabraham dd01538
feat(i18n): add Greek translation prompt
roryabraham 07e6750
feat(i18n): generate Greek translations
roryabraham 27aa359
chore(lint): exclude generated el.ts from ESLint
roryabraham 75992d1
chore(spell): exclude generated el files from cspell
roryabraham ec97470
chore(spell): add Greek native name to cspell words
roryabraham 1b875f0
Merge remote-tracking branch 'origin/main' into rory-657039-greek-locale
roryabraham 617a40a
fix(fonts): add system font fallback for uncovered scripts on web
roryabraham 241fdc4
Merge remote-tracking branch 'origin/main' into rory-657039-greek-locale
roryabraham de41fa8
fix(i18n): fill in Greek translations missing after merging main
roryabraham 7515b69
fix(fonts): keep HTML font stack fallbacks
roryabraham ff9a044
Merge remote-tracking branch 'origin/main' into rory-657039-greek-locale
roryabraham 113cf0f
fix(i18n): sync Greek strings after main merge
roryabraham 57c97ad
fix(i18n): wrap Greek LHN Inbox/Account labels cleanly
roryabraham c60d6b9
Merge remote-tracking branch 'origin/main' into rory-657039-greek-locale
roryabraham 3eef94f
fix(i18n): add Greek strings for Rillet multi-account export
roryabraham a7708a8
Merge remote-tracking branch 'origin/main' into rory-657039-greek-locale
roryabraham 1dfa914
fix(i18n): regenerate Greek strings after main merge
roryabraham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import {Str} from 'expensify-common'; | ||
|
|
||
| import Glossary from './Glossary'; | ||
|
|
||
| // U+200B ZERO WIDTH SPACE — allows a clean 2-line wrap in the narrow LHN tab rail | ||
| // without showing a hyphen. Preserve these code points when regenerating translations. | ||
| const ZWSP = '\u200B'; | ||
|
|
||
| const greekGlossary = new Glossary([ | ||
| // Branded product names | ||
| {sourceTerm: 'Expensify Card', targetTerm: 'Κάρτα Expensify', usage: 'Branded Expensify payment card'}, | ||
|
|
||
| // LHN tab labels — single long words that otherwise wrap with a 1-character orphan | ||
| // or clip in the 72px navigation rail. Keep the embedded ZWSP at the break point. | ||
| {sourceTerm: 'Inbox', targetTerm: `Εισερχό${ZWSP}μενα`, usage: 'LHN tab label; keep the zero-width space so the word can wrap as Εισερχό/μενα'}, | ||
| {sourceTerm: 'Account', targetTerm: `Λογαρια${ZWSP}σμός`, usage: 'LHN tab label; keep the zero-width space so the word can wrap as Λογαρια/σμός'}, | ||
| ]); | ||
|
|
||
| export default Str.dedent(` | ||
| When translating to Greek, follow these rules: | ||
|
|
||
| - Use polite/formal tone for user-facing text, consistent with standard Greek business software conventions. | ||
| - Keep UI labels concise and follow standard Greek capitalization rules (only sentence-initial words and proper nouns are capitalized). | ||
| - Pay close attention to Greek grammatical gender and case agreement (nominative, genitive, accusative) when branded terms or nouns appear in different sentence positions. | ||
| - Apply correct Greek plural forms and noun-adjective agreement around numeric placeholders. | ||
| - For glossary terms that contain a zero-width space (U+200B), preserve that exact character in the translation. It is intentional and enables clean line wrapping in narrow UI. | ||
|
|
||
| Use the following glossary for canonical Greek translations of common terms: | ||
|
|
||
| ${greekGlossary.toXML()} | ||
| `); |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this adds
elto the supported locale list, Greek becomes selectable on iOS/Android too, but the native Intl polyfills still only load@formatjs/intl-pluralrulesdata foren/esinsrc/libs/IntlPolyfill/index.android.tsandindex.ios.ts(and the iOS NumberFormat polyfill likewise only loadsen/es). With Greek selected, rendering any pluralized translation insrc/languages/el.ts(for exampleexpenseCount) will constructIntl.PluralRules('el')after the forced polyfill has no Greek data loaded, causing missing-locale runtime failures on native; please load the Greek Intl polyfill data alongside making the locale selectable.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MelvinBot does this concern affect all locales other than English and Spanish, or just Greek? If it does concern other locales, please create a new GitHub issue in this repo, label it weekly, and assign to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This affects all locales other than English and Spanish — not just Greek. The native polyfills hardcode
en/esdata (index.android.ts:15-17,index.ios.ts:16-18,polyfillNumberFormat.ts:32-34), and this PR only wires up Greek forListFormat— nothing Greek-specific about the pluralrules/NumberFormat gap. It's a pre-existing issue shared by every beta locale (de,el,fr,it,ja,nl,pl,pt-BR,zh-hans).One correction to the concern above:
@formatjs/intl-pluralrulespolyfill-forcedoes not crash on a missing locale —ResolveLocalefalls back to the first-loaded default (en). So instead of a runtime failure, non-en/eslocales silently use English plural rules:one/othercategories —de,el(Greek isone/other),fr,it,nl,pt-BR, andja/zh-hans(otheronly). So Greek'sexpenseCountwill actually render correctly via theenfallback.pl), which hasone/few/many/other— English rules can only ever yieldone/other, so itsfew/manyforms never fire. Any future locale with non-English plural categories (Russian, Arabic, Czech…) would hit the same.en/es.Filed as #96335, labeled
Weeklyand assigned to you. Suggested fix in there: load the pluralrules/numberformat data for the active locale dynamically, the same wayIntlStorealready loads translations,date-fns, andListFormatdata per locale.