@@ -138,8 +138,8 @@ export class UmbDocumentInfoWorkspaceViewElement extends UmbLitElement {
138
138
139
139
render ( ) {
140
140
return html `<div class= "container" >
141
- <uui- box headline= "Links" style = "--uui-box-default-padding: 0;" > ${ this . #renderLinksSection( ) } </ uui- box>
142
- <uui- box headline= "History" >
141
+ <uui- box headline= ${ this . localize . term ( 'general_links' ) } style= "--uui-box-default-padding: 0;" > ${ this . #renderLinksSection( ) } </ uui- box>
142
+ <uui- box headline= ${ this . localize . term ( 'general_history' ) } >
143
143
<umb- his to ry- lis t>
144
144
${ repeat (
145
145
this . _historyList ,
@@ -164,43 +164,44 @@ export class UmbDocumentInfoWorkspaceViewElement extends UmbLitElement {
164
164
</ a>
165
165
<div class= "link-item" >
166
166
<span class= "link-language" > en-EN </ span>
167
- <span class= "link-content italic" > This document is published but is not in the cache </ span>
167
+ <span class= "link-content italic" > <umb - localize key = "content_parentNotPublishedAnomaly" > < / umb - localize > </ span>
168
168
</ div>
169
169
</ div> ` ;
170
170
}
171
171
172
172
#renderGeneralSection( ) {
173
173
return html `
174
174
<div class= "general-item" >
175
- <strong> Status </ strong>
176
- <span> <uui- tag color = "positive" look = "primary" label= "Publ is hed" > Published </ uui- tag> </ span>
175
+ <strong> ${ this . localize . term ( 'content_publishStatus' ) } </ strong>
176
+ <span> <uui- tag color = "positive" look = "primary" label= ${ this . localize . term ( 'content_published' ) } > <umb - localize key = "content_published" > < / umb - localize > </ uui- tag> </ span>
177
177
</ div>
178
178
<div class= "general-item" >
179
- <strong> Created Date </ strong>
180
- <span> ... </ span>
179
+ <strong> <umb - localize key = "content_createDate" > < / umb - localize > </ strong>
180
+ <span> <umb - localize key = " ${ new Date } " type = "date" > < / umb - localize > </ span>
181
181
</ div>
182
182
<div class= "general-item" >
183
- <strong> Document Type </ strong>
183
+ <strong> <umb - localize key = "content_documentType" > < / umb - localize > </ strong>
184
184
<uui- butto n
185
185
href= ${ this . _editDocumentTypePath + 'edit/' + this . _documentTypeId }
186
- label= "Edit Document Type" > </ uui- butto n>
186
+ label= ${ this . localize . term ( 'general_edit' ) } > </ uui- butto n>
187
187
</ div>
188
188
<div class= "general-item" >
189
- <strong> Template </ strong>
190
- <span> template picker ?</ span>
189
+ <strong> <umb - localize key = "template_template" > < / umb - localize > </ strong>
190
+ <span> IMPLEMENT template picker ?</ span>
191
191
</ div>
192
192
<div class= "general-item" >
193
- <strong> Id </ strong>
193
+ <strong> <umb - localize key = "template_id" > < / umb - localize > </ strong>
194
194
<span> ...</ span>
195
195
</ div>
196
196
` ;
197
197
}
198
198
199
199
#renderHistory( history : HistoryNode ) {
200
- return html ` <umb- his to ry- item .name = "${ history . userName } " .detail = "${ history . timestamp } ">
201
- <span class= "log-type" > ${ this . #renderTag( history . logType ) } ${ this . #renderTagDescription( history . logType ) } </ span>
202
- <uui- butto n label= "Rollback" look = "secondary" slot= "actions">
203
- <uui- icon name= "umb:undo" > </ uui- icon> Rollback
200
+ return html ` <umb- his to ry- item .name = "${ history . userName } " .detail = "${ this . localize . date ( history . timestamp ! ) } ">
201
+ <span class= "log-type" > ${ this . #renderTag( history . logType ) } ${ this . #renderTagDescription( history . logType , history ) } </ span>
202
+ <uui- butto n label= ${ this . localize . term ( 'actions_rollback' ) } look= "secondary" slot = "actions">
203
+ <uui- icon name= "umb:undo" > </ uui- icon>
204
+ <umb- localize key= "actions_rollback" > </ umb- localize>
204
205
</ uui- butto n>
205
206
</ umb- his to ry- item> ` ;
206
207
}
@@ -220,34 +221,34 @@ export class UmbDocumentInfoWorkspaceViewElement extends UmbLitElement {
220
221
#renderTag( type ?: HistoryLogType ) {
221
222
switch ( type ) {
222
223
case 'Publish' :
223
- return html `<uui- tag look= "primary" color = "positive" label= "Publ is h" > Publish </ uui- tag> ` ;
224
+ return html `<uui- tag look= "primary" color = "positive" label= ${ this . localize . term ( 'content_publish' ) } > <umb - localize key = "content_publish" > < / umb - localize > </ uui- tag> ` ;
224
225
case 'Unpublish' :
225
- return html `<uui- tag look= "primary" color = "warning" label= "Unpubl is h" > Unpublish </ uui- tag> ` ;
226
+ return html `<uui- tag look= "primary" color = "warning" label= ${ this . localize . term ( 'content_unpublish' ) } > <umb - localize key = "content_unpublish" > < / umb - localize > </ uui- tag> ` ;
226
227
case 'Save' :
227
- return html `<uui- tag look= "primary" label = "Save" > Save </ uui- tag> ` ;
228
+ return html `<uui- tag look= "primary" label = ${ this . localize . term ( 'auditTrails_smallSave' ) } > <umb - localize key = "auditTrails_smallSave" > < / umb - localize > </ uui- tag> ` ;
228
229
case 'ContentVersionEnableCleanup' :
229
- return html `<uui- tag look= "secondary" label = "Content Version Enable Cleanup" > Save </ uui- tag> ` ;
230
+ return html `<uui- tag look= "secondary" label = ${ this . localize . term ( 'contentTypeEditor_historyCleanupEnableCleanup' ) } > <umb - localize key = "contentTypeEditor_historyCleanupEnableCleanup" > < / umb - localize > </ uui- tag> ` ;
230
231
case 'ContentVersionPreventCleanup' :
231
- return html `<uui- tag look= "secondary" label = "Content Version Prevent Cleanup" > Save </ uui- tag> ` ;
232
+ return html `<uui- tag look= "secondary" label = ${ this . localize . term ( 'contentTypeEditor_historyCleanupPreventCleanup' ) } > <umb - localize key = "contentTypeEditor_historyCleanupPreventCleanup" > < / umb - localize > </ uui- tag> ` ;
232
233
default :
233
- return 'Could not detech log type' ;
234
+ return 'Could not detect log type' ;
234
235
}
235
236
}
236
237
237
- #renderTagDescription( type ?: HistoryLogType , params ?: string ) {
238
+ #renderTagDescription( type ?: HistoryLogType , params ?: HistoryNode ) {
238
239
switch ( type ) {
239
240
case 'Publish' :
240
- return html ` Content published` ;
241
+ return this . localize . term ( 'auditTrails_publish' ) ;
241
242
case 'Unpublish' :
242
- return html `Content unpublished` ;
243
+ return this . localize . term ( 'auditTrails_unpublish' ) ;
243
244
case 'Save' :
244
- return html `Content saved` ;
245
+ return this . localize . term ( 'auditTrails_save' ) ;
245
246
case 'ContentVersionEnableCleanup' :
246
- return html `Cleanup enabled for version : ${ params } ` ;
247
+ return this . localize . term ( 'auditTrails_contentversionenablecleanup' , [ params ?. nodeId ] ) ;
247
248
case 'ContentVersionPreventCleanup' :
248
- return html ` Cleanup disabled for version : ${ params } ` ;
249
+ return this . localize . term ( 'auditTrails_contentversionpreventcleanup' , [ params ?. nodeId ] ) ;
249
250
default :
250
- return 'Could not detech log type' ;
251
+ return 'Could not detect log type' ;
251
252
}
252
253
}
253
254
0 commit comments