diff options
-rw-r--r-- | app/Locale/zh_CN/translations.php | 222 | ||||
-rw-r--r-- | docs/api-json-rpc.markdown | 270 | ||||
-rw-r--r-- | jsonrpc.php | 12 |
3 files changed, 393 insertions, 111 deletions
diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index cd1e2ebe..2bb16fee 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -379,7 +379,7 @@ return array( 'Created by %s' => '创建者:%s', 'Last modified on %B %e, %Y at %k:%M %p' => '最后修改:%Y/%m/%d/ %H:%M', 'Tasks Export' => '任务导出', - 'Tasks exportation for "%s"' => '导出任务"%s"', + 'Tasks exportation for "%s"' => '导出"%s"的任务', 'Start Date' => '开始时间', 'End Date' => '结束时间', 'Execute' => '执行', @@ -408,13 +408,13 @@ return array( 'Comment updated' => '更新了评论', 'New comment posted by %s' => '%s 的新评论', 'List of due tasks for the project "%s"' => '项目"%s"的到期任务列表', - // 'New attachment' => '', - // 'New comment' => '', - // 'New subtask' => '', - // 'Subtask updated' => '', - // 'Task updated' => '', - // 'Task closed' => '', - // 'Task opened' => '', + 'New attachment' => '新建附件', + 'New comment' => '新建评论', + 'New subtask' => '新建子任务', + 'Subtask updated' => '子任务更新', + 'Task updated' => '任务更新', + 'Task closed' => '任务关闭', + 'Task opened' => '任务开启', '[%s][Due tasks]' => '[%s][到期任务]', '[Kanboard] Notification' => '[Kanboard] 通知', 'I want to receive notifications only for those projects:' => '我仅需要收到下面项目的通知:', @@ -498,9 +498,9 @@ return array( 'Task assignee change' => '任务分配变更', '%s change the assignee of the task #%d to %s' => '%s 将任务 #%d 分配给了 %s', '%s changed the assignee of the task %s to %s' => '%s 将任务 %s 分配给 %s', - // 'Column Change' => '', - // 'Position Change' => '', - // 'Assignee Change' => '', + 'Column Change' => '栏目变更', + 'Position Change' => '位置变更', + 'Assignee Change' => '负责人变更', 'New password for the user "%s"' => '用户"%s"的新密码', 'Choose an event' => '选择一个事件', 'Github commit received' => '收到了Github提交', @@ -607,8 +607,8 @@ return array( 'Default swimlane' => '默认泳道', 'Do you really want to remove this swimlane: "%s"?' => '确定要删除泳道:"%s"?', 'Inactive swimlanes' => '非活动泳道', - // 'Set project manager' => '', - // 'Set project member' => '', + 'Set project manager' => '设为项目经理', + 'Set project member' => '设为项目成员', 'Remove a swimlane' => '删除泳道', 'Rename' => '重命名', 'Show default swimlane' => '显示默认泳道', @@ -622,92 +622,92 @@ return array( 'Unable to remove this swimlane.' => '无法删除此泳道', 'Unable to update this swimlane.' => '无法更新此泳道', 'Your swimlane have been created successfully.' => '已经成功创建泳道。', - // 'Example: "Bug, Feature Request, Improvement"' => '', - // 'Default categories for new projects (Comma-separated)' => '', - // 'Gitlab commit received' => '', - // 'Gitlab issue opened' => '', - // 'Gitlab issue closed' => '', - // 'Gitlab webhooks' => '', - // 'Help on Gitlab webhooks' => '', - // 'Integrations' => '', - // 'Integration with third-party services' => '', - // 'Role for this project' => '', - // 'Project manager' => '', - // 'Project member' => '', - // 'A project manager can change the settings of the project and have more privileges than a standard user.' => '', - // 'Gitlab Issue' => '', - // 'Subtask Id' => '', - // 'Subtasks' => '', - // 'Subtasks Export' => '', - // 'Subtasks exportation for "%s"' => '', - // 'Task Title' => '', - // 'Untitled' => '', - // 'Application default' => '', - // 'Language:' => '', - // 'Timezone:' => '', - // 'All columns' => '', - // 'Calendar for "%s"' => '', - // 'Filter by column' => '', - // 'Filter by status' => '', - // 'Calendar' => '', - // 'Next' => '', - // '#%d' => '', - // 'Filter by color' => '', - // 'Filter by swimlane' => '', - // 'All swimlanes' => '', - // 'All colors' => '', - // 'All status' => '', - // 'Add a comment logging moving the task between columns' => '', - // 'Moved to column %s' => '', - // 'Change description' => '', - // 'User dashboard' => '', - // 'Allow only one subtask in progress at the same time for a user' => '', - // 'Edit column "%s"' => '', - // 'Enable time tracking for subtasks' => '', - // 'Select the new status of the subtask: "%s"' => '', - // 'Subtask timesheet' => '', - // 'There is nothing to show.' => '', - // 'Time Tracking' => '', - // 'You already have one subtask in progress' => '', - // 'Which parts of the project do you want to duplicate?' => '', - // 'Change dashboard view' => '', - // 'Show/hide activities' => '', - // 'Show/hide projects' => '', - // 'Show/hide subtasks' => '', - // 'Show/hide tasks' => '', - // 'Disable login form' => '', - // 'Show/hide calendar' => '', - // 'User calendar' => '', - // 'Bitbucket commit received' => '', - // 'Bitbucket webhooks' => '', - // 'Help on Bitbucket webhooks' => '', - // 'Start' => '', - // 'End' => '', - // 'Task age in days' => '', - // 'Days in this column' => '', - // '%dd' => '', - // 'Add a link' => '', - // 'Add a new link' => '', - // 'Do you really want to remove this link: "%s"?' => '', - // 'Do you really want to remove this link with task #%d?' => '', - // 'Field required' => '', - // 'Link added successfully.' => '', - // 'Link updated successfully.' => '', - // 'Link removed successfully.' => '', - // 'Link labels' => '', - // 'Link modification' => '', - // 'Links' => '', - // 'Link settings' => '', - // 'Opposite label' => '', - // 'Remove a link' => '', - // 'Task\'s links' => '', - // 'The labels must be different' => '', - // 'There is no link.' => '', - // 'This label must be unique' => '', - // 'Unable to create your link.' => '', - // 'Unable to update your link.' => '', - // 'Unable to remove this link.' => '', - // 'relates to' => '', + 'Example: "Bug, Feature Request, Improvement"' => '示例:“缺陷,功能需求,提升', + 'Default categories for new projects (Comma-separated)' => '新项目的默认分类(用逗号分隔)', + 'Gitlab commit received' => '收到 Gitlab 提交', + 'Gitlab issue opened' => '开启 Gitlab 问题', + 'Gitlab issue closed' => '关闭 Gitlab 问题', + 'Gitlab webhooks' => 'Gitlab 网络钩子', + 'Help on Gitlab webhooks' => 'Gitlab 网络钩子帮助', + 'Integrations' => '整合', + 'Integration with third-party services' => '与第三方服务进行整合', + 'Role for this project' => '项目角色', + 'Project manager' => '项目管理员', + 'Project member' => '项目成员', + 'A project manager can change the settings of the project and have more privileges than a standard user.' => '项目经理可以修改项目的设置,比标准用户多了一些权限', + 'Gitlab Issue' => 'Gitlab 问题', + 'Subtask Id' => '子任务 Id', + 'Subtasks' => '子任务', + 'Subtasks Export' => '子任务导出', + 'Subtasks exportation for "%s"' => '导出"%s"的子任务', + 'Task Title' => '任务标题', + 'Untitled' => '无标题', + 'Application default' => '程序默认', + 'Language:' => '语言:', + 'Timezone:' => '时区:', + 'All columns' => '全部栏目', + 'Calendar for "%s"' => '"%s"的日程表', + 'Filter by column' => '按栏目过滤', + 'Filter by status' => '按状态过滤', + 'Calendar' => '日程表', + 'Next' => '前进', + '#%d' => '#%d', + 'Filter by color' => '按颜色过滤', + 'Filter by swimlane' => '按泳道过滤', + 'All swimlanes' => '全部泳道', + 'All colors' => '全部颜色', + 'All status' => '全部状态', + 'Add a comment logging moving the task between columns' => '在不同栏目间移动任务时添加一个评论', + 'Moved to column %s' => '移动到栏目 %s', + 'Change description' => '修改描述', + 'User dashboard' => '用户仪表板', + 'Allow only one subtask in progress at the same time for a user' => '每用户同时仅有一个活动子任务', + 'Edit column "%s"' => '编辑栏目"%s"', + 'Enable time tracking for subtasks' => '启用子任务的时间记录', + 'Select the new status of the subtask: "%s"' => '选择子任务的新状态:"%s"', + 'Subtask timesheet' => '子任务时间', + 'There is nothing to show.' => '无内容。', + 'Time Tracking' => '时间记录', + 'You already have one subtask in progress' => '你已经有了一个进行中的子任务', + 'Which parts of the project do you want to duplicate?' => '要复制项目的哪些内容?', + 'Change dashboard view' => '修改仪表板视图', + 'Show/hide activities' => '显示/隐藏活动', + 'Show/hide projects' => '显示/隐藏项目', + 'Show/hide subtasks' => '显示/隐藏子任务', + 'Show/hide tasks' => '显示/隐藏任务', + 'Disable login form' => '禁用登录界面', + 'Show/hide calendar' => '显示/隐藏日程表', + 'User calendar' => '用户日程表', + 'Bitbucket commit received' => '收到Bitbucket提交', + 'Bitbucket webhooks' => 'Bitbucket网络钩子', + 'Help on Bitbucket webhooks' => 'Bitbucket网络钩子帮助', + 'Start' => '开始', + 'End' => '结束', + 'Task age in days' => '任务存在天数', + 'Days in this column' => '在此栏目的天数', + '%dd' => '%d天', + 'Add a link' => '添加一个关联', + 'Add a new link' => '添加一个新关联', + 'Do you really want to remove this link: "%s"?' => '确认要删除此关联吗:"%s"?', + 'Do you really want to remove this link with task #%d?' => '确认要删除到任务 #%d 的关联吗?', + 'Field required' => '必须的字段', + 'Link added successfully.' => '成功添加关联。', + 'Link updated successfully.' => '成功更新关联。', + 'Link removed successfully.' => '成功删除关联。', + 'Link labels' => '关联标签', + 'Link modification' => '关联修改', + 'Links' => '关联', + 'Link settings' => '关联设置', + 'Opposite label' => '反向标签', + 'Remove a link' => '删除关联', + 'Task\'s links' => '任务的关联', + 'The labels must be different' => '标签不能一样', + 'There is no link.' => '没有关联', + 'This label must be unique' => '关联必须唯一', + 'Unable to create your link.' => '无法创建关联。', + 'Unable to update your link.' => '无法更新关联。', + 'Unable to remove this link.' => '无法删除关联。', + 'relates to' => '关联到', // 'blocks' => '', // 'is blocked by' => '', // 'duplicates' => '', @@ -718,20 +718,20 @@ return array( // 'is a milestone of' => '', // 'fixes' => '', // 'is fixed by' => '', - // 'This task' => '', + 'This task' => '此任务', // '<1h' => '', // '%dh' => '', // '%b %e' => '', - // 'Expand tasks' => '', - // 'Collapse tasks' => '', - // 'Expand/collapse tasks' => '', - // 'Close dialog box' => '', - // 'Submit a form' => '', - // 'Board view' => '', - // 'Keyboard shortcuts' => '', - // 'Open board switcher' => '', - // 'Application' => '', - // 'Filter recently updated' => '', + 'Expand tasks' => '展开任务', + 'Collapse tasks' => '收缩任务', + 'Expand/collapse tasks' => '展开/收缩任务', + 'Close dialog box' => '关闭对话框', + 'Submit a form' => '提交表单', + 'Board view' => '面板视图', + 'Keyboard shortcuts' => '键盘快捷方式', + 'Open board switcher' => '打开面板切换器', + 'Application' => '应用程序', + 'Filter recently updated' => '过滤最近的更新', // 'since %B %e, %Y at %k:%M %p' => '', - // 'More filters' => '', + 'More filters' => '更多过滤', ); diff --git a/docs/api-json-rpc.markdown b/docs/api-json-rpc.markdown index 346b1dec..fcf1f989 100644 --- a/docs/api-json-rpc.markdown +++ b/docs/api-json-rpc.markdown @@ -973,6 +973,276 @@ Response example: } ``` +### getSwimlanes + +- Purpose: **Get the list of enabled swimlanes of a project** +- Parameters: + - **project_id** (integer, required) +- Result on success: **swimlane properties** +- Result on failure: **null** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "getSwimlanes", + "id": 1242049935, + "params": [ + 2 + ] +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 1242049935, + "result": [ + { + "id": "0", + "name": "Default" + }, + { + "id": "2", + "name": "Version 7.0" + }, + ] +} +``` + +### moveSwimlaneUp + +- Purpose: **Move up the swimlane position** +- Parameters: + - **project_id** (integer, required) + - **swimlane_id** (integer, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "moveSwimlaneUp", + "id": 99275573, + "params": [ + 1, + 2 + ] +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 99275573, + "result": true +} +``` + +### moveSwimlaneDown + +- Purpose: **Move down the swimlane position** +- Parameters: + - **project_id** (integer, required) + - **swimlane_id** (integer, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "moveSwimlaneDown", + "id": 957090649, + "params": { + "project_id": 1, + "swimlane_id": 2 + } +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 957090649, + "result": true +} +``` + +### updateSwimlane + +- Purpose: **Update swimlane properties** +- Parameters: + - **swimlane_id** (integer, required) + - **name** (string, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "updateSwimlane", + "id": 480740641, + "params": [ + 2, + "Version 4.1" + ] +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 480740641, + "result": true +} +``` + +### addSwimlane + +- Purpose: **Add a new swimlane** +- Parameters: + - **project_id** (integer, required) + - **name** (string, required) +- Result on success: **swimlane_id** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "addSwimlane", + "id": 638544704, + "params": [ + 1, + "Version 1.0" + ] +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 638544704, + "result": 5 +} +``` + +### removeSwimlane + +- Purpose: **Remove a swimlane** +- Parameters: + - **project_id** (integer, required) + - **swimlane_id** (integer, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "removeSwimlane", + "id": 1433237746, + "params": [ + 2, + 1 + ] +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 1433237746, + "result": true +} +``` + +### disableSwimlane + +- Purpose: **Enable a swimlane** +- Parameters: + - **project_id** (integer, required) + - **swimlane_id** (integer, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "disableSwimlane", + "id": 1433237746, + "params": [ + 2, + 1 + ] +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 1433237746, + "result": true +} +``` + +### enableSwimlane + +- Purpose: **Enable a swimlane** +- Parameters: + - **project_id** (integer, required) + - **swimlane_id** (integer, required) +- Result on success: **true** +- Result on failure: **false** + +Request example: + +```json +{ + "jsonrpc": "2.0", + "method": "enableSwimlane", + "id": 1433237746, + "params": [ + 2, + 1 + ] +} +``` + +Response example: + +```json +{ + "jsonrpc": "2.0", + "id": 1433237746, + "result": true +} +``` ### createTask diff --git a/jsonrpc.php b/jsonrpc.php index 566976cd..1fd60550 100644 --- a/jsonrpc.php +++ b/jsonrpc.php @@ -61,6 +61,18 @@ $server->bind('addColumn', $container['board'], 'addColumn'); $server->bind('removeColumn', $container['board'], 'removeColumn'); /** + * Swimlane procedures + */ +$server->bind('getSwimlanes', $container['swimlane'], 'getSwimlanes'); +$server->bind('addSwimlane', $container['swimlane'], 'create'); +$server->bind('updateSwimlane', $container['swimlane'], 'rename'); +$server->bind('removeSwimlane', $container['swimlane'], 'remove'); +$server->bind('disableSwimlane', $container['swimlane'], 'disable'); +$server->bind('enableSwimlane', $container['swimlane'], 'enable'); +$server->bind('moveSwimlaneUp', $container['swimlane'], 'moveUp'); +$server->bind('moveSwimlaneDown', $container['swimlane'], 'moveDown'); + +/** * Project permissions procedures */ $server->bind('getMembers', $container['projectPermission'], 'getMembers'); |