diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..b7fdd4b --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,43 @@ +## Tiny RDM Contribute Guide + +### Multi-language Contributions {#language} + +#### Adding New Language + +1. New file: Add a new JSON file in the [frontend/src/langs](../frontend/src/langs/), with the file naming format is " + {language}-{region}.json", e.g. English is "en-us.json", simplified Chinese is "zh-cn.json". Highly recommended to duplicate the [en-us.json](../frontend/src/langs/en-us.json) file and rename it. +2. Fill content: Refer to [en-us.json](../frontend/src/langs/en-us.json), or duplicate the file and modify the language content. +3. Update codes: Edit[frontend/src/langs/index.js](.../frontend/src/langs/index.js), import the new language data inside. + ```javascript + import en from './en-us' + // import your new localize file 'zh-cn' here + import zh from './zh-cn' + + export const lang = { + en, + // export new language data 'zh' here + zh, + } + ``` +4. Submit review once there are no issues with the translation context in the application. (learn how to submit) + +### Code Submission`(To be completed)` {#pull_request} + +#### Pull Request Title +The format of PR's title like ": " +- type: PR type +- description: PR description + +PR type list below: + +| type | description | +|----------|----------------------------------------------------| +| revert | Revert a commit | +| feat | New features | +| perf | Performance improvements | +| fix | Fix any bugs | +| style | Style updates | +| docs | Document updates | +| refactor | Code refactors | +| chore | Some chores | +| ci | Automation process configuration or script updates | diff --git a/.github/CONTRIBUTING_zh.md b/.github/CONTRIBUTING_zh.md new file mode 100644 index 0000000..a968f0b --- /dev/null +++ b/.github/CONTRIBUTING_zh.md @@ -0,0 +1,42 @@ +## Tiny RDM 代码贡献指南 + +### 多国语言贡献 {#language} + +#### 增加新的语言 +1. 创建文件:在[frontend/src/langs](../frontend/src/langs/)目录下新增语言配置JSON文件,文件名格式为“{语言}-{地区}.json”,如英文为“en-us.json”,简体中文为“zh-cn.json”,建议直接复制[en-us.json](../frontend/src/langs/en-us.json)文件进行改名。 +2. 填充内容:参考[en-us.json](../frontend/src/langs/en-us.json),或者直接克隆一份文件,对语言部分内容进行修改。 +3. 代码修改:在[frontend/src/langs/index.js](.../frontend/src/langs/index.js)文件内导入新增的语言数据 + ```javascript + import en from './en-us' + // import your new localize file 'zh-cn' here + import zh from './zh-cn' + + export const lang = { + en, + // export new language data 'zh' here + zh, + } + ``` +4. 检查应用中对应翻译语境无问题后,可提交审核([查看如何提交](#pull_request)) + +### 代码提交`(待完善)` {#pull_request} + +#### PR提交规范 +PR提交格式为“: ” +- type: 提交类型 +- description: 提交内容描述 + +其中提交类型如下: + +| 提交类型 | 类型描述 | +|----------|--------------| +| revert | 回退某个commit提交 | +| feat | 新功能/新特性 | +| perf | 功能、体验等方面的优化 | +| fix | 修复问题 | +| style | 样式相关修改 | +| docs | 文档更新 | +| refactor | 代码重构 | +| chore | 杂项修改 | +| ci | 自动化流程配置或脚本修改 | + diff --git a/.github/ISSUE_TEMPLATE/but_report.md b/.github/ISSUE_TEMPLATE/but_report.md new file mode 100644 index 0000000..e294807 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/but_report.md @@ -0,0 +1,21 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '[BUG]' +labels: '' +assignees: '' +--- + +**Tiny RDM Version** +What version of Tiny RDM are you using? + +**OS Version** +Which OS and version you launch? (Mac/Windows/Linux) + +**Describe the bug** +A clear and concise description of what the bug is. + +Steps to Reproduce: + +1. +2. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bc46938 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,5 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '[FEATURE]' +---