mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
Add German (de-DE) translation and enable it in i18n config
This commit is contained in:
parent
ffb9693184
commit
e1efe663a0
4 changed files with 17 additions and 35 deletions
|
@ -53,9 +53,6 @@ module.exports = {
|
||||||
type: 'json',
|
type: 'json',
|
||||||
custom: isStopwatch,
|
custom: isStopwatch,
|
||||||
},
|
},
|
||||||
customFields: {
|
|
||||||
type: 'ref',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
exits: {
|
exits: {
|
||||||
|
@ -99,10 +96,6 @@ module.exports = {
|
||||||
'stopwatch',
|
'stopwatch',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (inputs.customFields) {
|
|
||||||
values.customFields = inputs.customFields;
|
|
||||||
}
|
|
||||||
|
|
||||||
const card = await sails.helpers.cards.createOne
|
const card = await sails.helpers.cards.createOne
|
||||||
.with({
|
.with({
|
||||||
project,
|
project,
|
||||||
|
|
|
@ -75,33 +75,6 @@ module.exports = {
|
||||||
listChangedAt: new Date().toISOString(),
|
listChangedAt: new Date().toISOString(),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (values.customFields) {
|
|
||||||
const customFieldGroups = await CustomFieldGroup.qm.getByBoardId(values.board.id);
|
|
||||||
const customFieldGroupMap = _.keyBy(customFieldGroups, 'name');
|
|
||||||
const customFieldGroupIds = customFieldGroups.map((g) => g.id);
|
|
||||||
const customFields = await CustomField.qm.getByCustomFieldGroupIds(customFieldGroupIds);
|
|
||||||
const customFieldMap = _.keyBy(customFields, (f) => `${f.customFieldGroupId}:${f.name}`);
|
|
||||||
|
|
||||||
const createValuePromises = [];
|
|
||||||
Object.entries(values.customFields).forEach(([groupName, fields]) => {
|
|
||||||
const group = customFieldGroupMap[groupName];
|
|
||||||
if (!group) return;
|
|
||||||
Object.entries(fields).forEach(([fieldName, content]) => {
|
|
||||||
const field = customFieldMap[`${group.id}:${fieldName}`];
|
|
||||||
if (!field) return;
|
|
||||||
createValuePromises.push(
|
|
||||||
CustomFieldValue.create({
|
|
||||||
cardId: card.id,
|
|
||||||
customFieldGroupId: group.id,
|
|
||||||
customFieldId: field.id,
|
|
||||||
content: String(content),
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
await Promise.all(createValuePromises);
|
|
||||||
}
|
|
||||||
|
|
||||||
sails.sockets.broadcast(
|
sails.sockets.broadcast(
|
||||||
`board:${card.boardId}`,
|
`board:${card.boardId}`,
|
||||||
'cardCreate',
|
'cardCreate',
|
||||||
|
|
|
@ -19,7 +19,7 @@ module.exports.i18n = {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
locales: ['en-GB', 'en-US', 'es-ES', 'it-IT', 'ru-RU'],
|
locales: ['en-GB', 'en-US', 'es-ES', 'it-IT', 'ru-RU', 'de-DE'],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
16
server/config/locales/de-DE.json
Normal file
16
server/config/locales/de-DE.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"Card Created": "Karte erstellt",
|
||||||
|
"Card Moved": "Karte verschoben",
|
||||||
|
"New Comment": "Neuer Kommentar",
|
||||||
|
"Test Title": "Testtitel",
|
||||||
|
"This is a test text message!": "Dies ist eine Test-Textnachricht!",
|
||||||
|
"This is a *test* **markdown** `message`!": "Dies ist eine *Test*-**Markdown**-`Nachricht`!",
|
||||||
|
"This is a <i>test</i> <b>html</b> <code>message</code>": "Dies ist eine <i>Test</i>-<b>HTML</b>-<code>Nachricht</code>",
|
||||||
|
"You Were Added to Card": "Sie wurden zur Karte hinzugefügt",
|
||||||
|
"You Were Mentioned in Comment": "Sie wurden in einem Kommentar erwähnt",
|
||||||
|
"%s added you to %s on %s": "%s hat Sie zu %s am %s hinzugefügt",
|
||||||
|
"%s created %s in %s on %s": "%s hat %s in %s am %s erstellt",
|
||||||
|
"%s left a new comment to %s on %s": "%s hat einen neuen Kommentar zu %s am %s hinterlassen",
|
||||||
|
"%s mentioned you in %s on %s": "%s hat Sie in %s am %s erwähnt",
|
||||||
|
"%s moved %s from %s to %s on %s": "%s hat %s von %s nach %s am %s verschoben"
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue