Skip to content
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

Add missing translations #10414

Merged
merged 12 commits into from
Feb 23, 2025
Merged

Conversation

BOHEUS
Copy link
Contributor

@BOHEUS BOHEUS commented Feb 23, 2025

As per title, add ~200 missing translations in different places of app. Most places are now available for translation with AI but still some aren't available - some enums (like in MenuItemSelectColor.tsx) or values in complex types (like in SettingsNonCompositeFieldTypeConfigs.ts) or values where are injected some variables (like in SettingsDataModelFieldNumberForm.tsx)

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds approximately 200 missing translations across various locales in the Twenty application. The changes primarily focus on making UI strings translatable using the Lingui library's translation functions.

Key changes:

  • Added translations for filter operands and field settings in object-record components
  • Wrapped previously hardcoded strings with t macro from @lingui/core for internationalization
  • Added translations for SSO configuration, webhooks, and API key management interfaces
  • Implemented translations for view settings and data model configuration screens
  • Added missing translations for calendar and account settings components

Note: Some areas still lack translation support, particularly enums in MenuItemSelectColor.tsx, complex types in SettingsNonCompositeFieldTypeConfigs.ts, and strings with variable injection in SettingsDataModelFieldNumberForm.tsx.

130 file(s) reviewed, 59 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 2932 to 2934
#: src/modules/object-record/record-table/empty-state/components/RecordTableEmptyStateReadOnly.tsx
msgid "You are not allowed to create records in this object"
msgstr ""
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Missing translation for important permission-related message "You are not allowed to create records in this object"

@@ -1992,6 +2832,10 @@ msgstr "Wir unterstützen Ihre quadratischen PNGs, JPEGs und GIFs unter 10MB"
msgid "We will send POST requests to this endpoint for every new event"
msgstr "Wir senden POST-Anfragen an diesen Endpunkt für jedes neue Ereignis"

#: src/pages/settings/security/SettingsSecurityApprovedAccessDomain.tsx
msgid "We will send your a link to verify domain ownership"
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Typo in 'your' - should be 'you'

Suggested change
msgid "We will send your a link to verify domain ownership"
msgid "We will send you a link to verify domain ownership"

Comment on lines 1486 to 1487
msgid "Invalid domain. Domains have to be smaller than 256 characters in length, cannot be IP addresses, cannot contain spaces, cannot contain any special characters such as _~`!@#$%^*()=+{}[]|\\;:'\",<>/? and cannot begin or end with a '-' character."
msgstr ""
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Missing translation for important domain validation message

Suggested change
msgid "Invalid domain. Domains have to be smaller than 256 characters in length, cannot be IP addresses, cannot contain spaces, cannot contain any special characters such as _~`!@#$%^*()=+{}[]|\\;:'\",<>/? and cannot begin or end with a '-' character."
msgstr ""
msgid "Invalid domain. Domains have to be smaller than 256 characters in length, cannot be IP addresses, cannot contain spaces, cannot contain any special characters such as _~`!@#$%^*()=+{}[]|\\;:'\",<>/? and cannot begin or end with a '-' character."
msgstr "Virheellinen verkkotunnus. Verkkotunnusten on oltava alle 256 merkkiä pitkiä, eivät saa olla IP-osoitteita, eivät saa sisältää välilyöntejä, eivät saa sisältää erikoismerkkejä kuten _~`!@#$%^*()=+{}[]|\\;:'\",<>/? eivätkä saa alkaa tai päättyä '-'-merkillä."

Comment on lines +22 to +47
msgid ": Empty"
msgstr ""

#: src/modules/object-record/object-filter-dropdown/utils/getOperandLabel.ts
msgid ": Future"
msgstr ""

#: src/modules/object-record/object-filter-dropdown/utils/getOperandLabel.ts
msgid ": Not"
msgstr ""

#: src/modules/object-record/object-filter-dropdown/utils/getOperandLabel.ts
msgid ": NotEmpty"
msgstr ""

#: src/modules/object-record/object-filter-dropdown/utils/getOperandLabel.ts
msgid ": NotNull"
msgstr ""

#: src/modules/object-record/object-filter-dropdown/utils/getOperandLabel.ts
msgid ": Past"
msgstr ""

#: src/modules/object-record/object-filter-dropdown/utils/getOperandLabel.ts
msgid ": Today"
msgstr ""
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Several filter operand labels are missing translations

@@ -1300,6 +1835,10 @@ msgstr "Nuevo registro"
msgid "No connected account"
msgstr "No hay cuenta conectada"

Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Translation for 'No country' is missing but needed for phone number field functionality

{ children: 'Workspace', href: '/settings/workspace' },
{ children: 'Objects', href: '/settings/objects' },
{ children: t`Workspace`, href: '/settings/workspace' },
{ children: t`Objects`, href: '/settings/objects' },
{
children: activeObjectMetadataItem.labelPlural,
Copy link
Contributor

Choose a reason for hiding this comment

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

style: activeObjectMetadataItem.labelPlural should also be wrapped in t macro for consistency with other translated strings

Comment on lines 88 to 89
text={isFavorite ? t`Manage favorite` : t`Add to Favorite`}
onClick={handleAddToFavorites}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: inconsistent capitalization between 'Add to Favorite' and 'Manage favorite' - should be 'Add to favorite' for consistency

Comment on lines 95 to 96
text={isFavorite ? t`Manage favorite` : t`Add to Favorite`}
onClick={handleAddToFavorites}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: duplicate translation logic from lines 88-89 - consider extracting to a constant

dropdownWidthAuto
fullWidth
value={value}
options={[
{
label: isDefined(systemTimeZoneOption)
? `System settings - ${systemTimeZoneOption.label}`
: 'System settings',
? t`System settings`.concat(` - ${systemTimeZoneOption.label}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Using string concatenation with t-macro wrapped strings can lead to translation issues. Consider using template literals with the t-macro instead.

Suggested change
? t`System settings`.concat(` - ${systemTimeZoneOption.label}`)
? t`System settings - ${systemTimeZoneOption.label}`

title="Email verification"
description="We will send your a link to verify domain ownership"
title={t`Email verification`}
description={t`We will send your a link to verify domain ownership`}
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Typo in English text: 'your' should be 'you'

Suggested change
description={t`We will send your a link to verify domain ownership`}
description={t`We will send you a link to verify domain ownership`}

@FelixMalfait
Copy link
Member

Great! Thank you! I think this broke some tests and the linter (some sentences are harder to translate when they are not within a function). I'll try to update it now

@FelixMalfait FelixMalfait merged commit ff001d9 into twentyhq:main Feb 23, 2025
44 checks passed
Copy link
Contributor

Thanks @BOHEUS for your contribution!
This marks your 31st PR on the repo. You're top 2% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

@BOHEUS BOHEUS deleted the missing-translations branch February 25, 2025 18:15
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.

2 participants