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