gui: Allow to translate action and type in Recent Changes modal (#8548)

Currently, action and type are both displayed only in English. This
commit makes it possible to translate both of them.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
tomasz1986 2023-01-05 14:33:03 +01:00 committed by GitHub
parent ded881c372
commit 458d6cff2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -499,10 +499,14 @@
"Your SMS app should open to let you choose the recipient and send it from your own number.": "Your SMS app should open to let you choose the recipient and send it from your own number.", "Your SMS app should open to let you choose the recipient and send it from your own number.": "Your SMS app should open to let you choose the recipient and send it from your own number.",
"Your email app should open to let you choose the recipient and send it from your own address.": "Your email app should open to let you choose the recipient and send it from your own address.", "Your email app should open to let you choose the recipient and send it from your own address.": "Your email app should open to let you choose the recipient and send it from your own address.",
"days": "days", "days": "days",
"deleted": "deleted",
"directories": "directories", "directories": "directories",
"file": "file",
"files": "files", "files": "files",
"folder": "folder",
"full documentation": "full documentation", "full documentation": "full documentation",
"items": "items", "items": "items",
"modified": "modified",
"seconds": "seconds", "seconds": "seconds",
"theme-name-black": "Black", "theme-name-black": "Black",
"theme-name-dark": "Dark", "theme-name-dark": "Dark",

View File

@ -17,8 +17,16 @@
<tr ng-repeat="changeEvent in globalChangeEvents"> <tr ng-repeat="changeEvent in globalChangeEvents">
<td ng-if="changeEvent.data.modifiedBy">{{friendlyNameFromShort(changeEvent.data.modifiedBy)}}</td> <td ng-if="changeEvent.data.modifiedBy">{{friendlyNameFromShort(changeEvent.data.modifiedBy)}}</td>
<td ng-if="!changeEvent.data.modifiedBy"><span translate>Unknown</span></td> <td ng-if="!changeEvent.data.modifiedBy"><span translate>Unknown</span></td>
<td>{{changeEvent.data.action}}</td> <td ng-switch="changeEvent.data.action">
<td>{{changeEvent.data.type}}</td> <span ng-switch-when="modified" translate>modified</span>
<span ng-switch-when="deleted" translate>deleted</span>
<span ng-switch-default>{{changeEvent.data.action}}</span>
</td>
<td ng-switch="changeEvent.data.type">
<span ng-switch-when="file" translate>file</span>
<span ng-switch-when="folder" translate>folder</span>
<span ng-switch-default>{{changeEvent.data.type}}</span>
</td>
<td class="no-overflow-ellipse">{{folderLabel(changeEvent.data.folder)}}</td> <td class="no-overflow-ellipse">{{folderLabel(changeEvent.data.folder)}}</td>
<td class="file-path no-overflow-ellipse">{{changeEvent.data.path}}</td> <td class="file-path no-overflow-ellipse">{{changeEvent.data.path}}</td>
<td class="no-overflow-ellipse">{{changeEvent.time | date:"yyyy-MM-dd HH:mm:ss"}}</td> <td class="no-overflow-ellipse">{{changeEvent.time | date:"yyyy-MM-dd HH:mm:ss"}}</td>