From 615b22c9e1001789718704d50790398e60ffa7f2 Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Thu, 30 Jul 2026 17:40:50 +0300 Subject: [PATCH 1/2] chore: refine issue templates --- .github/ISSUE_TEMPLATE/01_bug_report.yml | 64 +++++++++++++------ .github/ISSUE_TEMPLATE/02_feature_request.yml | 4 +- .github/ISSUE_TEMPLATE/03_documentation.yml | 46 +++++++++++++ 3 files changed, 92 insertions(+), 22 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/03_documentation.yml diff --git a/.github/ISSUE_TEMPLATE/01_bug_report.yml b/.github/ISSUE_TEMPLATE/01_bug_report.yml index 3ee431efc..b40775074 100644 --- a/.github/ISSUE_TEMPLATE/01_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/01_bug_report.yml @@ -9,32 +9,47 @@ body: Thanks for reporting a bug! Please note: - For general usage questions, consider asking on [GitHub discussions](https://github.com/lingui/js-lingui/discussions). - Bug reports without reproduction steps may be closed. - - type: textarea - attributes: - label: Description - description: A clear description of the bug. - validations: - required: true - type: checkboxes attributes: label: Verifications options: - - label: I've checked [the docs](https://lingui.dev) and this isn't covered there. + - label: I've searched [existing issues](https://github.com/lingui/js-lingui/issues) and this hasn't been reported yet. required: true - - label: I've searched existing issues on [GitHub](https://github.com/lingui/js-lingui/issues). + - label: I've checked [the docs](https://lingui.dev) and this isn't expected behavior. + required: true + - label: I'm using the latest version of Lingui, and the problem still occurs. required: true + - type: textarea + attributes: + label: Description + description: A clear description of the bug, including what actually happens. + validations: + required: true + - type: input + attributes: + label: Reproduction Link + description: | + Optional, but strongly encouraged: a link to a minimal reproduction - a GitHub repository, + a StackBlitz, or a CodeSandbox. Issues with a runnable reproduction are much easier to + confirm and usually get fixed first. + placeholder: https://github.com/your-name/lingui-bug-repro - type: textarea attributes: label: Reproduction Steps - description: Steps to reproduce with minimal code sample. - value: | + description: Steps to reproduce, with a minimal code sample. + placeholder: | + 1. Wrap the string in ``: + ```tsx import { Trans } from "@lingui/react/macro" - + export default function App() { - return This should be translated! + return This should be translated! } ``` + + 2. Run `lingui extract`. + 3. Observe that ... validations: required: true - type: textarea @@ -46,23 +61,34 @@ body: - type: dropdown attributes: label: Macro Support - description: What macro are you using? + description: How are Lingui macros transformed in your project? options: + - Babel with @lingui/babel-plugin-lingui-macro - SWC with @lingui/swc-plugin - - Babel with babel-macro-plugin - - Not using macro + - Babel with babel-plugin-macros (deprecated as of v6) + - Not using macros + - I'm not sure validations: required: true - type: input attributes: label: Lingui Version - description: Output of `lingui --version` + description: E.g. `6.6.0`. Run `lingui --version`, or check the `@lingui/*` versions in your `package.json`. validations: required: true - - type: input + - type: textarea attributes: - label: Babel Version - description: Output of `npm list @babel/core` + label: Environment + description: | + Paste the output of the command below. It captures your OS, Node version and the relevant package + versions - mismatched `@lingui/*` versions are a common cause of unexpected behavior. + + ```sh + npx envinfo --system --binaries --npmPackages '{@lingui/*,@babel/core,@swc/core,vite,next,typescript}' + ``` + render: shell + validations: + required: true - type: input attributes: label: Framework diff --git a/.github/ISSUE_TEMPLATE/02_feature_request.yml b/.github/ISSUE_TEMPLATE/02_feature_request.yml index 520214a78..94e15365f 100644 --- a/.github/ISSUE_TEMPLATE/02_feature_request.yml +++ b/.github/ISSUE_TEMPLATE/02_feature_request.yml @@ -24,9 +24,7 @@ body: - type: textarea attributes: label: Alternatives Considered - description: What alternative solutions have you considered? - validations: - required: true + description: What alternative solutions or workarounds have you considered? - type: textarea attributes: label: Additional Context diff --git a/.github/ISSUE_TEMPLATE/03_documentation.yml b/.github/ISSUE_TEMPLATE/03_documentation.yml new file mode 100644 index 000000000..0af7f3e7c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/03_documentation.yml @@ -0,0 +1,46 @@ +name: Documentation issue +description: Report something missing, unclear, or incorrect in the docs +labels: + - documentation +body: + - type: markdown + attributes: + value: | + Thanks for helping improve the [Lingui documentation](https://lingui.dev)! Please note: + - For bugs in Lingui itself, use the bug report template instead. + - For usage questions, consider asking on [GitHub discussions](https://github.com/lingui/js-lingui/discussions) or [Discord](https://discord.gg/hdNuF3rupQ). + - Small fixes such as typos are very welcome as a direct pull request - the docs live in [`website/docs`](https://github.com/lingui/js-lingui/tree/main/website/docs). + - type: input + attributes: + label: Page + description: Link to the affected page, or the path in `website/docs` if the content doesn't exist yet. + placeholder: https://lingui.dev/installation + validations: + required: true + - type: dropdown + attributes: + label: Type of Issue + options: + - Incorrect or outdated information + - Missing information + - Confusing or hard to follow + - Broken example or code sample + - Broken link or rendering problem + - Other + validations: + required: true + - type: textarea + attributes: + label: Description + description: What is wrong or missing? Quote the relevant part of the page where it helps. + validations: + required: true + - type: textarea + attributes: + label: Suggested Improvement + description: How would you word or structure it instead? + - type: checkboxes + attributes: + label: Contribution + options: + - label: I'd be willing to open a pull request for this. From 0db950c994c6b912edd546262efc435841ff458f Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Fri, 31 Jul 2026 10:04:43 +0300 Subject: [PATCH 2/2] improvements --- .github/ISSUE_TEMPLATE/01_bug_report.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01_bug_report.yml b/.github/ISSUE_TEMPLATE/01_bug_report.yml index b40775074..7ccbc61e4 100644 --- a/.github/ISSUE_TEMPLATE/01_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/01_bug_report.yml @@ -76,20 +76,17 @@ body: description: E.g. `6.6.0`. Run `lingui --version`, or check the `@lingui/*` versions in your `package.json`. validations: required: true - - type: textarea + - type: input attributes: - label: Environment + label: Babel / SWC Version description: | - Paste the output of the command below. It captures your OS, Node version and the relevant package - versions - mismatched `@lingui/*` versions are a common cause of unexpected behavior. - - ```sh - npx envinfo --system --binaries --npmPackages '{@lingui/*,@babel/core,@swc/core,vite,next,typescript}' - ``` - render: shell - validations: - required: true + Resolved version, from `npm ls @babel/core` or `npm ls @swc/core`. It is often an indirect + dependency (Next.js bundles its own SWC), so it may not be listed in your `package.json`. + - type: input + attributes: + label: Node Version + description: Output of `node --version` - type: input attributes: label: Framework - description: E.g. Next.js, Vite + description: E.g. Next.js 15, Vite 8