Skip to content

Commit

Permalink
chore: add issue and pull-request templates
Browse files Browse the repository at this point in the history
extend contributing guidelines

closes #41
  • Loading branch information
simonwep committed May 15, 2024
1 parent e99e8f1 commit ad90874
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ In this project we have the following scopes / types:
* `fix` - A bug fix.
* `docs` - Documentation only.
* `improve` - Nothing changed, only improved (such as performance improvements).


## Adding support for a new language

To add support for a new language, you need to do the following:

1. Add a new file under `src/i18n/locales` with the language code as the filename (e.g. `en.json`).
2. Import the file from step 1. in `src/i18n/index.ts` and add it to `messages`.
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Bug Report
description: Report a bug in Ocular
body:
- type: checkboxes
attributes:
label: I've found a bug and checked that ...
description: Make sure that your request fulfills all of the following requirements. If one requirement cannot be satisfied, explain in detail why.
options:
- label: ...there are no open or closed issues that are related to my problem
- label: ...it's definitely a bug and not a feature request

- type: textarea
attributes:
label: Description
description: Please provide a brief description of the bug in 1-2 sentences.
validations:
required: true

- type: textarea
attributes:
label: Environment
description: Please provide information about your environment.
placeholder: |
- Browser: [e.g. Chrome, Safari]
- OS: [e.g. Windows, macOS]
- Version: [e.g. 22]
- Ocular version: [e.g. 1.4]
validations:
required: true

- type: textarea
attributes:
label: Expected behaviour
description: Please describe precisely what you'd expect to happen. Be specific.
validations:
required: false

- type: textarea
attributes:
label: Steps to reproduce
description: Please describe the steps to reproduce the bug.
placeholder: |
1. ...
2. ...
3. ...
validations:
required: false

- type: textarea
attributes:
label: Additional info
description: Please provide any additional information that seem useful.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/simonwep/ocular/discussions
about: Please ask and answer questions here.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Feature Request
description: Request a feature or enhancement in Ocular
body:
- type: checkboxes
attributes:
label: Support guidelines
description: Please make sure that your request fulfills all of the following requirements. If you still want to proceed, explain in detail why.
options:
- label: My request extends the functionality of Ocular in a meaningful way.
required: true
- label: I've used [the search](https://github.com/firefly-iii/firefly-iii/issues?q=is%3Aissue) and this has not been requested before.
required: true

- type: textarea
attributes:
label: Description
description: Please describe your feature request
placeholder: |
- I would like Ocular to do (thing).
- What if you would add feature (feature here)?
- Ocular doesn't do (thing).
validations:
required: true

- type: textarea
attributes:
label: Solution
description: Describe what your feature would add to Ocular.
validations:
required: true

- type: textarea
attributes:
label: What are alternatives?
description: Please describe what alternatives currently exist.

- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Summary
<!-- Provide a general summary of your changes in the Title above -->


## I made sure that:
<!-- Check the following items -->

- [ ] I have read the [contributing guidelines](./CONTRIBUTING.md).
- [ ] I have searched for a similar pull request.
- [ ] The feature/bug-fix is tested carefully.
- [ ] All irrelevant commits are squashed. (e.g. no `chore: fix eslint` commits).

2 changes: 1 addition & 1 deletion src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type MessageSchema = typeof en;
const browserLocale = navigator.language.slice(0, 2).toLowerCase();
const messages: Record<string, MessageSchema> = { en, de } as const;

export const availableLocales = ['en', 'de'];
export const availableLocales = Object.keys(messages);
export const initialLocale = availableLocales.includes(browserLocale) ? browserLocale : 'en';

export type AvailableLocale = keyof typeof messages;
Expand Down

0 comments on commit ad90874

Please sign in to comment.