From 920f9c097d938a0b6079728bcd5ca6e1c0c39c23 Mon Sep 17 00:00:00 2001 From: Yu Inoue <34591767+eternity1984@users.noreply.github.com> Date: Wed, 20 Dec 2023 20:26:01 +0900 Subject: [PATCH 1/8] fix: Display year when date is outside of current year (#567) --- .../components/CardModal/Activities/Item.jsx | 3 ++- .../CardModal/Activities/ItemComment.jsx | 3 ++- client/src/components/DueDate/DueDate.jsx | 18 ++++++++++++++++-- client/src/locales/cs/core.js | 2 ++ client/src/locales/da/core.js | 2 ++ client/src/locales/de/core.js | 2 ++ client/src/locales/en/core.js | 2 ++ client/src/locales/es/core.js | 2 ++ client/src/locales/fr/core.js | 2 ++ client/src/locales/it/core.js | 2 ++ client/src/locales/ja/core.js | 2 ++ client/src/locales/ko/core.js | 2 ++ client/src/locales/pl/core.js | 2 ++ client/src/locales/ro/core.js | 2 ++ client/src/locales/ru/core.js | 2 ++ client/src/locales/sk/core.js | 2 ++ client/src/locales/sv/core.js | 2 ++ client/src/locales/tr/core.js | 2 ++ client/src/locales/uz/core.js | 2 ++ client/src/locales/zh/core.js | 2 ++ client/src/utils/get-date-format.js | 6 ++++++ 21 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 client/src/utils/get-date-format.js diff --git a/client/src/components/CardModal/Activities/Item.jsx b/client/src/components/CardModal/Activities/Item.jsx index 4a530632..c23d3bf9 100755 --- a/client/src/components/CardModal/Activities/Item.jsx +++ b/client/src/components/CardModal/Activities/Item.jsx @@ -4,6 +4,7 @@ import classNames from 'classnames'; import { useTranslation, Trans } from 'react-i18next'; import { Comment } from 'semantic-ui-react'; +import getDateFormat from '../../../utils/get-date-format'; import { ActivityTypes } from '../../../constants/Enums'; import ItemComment from './ItemComment'; import User from '../../User'; @@ -66,7 +67,7 @@ const Item = React.memo(({ type, data, createdAt, user }) => {
{contentNode}
- {t('format:longDateTime', { + {t(`format:${getDateFormat(createdAt)}`, { postProcess: 'formatDate', value: createdAt, })} diff --git a/client/src/components/CardModal/Activities/ItemComment.jsx b/client/src/components/CardModal/Activities/ItemComment.jsx index 488f0d8d..fca47b31 100755 --- a/client/src/components/CardModal/Activities/ItemComment.jsx +++ b/client/src/components/CardModal/Activities/ItemComment.jsx @@ -6,6 +6,7 @@ import { Comment } from 'semantic-ui-react'; import { usePopup } from '../../../lib/popup'; import { Markdown } from '../../../lib/custom-ui'; +import getDateFormat from '../../../utils/get-date-format'; import CommentEdit from './CommentEdit'; import User from '../../User'; import DeleteStep from '../../DeleteStep'; @@ -33,7 +34,7 @@ const ItemComment = React.memo(
{user.name} - {t('format:longDateTime', { + {t(`format:${getDateFormat(createdAt)}`, { postProcess: 'formatDate', value: createdAt, })} diff --git a/client/src/components/DueDate/DueDate.jsx b/client/src/components/DueDate/DueDate.jsx index e36fa251..59f0754c 100644 --- a/client/src/components/DueDate/DueDate.jsx +++ b/client/src/components/DueDate/DueDate.jsx @@ -4,6 +4,8 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; +import getDateFormat from '../../utils/get-date-format'; + import styles from './DueDate.module.scss'; const SIZES = { @@ -12,15 +14,27 @@ const SIZES = { MEDIUM: 'medium', }; -const FORMATS = { +const LONG_DATE_FORMAT_BY_SIZE = { tiny: 'longDate', small: 'longDate', medium: 'longDateTime', }; +const FULL_DATE_FORMAT_BY_SIZE = { + tiny: 'fullDate', + small: 'fullDate', + medium: 'fullDateTime', +}; + const DueDate = React.memo(({ value, size, isDisabled, onClick }) => { const [t] = useTranslation(); + const dateFormat = getDateFormat( + value, + LONG_DATE_FORMAT_BY_SIZE[size], + FULL_DATE_FORMAT_BY_SIZE[size], + ); + const contentNode = ( { onClick && styles.wrapperHoverable, )} > - {t(`format:${FORMATS[size]}`, { + {t(`format:${dateFormat}`, { value, postProcess: 'formatDate', })} diff --git a/client/src/locales/cs/core.js b/client/src/locales/cs/core.js index f32a580a..04dfc8d8 100644 --- a/client/src/locales/cs/core.js +++ b/client/src/locales/cs/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd MMM', longDateTime: "d MMMM 'v' p", + fullDate: 'd MMM, y', + fullDateTime: "d MMMM, y 'v' p", }, translation: { diff --git a/client/src/locales/da/core.js b/client/src/locales/da/core.js index 7793d4e3..93e7096e 100644 --- a/client/src/locales/da/core.js +++ b/client/src/locales/da/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'MMM d', longDateTime: "MMMM d 'at' p", + fullDate: 'MMM d, y', + fullDateTime: "MMMM d, y 'a' p", }, translation: { diff --git a/client/src/locales/de/core.js b/client/src/locales/de/core.js index 4389df0d..0b743de5 100644 --- a/client/src/locales/de/core.js +++ b/client/src/locales/de/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd. MMM', longDateTime: "d. MMMM 'um' p", + fullDate: 'd. MMM. y', + fullDateTime: "d. MMMM. y 'um' p", }, translation: { diff --git a/client/src/locales/en/core.js b/client/src/locales/en/core.js index 10c40a65..83b01168 100644 --- a/client/src/locales/en/core.js +++ b/client/src/locales/en/core.js @@ -5,6 +5,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'MMM d', longDateTime: "MMMM d 'at' p", + fullDate: 'MMM d, y', + fullDateTime: "MMMM d, y 'at' p", }, translation: { diff --git a/client/src/locales/es/core.js b/client/src/locales/es/core.js index e7e2d8da..a0b12606 100644 --- a/client/src/locales/es/core.js +++ b/client/src/locales/es/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'MMM d', longDateTime: "MMMM d 'a' p", + fullDate: 'MMM d, y', + fullDateTime: "MMMM d, y 'a' p", }, translation: { diff --git a/client/src/locales/fr/core.js b/client/src/locales/fr/core.js index 81f43cbf..e20e2910 100644 --- a/client/src/locales/fr/core.js +++ b/client/src/locales/fr/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd MMM', longDateTime: "d MMMM 'à' p", + fullDate: 'd MMM y', + fullDateTime: "d MMMM y 'à' p", }, translation: { diff --git a/client/src/locales/it/core.js b/client/src/locales/it/core.js index 0241da63..f08a9460 100644 --- a/client/src/locales/it/core.js +++ b/client/src/locales/it/core.js @@ -5,6 +5,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'MMM d', longDateTime: "MMMM d 'at' p", + fullDate: 'MMM d, y', + fullDateTime: "MMMM d, y 'at' p", }, translation: { diff --git a/client/src/locales/ja/core.js b/client/src/locales/ja/core.js index 56a1776f..8242246f 100644 --- a/client/src/locales/ja/core.js +++ b/client/src/locales/ja/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'MMMMd日', longDateTime: "MMMMd'日 ' HH:mm", + fullDate: 'yyyy年M月d日', + fullDateTime: 'yyyy年M月d日 HH:mm', }, translation: { diff --git a/client/src/locales/ko/core.js b/client/src/locales/ko/core.js index 834c8d33..474f9de8 100644 --- a/client/src/locales/ko/core.js +++ b/client/src/locales/ko/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: "MMMMd'일'", longDateTime: "MMMMd'일 ' a hh시 mm분", + fullDate: 'yyyy년M월d일', + fullDateTime: 'yyyy년M월d일 a hh시 mm분', }, translation: { diff --git a/client/src/locales/pl/core.js b/client/src/locales/pl/core.js index 0acc2662..54ac3066 100644 --- a/client/src/locales/pl/core.js +++ b/client/src/locales/pl/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd MMM', longDateTime: "d MMMM 'o' p", + fullDate: 'd MMM y', + fullDateTime: "d MMMM y 'o' p", }, translation: { diff --git a/client/src/locales/ro/core.js b/client/src/locales/ro/core.js index c9b9e9dc..2e199226 100644 --- a/client/src/locales/ro/core.js +++ b/client/src/locales/ro/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd MMM', longDateTime: "d MMMM 'в' p", + fullDate: 'd MMM y', + fullDateTime: "d MMMM y 'в' p", }, translation: { diff --git a/client/src/locales/ru/core.js b/client/src/locales/ru/core.js index 19371038..138b893a 100644 --- a/client/src/locales/ru/core.js +++ b/client/src/locales/ru/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd MMM', longDateTime: "d MMMM 'в' p", + fullDate: 'd MMM y', + fullDateTime: "d MMMM y 'в' p", }, translation: { diff --git a/client/src/locales/sk/core.js b/client/src/locales/sk/core.js index 574be43f..b3716303 100644 --- a/client/src/locales/sk/core.js +++ b/client/src/locales/sk/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd MMM', longDateTime: "d MMMM 'v' p", + fullDate: 'd MMM y', + fullDateTime: "d MMMM y 'v' p", }, translation: { diff --git a/client/src/locales/sv/core.js b/client/src/locales/sv/core.js index 1b43e132..0f7b37fb 100644 --- a/client/src/locales/sv/core.js +++ b/client/src/locales/sv/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'MMM d', longDateTime: "MMMM d 'at' p", + fullDate: 'MMM d, y', + fullDateTime: "MMMM d, y 'at' p", }, translation: { diff --git a/client/src/locales/tr/core.js b/client/src/locales/tr/core.js index bd267c01..b04cd216 100644 --- a/client/src/locales/tr/core.js +++ b/client/src/locales/tr/core.js @@ -9,6 +9,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd. MMM', longDateTime: "d. MMMM 'Saat' p", + fullDate: 'd. MMM. y', + fullDateTime: "d. MMMM. y 'Saat' p", }, translation: { diff --git a/client/src/locales/uz/core.js b/client/src/locales/uz/core.js index cc2c52e7..084de78e 100644 --- a/client/src/locales/uz/core.js +++ b/client/src/locales/uz/core.js @@ -5,6 +5,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'MMM d', longDateTime: "MMMM d 'at' p", + fullDate: 'MMM d, y', + fullDateTime: "MMMM d, y 'at' p", }, translation: { diff --git a/client/src/locales/zh/core.js b/client/src/locales/zh/core.js index c381a88f..643bb4eb 100644 --- a/client/src/locales/zh/core.js +++ b/client/src/locales/zh/core.js @@ -5,6 +5,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'MMM d', longDateTime: "MMMM d 'at' p", + fullDate: 'MMM d, y', + fullDateTime: "MMMM d, y 'at' p", }, translation: { diff --git a/client/src/utils/get-date-format.js b/client/src/utils/get-date-format.js new file mode 100644 index 00000000..cb7525d8 --- /dev/null +++ b/client/src/utils/get-date-format.js @@ -0,0 +1,6 @@ +export default (value, longDateFormat = 'longDateTime', fullDateFormat = 'fullDateTime') => { + const year = value.getFullYear(); + const currentYear = new Date().getFullYear(); + + return year === currentYear ? longDateFormat : fullDateFormat; +}; From 668092de7d12f15132635868980b4a986eadc8da Mon Sep 17 00:00:00 2001 From: ossdate Date: Wed, 20 Dec 2023 19:33:37 +0800 Subject: [PATCH 2/8] fix: Update Chinese translation (#569) --- client/src/locales/zh/core.js | 26 +++++++++++++++++++++++++- client/src/locales/zh/login.js | 8 +++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/client/src/locales/zh/core.js b/client/src/locales/zh/core.js index 643bb4eb..486cfcdb 100644 --- a/client/src/locales/zh/core.js +++ b/client/src/locales/zh/core.js @@ -11,6 +11,7 @@ export default { translation: { common: { + aboutPlanka: '关于 Planka', account: '账号', actions: '操作', addAttachment_title: '添加附件', @@ -40,6 +41,9 @@ export default { background: '背景', board: '面板', boardNotFound_title: '面板不存在', + canComment: '可以评论', + canEditContentOfBoard: '可以编辑面板内容', + canOnlyViewBoard: '仅可查看面板', cardActions_title: '卡片操作', cardNotFound_title: '卡片不存在', cardOrActionAreDeleted: '卡片或操作已经被删除', @@ -63,14 +67,18 @@ export default { deleteTask_title: '删除任务', deleteUser_title: '删除用户', description: '描述', + detectAutomatically: '自动删除', dropFileToUpload: '拖放文件以上传', + editor: '编辑器', editAttachment_title: '编辑附件', editAvatar_title: '编辑头像', editBoard_title: '编辑面板', editDueDate_title: '编辑截止时间', editEmail_title: '编辑邮箱', + editInformation_title: '编辑信息', editLabel_title: '编辑标签', editPassword_title: '修改密码', + editPermissions_title: '修改权限', editStopwatch_title: '修改时间', editUsername_title: '修改用户名', email: '邮箱', @@ -83,11 +91,14 @@ export default { enterTaskDescription: '输入任务描述...', filterByLabels_title: '通过标签筛选', filterByMembers_title: '通过成员筛选', - fromComputer_title: '从本机', + fromComputer_title: '来自计算机', + fromTrello: '来自 Trello', general: '全体', hours: '小时', + importBoard_title: '导入面板', invalidCurrentPassword: '当前密码错误', labels: '标签', + language: '语言', leaveBoard_title: '离开面板', leaveProject_title: '离开项目', list: '列表', @@ -117,15 +128,20 @@ export default { projectNotFound_title: '项目未找到', removeManager_title: '删除管理员', removeMember_title: '删除成员', + searchLabels: '搜索标签...', + searchMembers: '搜索成员...', + searchUsers: '搜索用户...', seconds: '秒', selectBoard: '选择面板', selectList: '选择列表', + selectPermissions_title: '选择权限', selectProject: '选择项目', settings: '设置', stopwatch: '计时器', subscribeToMyOwnCardsByDefault: '默认关注自己创建的卡片', taskActions_title: '任务操作', tasks: '任务', + thereIsNoPreviewAvailableForThisAttachment: '此附件无法预览', time: '时间', title: '标题', userActions_title: '用户操作', @@ -138,6 +154,8 @@ export default { username: '用户名', usernameAlreadyInUse: '用户名已被占用', users: '用户', + version: '版本', + viewer: '视图', writeComment: '编写评论...', }, @@ -149,6 +167,7 @@ export default { addCard_title: '添加卡片', addComment: '添加评论', addList: '添加列表', + addMember: 'Add member', addMoreDetailedDescription: '添加更多详细描述', addTask: '添加任务', addToCard: '添加到卡片', @@ -178,10 +197,14 @@ export default { editDueDate_title: '编辑到期时间', editDescription_title: '编辑描述', editEmail_title: '编辑邮箱', + editInformation_title: '编辑信息', editPassword_title: '编辑密码', + editPermissions: '编辑权限', editStopwatch_title: '编辑时间', editTitle_title: '编辑标题', editUsername_title: '编辑用户名', + hideDetails: '隐藏详情', + import: '导入', leaveBoard: '离开面板', leaveProject: '离开项目', logOut_title: '退出', @@ -197,6 +220,7 @@ export default { removeMember: '删除成员', save: '保存', showAllAttachments: '显示所有的附件 ({{hidden}} 隐藏)', + showDetails: '显示详情', showFewerAttachments: '显示较少的附件', start: '开始', stop: '结束', diff --git a/client/src/locales/zh/login.js b/client/src/locales/zh/login.js index ef3b4369..04dbbc3e 100644 --- a/client/src/locales/zh/login.js +++ b/client/src/locales/zh/login.js @@ -2,19 +2,21 @@ export default { translation: { common: { emailOrUsername: '邮箱或用户名', - invalidEmailOrUsername: '错误的邮箱或用户名', + invalidEmailOrUsername: '无效的邮箱或用户名', invalidPassword: '密码错误', logInToPlanka: '登录至 Planka', noInternetConnection: '没有网络连接', - pageNotFound_title: '页面找不到', + pageNotFound_title: '找不到页面', password: '密码', projectManagement: '项目管理', - serverConnectionFailed: '服务连接失败', + serverConnectionFailed: '服务器连接失败', unknownError: '未知错误,请稍后重试', + useSingleSignOn: '使用单点登录', }, action: { logIn: '登录', + logInWithSSO: '使用SSO登录', }, }, }; From f4789c28dbad0472dda882432f675813cba4b74b Mon Sep 17 00:00:00 2001 From: Denis Polishchuk <52839937+denipolis@users.noreply.github.com> Date: Wed, 20 Dec 2023 13:39:51 +0200 Subject: [PATCH 3/8] feat: Add Ukrainian translation (#571) --- client/src/locales/index.js | 3 +- client/src/locales/ua/core.js | 235 +++++++++++++++++++++++++++++++++ client/src/locales/ua/index.js | 8 ++ client/src/locales/ua/login.js | 22 +++ 4 files changed, 267 insertions(+), 1 deletion(-) create mode 100644 client/src/locales/ua/core.js create mode 100644 client/src/locales/ua/index.js create mode 100644 client/src/locales/ua/login.js diff --git a/client/src/locales/index.js b/client/src/locales/index.js index 275f6163..edd1392d 100644 --- a/client/src/locales/index.js +++ b/client/src/locales/index.js @@ -13,10 +13,11 @@ import ru from './ru'; import sk from './sk'; import sv from './sv'; import tr from './tr'; +import ua from './ua'; import uz from './uz'; import zh from './zh'; -const locales = [cs, da, de, en, es, fr, it, ja, ko, pl, ro, ru, sk, sv, tr, uz, zh]; +const locales = [cs, da, de, en, es, fr, it, ja, ko, pl, ro, ru, sk, sv, tr, ua, uz, zh]; export default locales; diff --git a/client/src/locales/ua/core.js b/client/src/locales/ua/core.js new file mode 100644 index 00000000..5af394ea --- /dev/null +++ b/client/src/locales/ua/core.js @@ -0,0 +1,235 @@ +export default { + format: { + date: 'd/M/yyyy', + time: 'p', + dateTime: '$t(format:date) $t(format:time)', + longDate: 'd MMMM', + longDateTime: "d MMMM 'о' p", + }, + + translation: { + common: { + aboutPlanka: 'Про Planka', + account: 'Обліковий запис', + actions: 'Дії', + addAttachment_title: 'Додати Вкладення', + addComment: 'Додати коментар', + addManager_title: 'Додати Менеджера', + addMember_title: 'Додати Учасника', + addUser_title: 'Додати Користувача', + administrator: 'Адміністратор', + all: 'Все', + allChangesWillBeAutomaticallySavedAfterConnectionRestored: + 'Всі зміни будуть автоматично збережені
після відновлення підключення.', + areYouSureYouWantToDeleteThisAttachment: 'Ви впевнені, що хочете видалити це вкладення?', + areYouSureYouWantToDeleteThisBoard: 'Ви впевнені, що хочете видалити цю дошку?', + areYouSureYouWantToDeleteThisCard: 'Ви впевнені, що хочете видалити цю картку?', + areYouSureYouWantToDeleteThisComment: 'Ви впевнені, що хочете видалити цей коментар?', + areYouSureYouWantToDeleteThisLabel: 'Ви впевнені, що хочете видалити цю мітку?', + areYouSureYouWantToDeleteThisList: 'Ви впевнені, що хочете видалити цей список?', + areYouSureYouWantToDeleteThisProject: 'Ви впевнені, що хочете видалити цей проект?', + areYouSureYouWantToDeleteThisTask: 'Ви впевнені, що хочете видалити це завдання?', + areYouSureYouWantToDeleteThisUser: 'Ви впевнені, що хочете видалити цього користувача?', + areYouSureYouWantToLeaveBoard: 'Ви впевнені, що хочете залишити дошку?', + areYouSureYouWantToLeaveProject: 'Ви впевнені, що хочете залишити проект?', + areYouSureYouWantToRemoveThisManagerFromProject: + 'Ви впевнені, що хочете видалити цього менеджера з проекту?', + areYouSureYouWantToRemoveThisMemberFromBoard: + 'Ви впевнені, що хочете видалити цього учасника з дошки?', + attachment: 'Вкладення', + attachments: 'Вкладення', + authentication: 'Аутентифікація', + background: 'Фон', + board: 'Дошка', + boardNotFound_title: 'Дошку не знайдено', + canComment: 'Може коментувати', + canEditContentOfBoard: 'Має право редагувати вміст дошки.', + canOnlyViewBoard: 'Може лише переглядати дошку.', + cardActions_title: 'Дії з карткою', + cardNotFound_title: 'Картку не знайдено', + cardOrActionAreDeleted: 'Картка чи дія видалена.', + color: 'Колір', + createBoard_title: 'Створити Дошку', + createLabel_title: 'Створити Мітку', + createNewOneOrSelectExistingOne: 'Створіть нову або виберіть
існуючу.', + createProject_title: 'Створити Проект', + createTextFile_title: 'Створити Текстовий Файл', + currentPassword: 'Поточний пароль', + dangerZone_title: 'Небезпечна Зона', + date: 'Дата', + dueDate_title: 'Крайній Термін', + deleteAttachment_title: 'Видалити Вкладення', + deleteBoard_title: 'Видалити Дошку', + deleteCard_title: 'Видалити Картку', + deleteComment_title: 'Видалити Коментар', + deleteLabel_title: 'Видалити Мітку', + deleteList_title: 'Видалити Список', + deleteProject_title: 'Видалити Проект', + deleteTask_title: 'Видалити Завдання', + deleteUser_title: 'Видалити Користувача', + description: 'Опис', + detectAutomatically: 'Визначити автоматично', + dropFileToUpload: 'Перетягніть файл для завантаження', + editor: 'Редактор', + editAttachment_title: 'Редагувати Вкладення', + editAvatar_title: 'Редагувати Аватар', + editBoard_title: 'Редагувати Дошку', + editDueDate_title: 'Редагувати Крайній Термін', + editEmail_title: 'Редагувати Електронну пошту', + editInformation_title: 'Редагувати Інформацію', + editLabel_title: 'Редагувати Мітку', + editPassword_title: 'Редагувати Пароль', + editPermissions_title: 'Редагувати Дозволи', + editStopwatch_title: 'Редагувати Секундомір', + editUsername_title: "Редагувати Ім'я користувача", + email: 'Електронна пошта', + emailAlreadyInUse: 'Електронна пошта вже використовується', + enterCardTitle: 'Введіть назву картки... [Ctrl+Enter] для автоматичного відкриття.', + enterDescription: 'Введіть опис...', + enterFilename: "Введіть ім'я файлу", + enterListTitle: 'Введіть назву списку...', + enterProjectTitle: 'Введіть назву проекту', + enterTaskDescription: 'Введіть опис завдання...', + filterByLabels_title: 'Фільтрувати за Мітками', + filterByMembers_title: 'Фільтрувати за Учасниками', + fromComputer_title: "З комп'ютера", + fromTrello: 'З Trello', + general: 'Загальне', + hours: 'Години', + importBoard_title: 'Імпортувати Дошку', + invalidCurrentPassword: 'Невірний поточний пароль', + labels: 'Мітки', + language: 'Мова', + leaveBoard_title: 'Покинути Дошку', + leaveProject_title: 'Покинути Проект', + list: 'Список', + listActions_title: 'Дії зі Списком', + managers: 'Менеджери', + members: 'Учасники', + minutes: 'Хвилини', + moveCard_title: 'Перемістити Картку', + name: 'Назва', + newEmail: 'Нова електронна пошта', + newPassword: 'Новий пароль', + newUsername: "Нове ім'я користувача", + noConnectionToServer: 'Відсутнє підключення до сервера', + noBoards: 'Немає дошок', + noLists: 'Немає списків', + noProjects: 'Немає проектів', + notifications: 'Сповіщення', + noUnreadNotifications: 'Немає непрочитаних сповіщень.', + openBoard_title: 'Відкрити Дошку', + optional_inline: 'опціонально', + organization: 'Організація', + phone: 'Телефон', + preferences: 'Уподобання', + pressPasteShortcutToAddAttachmentFromClipboard: + 'Порада: натисніть Ctrl-V (⌘V на Mac), щоб додати вкладення з буфера обміну.', + project: 'Проект', + projectNotFound_title: 'Проект не знайдено', + removeManager_title: 'Видалити Менеджера', + removeMember_title: 'Видалити Учасника', + searchLabels: 'Пошук міток...', + searchMembers: 'Пошук учасників...', + searchUsers: 'Пошук користувачів...', + seconds: 'Секунди', + selectBoard: 'Вибрати дошку', + selectList: 'Вибрати список', + selectPermissions_title: 'Вибрати Дозволи', + selectProject: 'Вибрати проект', + settings: 'Налаштування', + stopwatch: 'Секундомір', + subscribeToMyOwnCardsByDefault: 'Підписатися на свої картки за замовчуванням', + taskActions_title: 'Дії з завданням', + tasks: 'Завдання', + thereIsNoPreviewAvailableForThisAttachment: 'Для цього вкладення немає доступного перегляду.', + time: 'Час', + title: 'Назва', + userActions_title: 'Дії користувача', + userAddedThisCardToList: '<0>{{user}}<1> додав(ла) цю картку до {{list}}', + userLeftNewCommentToCard: + '{{user}} залишив(ла) новий коментар «{{comment}}» до <2>{{card}}', + userMovedCardFromListToList: + '{{user}} перемістив(ла) <2>{{card}} з {{fromList}} в {{toList}}', + userMovedThisCardFromListToList: + '<0>{{user}}<1> перемістив(ла) цю картку з {{fromList}} в {{toList}}', + username: "Ім'я користувача", + usernameAlreadyInUse: "Ім'я користувача вже використовується", + users: 'Користувачі', + version: 'Версія', + viewer: 'Переглядач', + writeComment: 'Написати коментар...', + }, + + action: { + addAnotherCard: 'Додати іншу картку', + addAnotherList: 'Додати інший список', + addAnotherTask: 'Додати інше завдання', + addCard: 'Додати картку', + addCard_title: 'Додати Картку', + addComment: 'Додати коментар', + addList: 'Додати список', + addMember: 'Додати учасника', + addMoreDetailedDescription: 'Додати більш детальний опис', + addTask: 'Додати завдання', + addToCard: 'Додати до картки', + addUser: 'Додати користувача', + createBoard: 'Створити дошку', + createFile: 'Створити файл', + createLabel: 'Створити мітку', + createNewLabel: 'Створити нову мітку', + createProject: 'Створити проект', + delete: 'Видалити', + deleteAttachment: 'Видалити вкладення', + deleteAvatar: 'Видалити аватар', + deleteBoard: 'Видалити дошку', + deleteCard: 'Видалити картку', + deleteCard_title: 'Видалити Картку', + deleteComment: 'Видалити коментар', + deleteImage: 'Видалити зображення', + deleteLabel: 'Видалити мітку', + deleteList: 'Видалити список', + deleteList_title: 'Видалити Список', + deleteProject: 'Видалити проект', + deleteProject_title: 'Видалити Проект', + deleteTask: 'Видалити завдання', + deleteTask_title: 'Видалити Завдання', + deleteUser: 'Видалити користувача', + edit: 'Редагувати', + editDueDate_title: 'Редагувати термін виконання', + editDescription_title: 'Редагувати опис', + editEmail_title: 'Редагувати E-mail', + editInformation_title: 'Редагувати інформацію', + editPassword_title: 'Редагувати пароль', + editPermissions: 'Редагувати дозволи', + editStopwatch_title: 'Редагувати секундомір', + editTitle_title: 'Редагувати Заголовок', + editUsername_title: "Редагувати Ім'я користувача", + hideDetails: 'Сховати деталі', + import: 'Імпортувати', + leaveBoard: 'Залишити дошку', + leaveProject: 'Залишити проект', + logOut_title: 'Вийти', + makeCover_title: 'Встановити обкладинку', + move: 'Перемістити', + moveCard_title: 'Перемістити Картку', + remove: 'Видалити', + removeBackground: 'Видалити фон', + removeCover_title: 'Видалити обкладинку', + removeFromBoard: 'Вилучити з дошки', + removeFromProject: 'Вилучити з проекту', + removeManager: 'Вилучити керівника', + removeMember: 'Вилучити учасника', + save: 'Зберегти', + showAllAttachments: 'Показати всі вкладення ({{hidden}} приховані)', + showDetails: 'Показати деталі', + showFewerAttachments: 'Показати менше вкладень', + start: 'Почати', + stop: 'Зупинити', + subscribe: 'Підписатися', + unsubscribe: 'Відписатися', + uploadNewAvatar: 'Завантажити новий аватар', + uploadNewImage: 'Завантажити нове зображення', + }, + }, +}; diff --git a/client/src/locales/ua/index.js b/client/src/locales/ua/index.js new file mode 100644 index 00000000..0190368d --- /dev/null +++ b/client/src/locales/ua/index.js @@ -0,0 +1,8 @@ +import login from './login'; + +export default { + language: 'ua', + country: 'ua', + name: 'Українська', + embeddedLocale: login, +}; diff --git a/client/src/locales/ua/login.js b/client/src/locales/ua/login.js new file mode 100644 index 00000000..74d24064 --- /dev/null +++ b/client/src/locales/ua/login.js @@ -0,0 +1,22 @@ +export default { + translation: { + common: { + emailOrUsername: "Електронна пошта або ім'я користувача", + invalidEmailOrUsername: "Неправильна електронна пошта або ім'я користувача", + invalidPassword: 'Неправильний пароль', + logInToPlanka: 'Увійти в Planka', + noInternetConnection: 'Відсутнє підключення до Інтернету', + pageNotFound_title: 'Сторінку не знайдено', + password: 'Пароль', + projectManagement: 'Управління проектами', + serverConnectionFailed: 'Не вдалося підключитися до сервера', + unknownError: 'Невідома помилка, спробуйте ще раз пізніше', + useSingleSignOn: 'Використовувати одночасний вхід', + }, + + action: { + logIn: 'Увійти', + logInWithSSO: 'Увійти за допомогою SSO', + }, + }, +}; From 389648b546393ea6359f44f98f789debc490ee48 Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Wed, 20 Dec 2023 12:58:43 +0100 Subject: [PATCH 4/8] fix: Add missing date formats to Ukrainian translation --- client/src/locales/ua/core.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/locales/ua/core.js b/client/src/locales/ua/core.js index 5af394ea..d1860325 100644 --- a/client/src/locales/ua/core.js +++ b/client/src/locales/ua/core.js @@ -5,6 +5,8 @@ export default { dateTime: '$t(format:date) $t(format:time)', longDate: 'd MMMM', longDateTime: "d MMMM 'о' p", + fullDate: 'd MMMM y', + fullDateTime: "d MMMM y 'о' p", }, translation: { From b2e0c45539227ee3b565dff261d8283dfc0fbca0 Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Wed, 20 Dec 2023 13:49:07 +0100 Subject: [PATCH 5/8] chore: Update version --- charts/planka/Chart.yaml | 4 ++-- client/.env | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/planka/Chart.yaml b/charts/planka/Chart.yaml index 89165663..a24cdaec 100644 --- a/charts/planka/Chart.yaml +++ b/charts/planka/Chart.yaml @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.13 +version: 0.1.14 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.15.2" +appVersion: "1.15.3" dependencies: - alias: postgresql diff --git a/client/.env b/client/.env index daf9e343..b798cdc0 100644 --- a/client/.env +++ b/client/.env @@ -1 +1 @@ -REACT_APP_VERSION=1.15.2 +REACT_APP_VERSION=1.15.3 diff --git a/package-lock.json b/package-lock.json index 9cb39bc3..10785613 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "planka", - "version": "1.15.2", + "version": "1.15.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "planka", - "version": "1.15.2", + "version": "1.15.3", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { diff --git a/package.json b/package.json index 9616e440..f39e497b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "planka", - "version": "1.15.2", + "version": "1.15.3", "private": true, "homepage": "https://plankanban.github.io/planka", "repository": { From ede56e1ae3cdb1bcfcad6fe9f38a5f060610cacb Mon Sep 17 00:00:00 2001 From: Daniel Hiller Date: Wed, 20 Dec 2023 20:18:42 +0100 Subject: [PATCH 6/8] ci: Switch to matrix workflow --- .../build-and-push-docker-image-dev.yml | 89 +++++++++++++++---- temp | 1 + 2 files changed, 75 insertions(+), 15 deletions(-) create mode 100644 temp diff --git a/.github/workflows/build-and-push-docker-image-dev.yml b/.github/workflows/build-and-push-docker-image-dev.yml index a06cda23..a7a308f2 100644 --- a/.github/workflows/build-and-push-docker-image-dev.yml +++ b/.github/workflows/build-and-push-docker-image-dev.yml @@ -1,3 +1,4 @@ +# https://docs.docker.com/build/ci/github-actions/multi-platform/ name: Build and push Docker DEV image on: @@ -9,31 +10,89 @@ on: - '*.md' branches: [master] +env: + REGISTRY_IMAGE: ghcr.io/plankanban/planka + jobs: - build-and-push-docker-image-dev: - runs-on: self-hosted + build: + strategy: + fail-fast: false + matrix: + include: + - os: [self-hosted, x64] + platform: linux/amd64 + - os: [self-hosted, arm64] + platform: linux/arm64 + - os: [self-hosted, arm64] + platform: linux/arm/v7 + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v4 - + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY_IMAGE }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v4 + - name: Build and push by digest + id: build + uses: docker/build-push-action@v5 with: context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - tags: | - ghcr.io/plankanban/planka:dev + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v3 + with: + name: digests + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: [self-hosted] + needs: + - build + steps: + - name: Download digests + uses: actions/download-artifact@v3 + with: + name: digests + path: /tmp/digests + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY_IMAGE }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:dev diff --git a/temp b/temp new file mode 100644 index 00000000..e477f7db --- /dev/null +++ b/temp @@ -0,0 +1 @@ +Just a file to trigger the build workflow From 1e011481381b7b9ea8595c7743748bdb6951efe4 Mon Sep 17 00:00:00 2001 From: Daniel Hiller Date: Wed, 20 Dec 2023 23:50:51 +0100 Subject: [PATCH 7/8] ci: Add retry on failure --- .github/workflows/build-and-push-docker-image-dev.yml | 11 ++++++++++- temp | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-push-docker-image-dev.yml b/.github/workflows/build-and-push-docker-image-dev.yml index a7a308f2..7b591f21 100644 --- a/.github/workflows/build-and-push-docker-image-dev.yml +++ b/.github/workflows/build-and-push-docker-image-dev.yml @@ -95,4 +95,13 @@ jobs: $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) - name: Inspect image run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:dev + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} + rerun-failed-jobs: + runs-on: [self-hosted] + needs: [ build, merge] + if: failure() + steps: + - name: Rerun failed jobs in the current workflow + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh run rerun ${{ github.run_id }} --failed diff --git a/temp b/temp index e477f7db..a1c2b7dd 100644 --- a/temp +++ b/temp @@ -1 +1 @@ -Just a file to trigger the build workflow +Just a file to trigger the build workflow. From 616304a1fafa23dfac6bd2d7cccd8e02e96f8a11 Mon Sep 17 00:00:00 2001 From: Daniel Hiller Date: Thu, 21 Dec 2023 00:51:17 +0100 Subject: [PATCH 8/8] Update branch --- docker-compose-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 4ecc205a..4f867d6f 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: '3' services: planka: - image: ghcr.io/plankanban/planka:dev + image: ghcr.io/plankanban/planka:master command: > bash -c "for i in `seq 1 30`; do