@@ -22,6 +22,8 @@ import {
2222 proPlanStorageMb ,
2323 standardPlanStorageMb ,
2424} from '../../lib/subscription'
25+ import { useI18n } from '../../lib/hooks/useI18n'
26+ import { lngKeys } from '../../lib/i18n/types'
2527
2628const UploadListPage = ( {
2729 files,
@@ -34,6 +36,7 @@ const UploadListPage = ({
3436 const { pushApiErrorMessage } = useToast ( )
3537 const { subscription, permissions, currentUserIsCoreMember } = usePage ( )
3638 const { openSettingsTab } = useSettings ( )
39+ const { translate } = useI18n ( )
3740
3841 const onDeleteHandler = useCallback (
3942 ( team : SerializedTeam , file : SerializedFileInfo ) => {
@@ -44,19 +47,19 @@ const UploadListPage = ({
4447 setSending ( true )
4548
4649 messageBox ( {
47- title : `Cancel?` ,
48- message : `Are you sure to delete this file? It won't be visible in your document anymore.` ,
50+ title : translate ( lngKeys . GeneralDelete ) ,
51+ message : translate ( lngKeys . AttachmentsDeleteDisclaimer ) ,
4952 iconType : DialogIconTypes . Warning ,
5053 buttons : [
5154 {
5255 variant : 'secondary' ,
53- label : 'Cancel' ,
56+ label : translate ( lngKeys . GeneralCancel ) ,
5457 cancelButton : true ,
5558 defaultButton : true ,
5659 } ,
5760 {
5861 variant : 'danger' ,
59- label : 'Delete' ,
62+ label : translate ( lngKeys . GeneralDelete ) ,
6063 onClick : async ( ) => {
6164 deleteFile ( team , file . name )
6265 . then ( ( ) => {
@@ -73,7 +76,7 @@ const UploadListPage = ({
7376 ] ,
7477 } )
7578 } ,
76- [ messageBox , setCurrentFiles , pushApiErrorMessage , sending ]
79+ [ messageBox , setCurrentFiles , pushApiErrorMessage , sending , translate ]
7780 )
7881
7982 return (
@@ -88,17 +91,21 @@ const UploadListPage = ({
8891 { permissions != null && (
8992 < StorageDescription >
9093 < span >
91- { sizeInMb } MB of{ ' ' }
92- { subscription == null
93- ? `${ freePlanStorageMb } MB `
94- : subscription . plan === 'standard'
95- ? `${ ( permissions . length * standardPlanStorageMb ) / 1000 } GB `
96- : `${ ( permissions . length * proPlanStorageMb ) / 1000 } GB ` }
97- used.{ ' ' }
94+ { translate ( lngKeys . AttachmentsLimitDisclaimer , {
95+ current : `${ sizeInMb } MB` ,
96+ limit :
97+ subscription == null
98+ ? `${ freePlanStorageMb } MB `
99+ : subscription . plan === 'standard'
100+ ? `${
101+ ( permissions . length * standardPlanStorageMb ) / 1000
102+ } GB `
103+ : `${ ( permissions . length * proPlanStorageMb ) / 1000 } GB ` ,
104+ } ) }
98105 </ span >
99106 { ( subscription == null || subscription . plan !== 'pro' ) && (
100107 < span >
101- If you need more space, please { ' ' }
108+ { translate ( lngKeys . AttachmentsPlanUpgradeDisclaimer ) } { ' ' }
102109 < a
103110 className = 'upgrade-link'
104111 href = '#'
@@ -107,7 +114,7 @@ const UploadListPage = ({
107114 openSettingsTab ( 'teamUpgrade' )
108115 } }
109116 >
110- upgrade your plan.
117+ { translate ( lngKeys . AttachmentsUpgradeLink ) }
111118 </ a >
112119 </ span >
113120 ) }
0 commit comments