Skip to content

Commit

Permalink
fix: fix i18n.t usage
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Aug 18, 2021
1 parent bcf4c22 commit bf02805
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/widgets/src/SharingDialog/SharingListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export const SharingListItem = ({
<p className="share-entity">{name}</p>
<p className="share-context">
{target === SHARE_TARGET_PUBLIC
? accessStrings[access]?.publicDescription
: accessStrings[access]?.description}
? accessStrings[access]?.publicDescription()
: accessStrings[access]?.description()}
</p>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions packages/widgets/src/SharingDialog/sharingConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ const noAccess = i18n.t('No access')

export const accessStrings = {
[ACCESS_NONE]: {
publicDescription: noAccess,
description: noAccess,
publicDescription: () => noAccess,
description: () => noAccess,
option: noAccess,
},
[ACCESS_VIEW_ONLY]: {
publicDescription: i18n.t('Anyone logged in can view'),
description: i18n.t('Can view'),
publicDescription: () => i18n.t('Anyone logged in can view'),
description: () => i18n.t('Can view'),
option: i18n.t('View only'),
},
[ACCESS_VIEW_AND_EDIT]: {
publicDescription: i18n.t('Anyone logged in can view and edit'),
description: i18n.t('Can view and edit'),
publicDescription: () => i18n.t('Anyone logged in can view and edit'),
description: () => i18n.t('Can view and edit'),
option: i18n.t('View and edit'),
},
}
Expand Down

0 comments on commit bf02805

Please sign in to comment.