mirror of
https://github.com/strapi/strapi.git
synced 2025-07-15 13:02:42 +00:00
12 lines
304 B
JavaScript
12 lines
304 B
JavaScript
import commonTrads from './commonTrads.json';
|
|
|
|
const formatMessagesWithPluginId = (pluginId, messages) => {
|
|
return Object.keys(messages).reduce((acc, current) => {
|
|
acc[`${pluginId}.${current}`] = messages[current];
|
|
|
|
return acc;
|
|
}, commonTrads);
|
|
};
|
|
|
|
export default formatMessagesWithPluginId;
|