fix translate
This commit is contained in:
parent
7096e97c39
commit
2d5077129d
170
idhub/models.py
170
idhub/models.py
|
@ -55,10 +55,10 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_USR_REGISTERED(cls, user):
|
def set_EV_USR_REGISTERED(cls, user):
|
||||||
msg = "The user {} was registered: name: {}, last name: {}".format(
|
msg = _("The user {username} was registered: name: {first_name}, last name: {last_name}").format(
|
||||||
user.username,
|
username=user.username,
|
||||||
user.first_name,
|
first_name=user.first_name,
|
||||||
user.last_name
|
last_name=user.last_name
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_USR_REGISTERED,
|
type=cls.Types.EV_USR_REGISTERED,
|
||||||
|
@ -67,9 +67,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_USR_WELCOME(cls, user):
|
def set_EV_USR_WELCOME(cls, user):
|
||||||
msg = "Welcome. You has been registered: name: {}, last name: {}".format(
|
msg = _("Welcome. You has been registered: name: {first_name}, last name: {last_name}").format(
|
||||||
user.first_name,
|
first_name=user.first_name,
|
||||||
user.last_name
|
last_name=user.last_name
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_USR_WELCOME,
|
type=cls.Types.EV_USR_WELCOME,
|
||||||
|
@ -80,9 +80,9 @@ class Event(models.Model):
|
||||||
# Is required?
|
# Is required?
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_DATA_UPDATE_REQUESTED_BY_USER(cls, user):
|
def set_EV_DATA_UPDATE_REQUESTED_BY_USER(cls, user):
|
||||||
msg = "The user '{}' has request the update of the following information: "
|
msg = _("The user '{username}' has request the update of the following information: ")
|
||||||
msg += "['field1':'value1', 'field2':'value2'>,...]".format(
|
msg += "['field1':'value1', 'field2':'value2'>,...]".format(
|
||||||
user.username,
|
username=user.username,
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_DATA_UPDATE_REQUESTED_BY_USER,
|
type=cls.Types.EV_DATA_UPDATE_REQUESTED_BY_USER,
|
||||||
|
@ -92,7 +92,7 @@ class Event(models.Model):
|
||||||
# Is required?
|
# Is required?
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_DATA_UPDATE_REQUESTED(cls, user):
|
def set_EV_DATA_UPDATE_REQUESTED(cls, user):
|
||||||
msg = "You have requested the update of the following information: "
|
msg = _("You have requested the update of the following information: ")
|
||||||
msg += "['field1':'value1', 'field2':'value2'>,...]"
|
msg += "['field1':'value1', 'field2':'value2'>,...]"
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_DATA_UPDATE_REQUESTED,
|
type=cls.Types.EV_DATA_UPDATE_REQUESTED,
|
||||||
|
@ -103,9 +103,10 @@ class Event(models.Model):
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_USR_UPDATED_BY_ADMIN(cls, user):
|
def set_EV_USR_UPDATED_BY_ADMIN(cls, user):
|
||||||
msg = "The admin has updated the following user 's information: "
|
msg = "The admin has updated the following user 's information: "
|
||||||
msg += "name: {}, last name: {}".format(
|
msg += "name: {first_name}, last name: {last_name}"
|
||||||
user.first_name,
|
msg = _(msg).format(
|
||||||
user.last_name
|
first_name=user.first_name,
|
||||||
|
last_name=user.last_name
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_USR_UPDATED_BY_ADMIN,
|
type=cls.Types.EV_USR_UPDATED_BY_ADMIN,
|
||||||
|
@ -115,9 +116,10 @@ class Event(models.Model):
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_USR_UPDATED(cls, user):
|
def set_EV_USR_UPDATED(cls, user):
|
||||||
msg = "The admin has updated your personal information: "
|
msg = "The admin has updated your personal information: "
|
||||||
msg += "name: {}, last name: {}".format(
|
msg += "name: {first_name}, last name: {last_name}"
|
||||||
user.first_name,
|
msg = _(msg).format(
|
||||||
user.last_name
|
first_name=user.first_name,
|
||||||
|
last_name=user.last_name
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_USR_UPDATED,
|
type=cls.Types.EV_USR_UPDATED,
|
||||||
|
@ -127,8 +129,8 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_USR_DELETED_BY_ADMIN(cls, user):
|
def set_EV_USR_DELETED_BY_ADMIN(cls, user):
|
||||||
msg = "The admin has deleted the user: username: {}".format(
|
msg = _("The admin has deleted the user: username: {username}").format(
|
||||||
user.username,
|
username=user.username,
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_USR_DELETED_BY_ADMIN,
|
type=cls.Types.EV_USR_DELETED_BY_ADMIN,
|
||||||
|
@ -137,9 +139,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_DID_CREATED_BY_USER(cls, did):
|
def set_EV_DID_CREATED_BY_USER(cls, did):
|
||||||
msg = "New DID with DID-ID: '{}' created by user '{}'".format(
|
msg = _("New DID with DID-ID: '{did}' created by user '{username}'").format(
|
||||||
did.did,
|
did=did.did,
|
||||||
did.user.username
|
username=did.user.username
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_DID_CREATED_BY_USER,
|
type=cls.Types.EV_DID_CREATED_BY_USER,
|
||||||
|
@ -148,9 +150,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_DID_CREATED(cls, did):
|
def set_EV_DID_CREATED(cls, did):
|
||||||
msg = "New DID with label: '{}' and DID-ID: '{}' was created'".format(
|
msg = _("New DID with label: '{label}' and DID-ID: '{did}' was created'").format(
|
||||||
did.label,
|
label=did.label,
|
||||||
did.did
|
did=did.did
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_DID_CREATED,
|
type=cls.Types.EV_DID_CREATED,
|
||||||
|
@ -160,9 +162,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_DID_DELETED(cls, did):
|
def set_EV_DID_DELETED(cls, did):
|
||||||
msg = "The DID with label '{}' and DID-ID: '{}' was deleted from your wallet".format(
|
msg = _("The DID with label '{label}' and DID-ID: '{did}' was deleted from your wallet").format(
|
||||||
did.label,
|
label=did.label,
|
||||||
did.did
|
did=did.did
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_DID_DELETED,
|
type=cls.Types.EV_DID_DELETED,
|
||||||
|
@ -172,9 +174,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_DELETED_BY_ADMIN(cls, cred):
|
def set_EV_CREDENTIAL_DELETED_BY_ADMIN(cls, cred):
|
||||||
msg = "The credential of type '{}' and ID: '{}' was deleted".format(
|
msg = _("The credential of type '{type}' and ID: '{id}' was deleted").format(
|
||||||
cred.type(),
|
type=cred.type(),
|
||||||
cred.id,
|
id=cred.id,
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_DELETED_BY_ADMIN,
|
type=cls.Types.EV_CREDENTIAL_DELETED_BY_ADMIN,
|
||||||
|
@ -183,9 +185,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_DELETED(cls, cred):
|
def set_EV_CREDENTIAL_DELETED(cls, cred):
|
||||||
msg = "The credential of type '{}' and ID: '{}' was deleted from your wallet".format(
|
msg = _("The credential of type '{type}' and ID: '{id}' was deleted from your wallet").format(
|
||||||
cred.type(),
|
type=cred.type(),
|
||||||
cred.id
|
id=cred.id
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_DELETED,
|
type=cls.Types.EV_CREDENTIAL_DELETED,
|
||||||
|
@ -195,10 +197,10 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_ISSUED_FOR_USER(cls, cred):
|
def set_EV_CREDENTIAL_ISSUED_FOR_USER(cls, cred):
|
||||||
msg = "The credential of type '{}' and ID: '{}' was issued for user {}".format(
|
msg = _("The credential of type '{type}' and ID: '{id}' was issued for user {username}").format(
|
||||||
cred.type(),
|
type=cred.type(),
|
||||||
cred.id,
|
id=cred.id,
|
||||||
cred.user.username
|
username=cred.user.username
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_ISSUED_FOR_USER,
|
type=cls.Types.EV_CREDENTIAL_ISSUED_FOR_USER,
|
||||||
|
@ -207,9 +209,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_ISSUED(cls, cred):
|
def set_EV_CREDENTIAL_ISSUED(cls, cred):
|
||||||
msg = "The credential of type '{}' and ID: '{}' was issued and stored in your wallet".format(
|
msg = _("The credential of type '{type}' and ID: '{id}' was issued and stored in your wallet").format(
|
||||||
cred.type(),
|
type=cred.type(),
|
||||||
cred.id
|
id=cred.id
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_ISSUED,
|
type=cls.Types.EV_CREDENTIAL_ISSUED,
|
||||||
|
@ -219,11 +221,13 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_PRESENTED_BY_USER(cls, cred, verifier):
|
def set_EV_CREDENTIAL_PRESENTED_BY_USER(cls, cred, verifier):
|
||||||
msg = "The credential of type '{}' and ID: '{}' was presented by user {} to verifier '{}".format(
|
msg = "The credential of type '{type}' and ID: '{id}' "
|
||||||
cred.type(),
|
msg += "was presented by user {username} to verifier '{verifier}"
|
||||||
cred.id,
|
msg = _(msg).format(
|
||||||
cred.user.username,
|
type=cred.type(),
|
||||||
verifier
|
id=cred.id,
|
||||||
|
username=cred.user.username,
|
||||||
|
verifier=verifier
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_PRESENTED_BY_USER,
|
type=cls.Types.EV_CREDENTIAL_PRESENTED_BY_USER,
|
||||||
|
@ -232,10 +236,12 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_PRESENTED(cls, cred, verifier):
|
def set_EV_CREDENTIAL_PRESENTED(cls, cred, verifier):
|
||||||
msg = "The credential of type '{}' and ID: '{}' was presented to verifier '{}'".format(
|
msg = "The credential of type '{type}' and ID: '{id}' "
|
||||||
cred.type(),
|
msg += "was presented to verifier '{verifier}'"
|
||||||
cred.id,
|
msg = _(msg).format(
|
||||||
verifier
|
type=cred.type(),
|
||||||
|
id=cred.id,
|
||||||
|
verifier=verifier
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_PRESENTED,
|
type=cls.Types.EV_CREDENTIAL_PRESENTED,
|
||||||
|
@ -245,9 +251,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_ENABLED(cls, cred):
|
def set_EV_CREDENTIAL_ENABLED(cls, cred):
|
||||||
msg = "The credential of type '{}' was enabled for user {}".format(
|
msg = _("The credential of type '{type}' was enabled for user {username}").format(
|
||||||
cred.type(),
|
type=cred.type(),
|
||||||
cred.user.username
|
username=cred.user.username
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_ENABLED,
|
type=cls.Types.EV_CREDENTIAL_ENABLED,
|
||||||
|
@ -256,8 +262,8 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_CAN_BE_REQUESTED(cls, cred):
|
def set_EV_CREDENTIAL_CAN_BE_REQUESTED(cls, cred):
|
||||||
msg = "You can request the '{}' credential".format(
|
msg = _("You can request the '{type}' credential").format(
|
||||||
cred.type()
|
type=cred.type()
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_CAN_BE_REQUESTED,
|
type=cls.Types.EV_CREDENTIAL_CAN_BE_REQUESTED,
|
||||||
|
@ -267,9 +273,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_REVOKED_BY_ADMIN(cls, cred):
|
def set_EV_CREDENTIAL_REVOKED_BY_ADMIN(cls, cred):
|
||||||
msg = "The credential of type '{}' and ID: '{}' was revoked for ".format(
|
msg = _("The credential of type '{type}' and ID: '{id}' was revoked for ").format(
|
||||||
cred.type(),
|
type=cred.type(),
|
||||||
cred.id
|
id=cred.id
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_REVOKED_BY_ADMIN,
|
type=cls.Types.EV_CREDENTIAL_REVOKED_BY_ADMIN,
|
||||||
|
@ -278,9 +284,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_CREDENTIAL_REVOKED(cls, cred):
|
def set_EV_CREDENTIAL_REVOKED(cls, cred):
|
||||||
msg = "The credential of type '{}' and ID: '{}' was revoked by admin".format(
|
msg = _("The credential of type '{type}' and ID: '{id}' was revoked by admin").format(
|
||||||
cred.type(),
|
type=cred.type(),
|
||||||
cred.id
|
id=cred.id
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_CREDENTIAL_REVOKED,
|
type=cls.Types.EV_CREDENTIAL_REVOKED,
|
||||||
|
@ -290,7 +296,7 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_ROLE_CREATED_BY_ADMIN(cls):
|
def set_EV_ROLE_CREATED_BY_ADMIN(cls):
|
||||||
msg = 'A new role was created by admin'
|
msg = _('A new role was created by admin')
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_ROLE_CREATED_BY_ADMIN,
|
type=cls.Types.EV_ROLE_CREATED_BY_ADMIN,
|
||||||
message=msg,
|
message=msg,
|
||||||
|
@ -298,7 +304,7 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_ROLE_MODIFIED_BY_ADMIN(cls):
|
def set_EV_ROLE_MODIFIED_BY_ADMIN(cls):
|
||||||
msg = 'The role was modified by admin'
|
msg = _('The role was modified by admin')
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_ROLE_MODIFIED_BY_ADMIN,
|
type=cls.Types.EV_ROLE_MODIFIED_BY_ADMIN,
|
||||||
message=msg,
|
message=msg,
|
||||||
|
@ -306,7 +312,7 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_ROLE_DELETED_BY_ADMIN(cls):
|
def set_EV_ROLE_DELETED_BY_ADMIN(cls):
|
||||||
msg = 'The role was removed by admin'
|
msg = _('The role was removed by admin')
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_ROLE_DELETED_BY_ADMIN,
|
type=cls.Types.EV_ROLE_DELETED_BY_ADMIN,
|
||||||
message=msg,
|
message=msg,
|
||||||
|
@ -314,7 +320,7 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_SERVICE_CREATED_BY_ADMIN(cls):
|
def set_EV_SERVICE_CREATED_BY_ADMIN(cls):
|
||||||
msg = 'A new service was created by admin'
|
msg = _('A new service was created by admin')
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_SERVICE_CREATED_BY_ADMIN,
|
type=cls.Types.EV_SERVICE_CREATED_BY_ADMIN,
|
||||||
message=msg,
|
message=msg,
|
||||||
|
@ -322,7 +328,7 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_SERVICE_MODIFIED_BY_ADMIN(cls):
|
def set_EV_SERVICE_MODIFIED_BY_ADMIN(cls):
|
||||||
msg = 'The service was modified by admin'
|
msg = _('The service was modified by admin')
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_SERVICE_MODIFIED_BY_ADMIN,
|
type=cls.Types.EV_SERVICE_MODIFIED_BY_ADMIN,
|
||||||
message=msg,
|
message=msg,
|
||||||
|
@ -330,7 +336,7 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_SERVICE_DELETED_BY_ADMIN(cls):
|
def set_EV_SERVICE_DELETED_BY_ADMIN(cls):
|
||||||
msg = 'The service was removed by admin'
|
msg = _('The service was removed by admin')
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_SERVICE_DELETED_BY_ADMIN,
|
type=cls.Types.EV_SERVICE_DELETED_BY_ADMIN,
|
||||||
message=msg,
|
message=msg,
|
||||||
|
@ -338,9 +344,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_ORG_DID_CREATED_BY_ADMIN(cls, did):
|
def set_EV_ORG_DID_CREATED_BY_ADMIN(cls, did):
|
||||||
msg = "New Organisational DID with label: '{}' and DID-ID: '{}' was created".format(
|
msg = _("New Organisational DID with label: '{label}' and DID-ID: '{did}' was created").format(
|
||||||
did.label,
|
label=did.label,
|
||||||
did.did
|
did=did.did
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_ORG_DID_CREATED_BY_ADMIN,
|
type=cls.Types.EV_ORG_DID_CREATED_BY_ADMIN,
|
||||||
|
@ -349,9 +355,9 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_ORG_DID_DELETED_BY_ADMIN(cls, did):
|
def set_EV_ORG_DID_DELETED_BY_ADMIN(cls, did):
|
||||||
msg = "Organisational DID with label: '{}' and DID-ID: '{}' was removed".format(
|
msg = _("Organisational DID with label: '{label}' and DID-ID: '{did}' was removed").format(
|
||||||
did.label,
|
label=did.label,
|
||||||
did.did
|
did=did.did
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_ORG_DID_DELETED_BY_ADMIN,
|
type=cls.Types.EV_ORG_DID_DELETED_BY_ADMIN,
|
||||||
|
@ -360,10 +366,12 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_USR_DEACTIVATED_BY_ADMIN(cls, user):
|
def set_EV_USR_DEACTIVATED_BY_ADMIN(cls, user):
|
||||||
msg = "The user '{}' was temporarily deactivated: [name:'{}', last name:'{}']".format(
|
msg = "The user '{username}' was temporarily deactivated: "
|
||||||
user.username,
|
msg += "[name:'{first_name}', last name:'{last_name}']"
|
||||||
user.first_name,
|
msg = _(msg).format(
|
||||||
user.last_name
|
username=user.username,
|
||||||
|
first_name=user.first_name,
|
||||||
|
last_name=user.last_name
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_USR_DEACTIVATED_BY_ADMIN,
|
type=cls.Types.EV_USR_DEACTIVATED_BY_ADMIN,
|
||||||
|
@ -372,10 +380,12 @@ class Event(models.Model):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_EV_USR_ACTIVATED_BY_ADMIN(cls, user):
|
def set_EV_USR_ACTIVATED_BY_ADMIN(cls, user):
|
||||||
msg = "The user '{}' was activated: [name:'{}', last name:'{}']".format(
|
msg = "The user '{username}' was activated: "
|
||||||
user.username,
|
msg += "name:'{first_name}', last name:'{last_name}']"
|
||||||
user.first_name,
|
msg = _(msg).format(
|
||||||
user.last_name
|
username=user.username,
|
||||||
|
first_name=user.first_name,
|
||||||
|
last_name=user.last_name
|
||||||
)
|
)
|
||||||
cls.objects.create(
|
cls.objects.create(
|
||||||
type=cls.Types.EV_USR_ACTIVATED_BY_ADMIN,
|
type=cls.Types.EV_USR_ACTIVATED_BY_ADMIN,
|
||||||
|
|
|
@ -143,12 +143,8 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/4.2/topics/i18n/
|
# https://docs.djangoproject.com/en/4.2/topics/i18n/
|
||||||
|
|
||||||
LANGUAGE_CODE = 'en-us'
|
|
||||||
|
|
||||||
TIME_ZONE = config('TIME_ZONE', 'UTC')
|
TIME_ZONE = config('TIME_ZONE', 'UTC')
|
||||||
|
|
||||||
USE_I18N = True
|
|
||||||
|
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
|
|
||||||
|
|
||||||
|
@ -181,5 +177,8 @@ MESSAGE_TAGS = {
|
||||||
LOCALE_PATHS = [
|
LOCALE_PATHS = [
|
||||||
os.path.join(BASE_DIR, 'locale'),
|
os.path.join(BASE_DIR, 'locale'),
|
||||||
]
|
]
|
||||||
|
LANGUAGE_CODE="es"
|
||||||
|
USE_I18N = True
|
||||||
|
USE_L10N = True
|
||||||
|
|
||||||
AUTH_USER_MODEL = 'idhub_auth.User'
|
AUTH_USER_MODEL = 'idhub_auth.User'
|
||||||
|
|
Loading…
Reference in New Issue