Simplify translation (#6404)

* Simplify translation

* style fix
This commit is contained in:
Oliver 2024-02-05 13:42:49 +11:00 committed by GitHub
parent 74d0eb729c
commit e207606686
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -451,12 +451,14 @@ class UserCreateSerializer(ExendedUserSerializer):
# Make sure the user cannot login until they have set a password
instance.set_unusable_password()
message = _(
'Your account has been created.\n\nPlease use the password reset function to login'
message = (
_('Your account has been created.')
+ '\n\n'
+ _('Please use the password reset function to login')
)
if base_url:
message += f'\nURL: {base_url}'
message += f'\n\nURL: {base_url}'
# Send the user an onboarding email (from current site)
instance.email_user(subject=_('Welcome to InvenTree'), message=message)