mirror of
https://github.com/strapi/strapi.git
synced 2025-08-10 17:58:07 +00:00
wip translation
This commit is contained in:
parent
f3d41e3eac
commit
6ddf55ee65
@ -181,11 +181,12 @@
|
||||
"Settings.permissions.auditLogs.action": "Action",
|
||||
"Settings.permissions.auditLogs.date": "Date",
|
||||
"Settings.permissions.auditLogs.user": "User",
|
||||
"Settings.permissions.auditLogs.user.fullname": "{firstname} {lastname}",
|
||||
"Settings.permissions.auditLogs.userId": "User ID",
|
||||
"Settings.permissions.auditLogs.details": "Log Details",
|
||||
"Settings.permissions.auditLogs.payload": "Payload",
|
||||
"Settings.permissions.auditLogs.listview.header.subtitle": "Logs of all the activities that happened in your environment",
|
||||
"Settings.permissions.auditLogs.entry.create": "Create entry",
|
||||
"Settings.permissions.auditLogs.entry.create": "Create entry {model, select, model ({model}) other {}}",
|
||||
"Settings.permissions.auditLogs.entry.update": "Update entry",
|
||||
"Settings.permissions.auditLogs.entry.delete": "Delete entry",
|
||||
"Settings.permissions.auditLogs.entry.publish": "Publish entry",
|
||||
@ -848,4 +849,4 @@
|
||||
"request.error.model.unknown": "This model doesn't exist",
|
||||
"skipToContent": "Skip to content",
|
||||
"submit": "Submit"
|
||||
}
|
||||
}
|
@ -49,11 +49,11 @@ const ActionBody = ({ status, data, formattedDate }) => {
|
||||
id: 'Settings.permissions.auditLogs.action',
|
||||
defaultMessage: 'Action',
|
||||
})}
|
||||
actionName={getActionMessage(
|
||||
formatMessage({
|
||||
actionName={formatMessage(
|
||||
{
|
||||
id: `Settings.permissions.auditLogs.${action}`,
|
||||
defaultMessage: getDefaultMessage(action),
|
||||
}),
|
||||
},
|
||||
{ model: payload?.model }
|
||||
)}
|
||||
/>
|
||||
|
@ -8,7 +8,7 @@ import { Tbody, Td, Tr } from '@strapi/design-system/Table';
|
||||
import Eye from '@strapi/icons/Eye';
|
||||
import { onRowClick, stopPropagation } from '@strapi/helper-plugin';
|
||||
import useFormatTimeStamp from '../hooks/useFormatTimeStamp';
|
||||
import { getActionMessage, getDefaultMessage } from '../utils/formatMessage';
|
||||
import { getDefaultMessage } from '../utils/formatMessage';
|
||||
|
||||
const TableRows = ({ headers, rows, onOpenModal }) => {
|
||||
const { formatMessage } = useIntl();
|
||||
@ -20,11 +20,11 @@ const TableRows = ({ headers, rows, onOpenModal }) => {
|
||||
}
|
||||
|
||||
if (type === 'action') {
|
||||
return getActionMessage(
|
||||
formatMessage({
|
||||
return formatMessage(
|
||||
{
|
||||
id: `Settings.permissions.auditLogs.${value}`,
|
||||
defaultMessage: getDefaultMessage(value),
|
||||
}),
|
||||
},
|
||||
{ model }
|
||||
);
|
||||
}
|
||||
|
@ -32,11 +32,3 @@ export const actionTypes = {
|
||||
export const getDefaultMessage = (value) => {
|
||||
return actionTypes[value] || value;
|
||||
};
|
||||
|
||||
export const getActionMessage = (message, action) => {
|
||||
if (message.includes('entry')) {
|
||||
return `${message} (${action.model})`;
|
||||
}
|
||||
|
||||
return message;
|
||||
};
|
||||
|
@ -25,7 +25,16 @@ const getDisplayedFilters = ({ formatMessage, users }) => {
|
||||
|
||||
const userOptions = users?.results.map((user) => {
|
||||
return {
|
||||
label: `${user.firstname} ${user.lastname}`,
|
||||
label: formatMessage(
|
||||
{
|
||||
id: 'Settings.permissions.auditLogs.user.fullname',
|
||||
defaultMessage: '{firstname} {lastname}',
|
||||
},
|
||||
{
|
||||
firstname: user.firstname,
|
||||
lastname: user.lastname,
|
||||
}
|
||||
),
|
||||
// Combobox expects a string value
|
||||
customValue: user.id.toString(),
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user