From 8be30a734d5aa37a0e10ae249108dc197daf0a7e Mon Sep 17 00:00:00 2001 From: Karol Lassak Date: Fri, 31 Mar 2023 12:09:17 +0200 Subject: [PATCH 1/5] feat(i18n): add support for Polish language (#102) * feat(i18n): add support for Polish language --- package-lock.json | 4 ++-- package.json | 2 +- src/commands/githook.ts | 9 ++++++--- src/i18n/index.ts | 10 +++++++--- src/i18n/pl.json | 6 ++++++ 5 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 src/i18n/pl.json diff --git a/package-lock.json b/package-lock.json index 628a5b0..c87ad0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "opencommit", - "version": "1.1.34", + "version": "1.1.36", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "opencommit", - "version": "1.1.34", + "version": "1.1.36", "license": "MIT", "dependencies": { "@clack/prompts": "^0.6.1", diff --git a/package.json b/package.json index ea4727e..ddc9cb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opencommit", - "version": "1.1.34", + "version": "1.1.36", "description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫", "keywords": [ "git", diff --git a/src/commands/githook.ts b/src/commands/githook.ts index ee3aec6..152d6c6 100755 --- a/src/commands/githook.ts +++ b/src/commands/githook.ts @@ -11,13 +11,16 @@ const platform = process.platform; let separator = ''; switch (platform) { - case 'win32': // Windows + // Windows + case 'win32': separator = path.sep; break; - case 'darwin': // macOS + // macOS + case 'darwin': separator = ''; break; - case 'linux': // Linux + // Linux + case 'linux': separator = ''; break; default: diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 96dbcfa..128f3cf 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -13,6 +13,7 @@ import sv from '../i18n/sv.json' assert { type: 'json' }; import nl from '../i18n/nl.json' assert { type: 'json' }; import ru from '../i18n/ru.json' assert { type: 'json' }; import id_ID from '../i18n/id_ID.json' assert { type: 'json' }; +import pl from '../i18n/pl.json' assert { type: 'json' }; export enum I18nLocals { 'en' = 'en', @@ -28,7 +29,8 @@ export enum I18nLocals { 'es_ES' = 'es_ES', 'sv' = 'sv', 'ru' = 'ru', - 'id_ID' = 'id_ID' + 'id_ID' = 'id_ID', + 'pl' = 'pl', } export const i18n = { @@ -46,7 +48,8 @@ export const i18n = { sv, id_ID, nl, - ru + ru, + pl, }; export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = { @@ -64,7 +67,8 @@ export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = { es_ES: ['es_ES', 'Spanish', 'español'], sv: ['sv', 'Swedish', 'Svenska'], ru: ['ru', 'Russian', 'русский'], - id_ID: ['id_ID', 'Bahasa', 'bahasa'] + id_ID: ['id_ID', 'Bahasa', 'bahasa'], + pl: ['pl', 'Polish', 'Polski'], }; export function getI18nLocal(value: string): string | boolean { diff --git a/src/i18n/pl.json b/src/i18n/pl.json new file mode 100644 index 0000000..d3c2bbb --- /dev/null +++ b/src/i18n/pl.json @@ -0,0 +1,6 @@ +{ + "localLanguage": "polski", + "commitFix": "fix(server.ts): poprawa wielkości zmiennej port na pisane z dużymi literami PORT", + "commitFeat": "feat(server.ts): dodanie obsługi zmiennej środowiskowej process.env.PORT", + "commitDescription": "Zmienna port jest teraz nazwana PORT, co jest zgodne z konwencją nazewniczą ponieważ PORT jest stałą. Obsługa zmiennej środowiskowej process.env.PORT pozwala łatwiej zarządzać ustawieniami przy starcie." +} From acf3e450aeb784c7a048eb214ecd89cd8ed20760 Mon Sep 17 00:00:00 2001 From: Manato Date: Fri, 31 Mar 2023 19:11:06 +0900 Subject: [PATCH 2/5] chore(i18n): update Japanese translation for commit messages (#98) Updated the Japanese translation for commit messages to reflect the changes made in the previous commit. The commitFix message now correctly states that the port variable was changed from lowercase 'port' to uppercase 'PORT'. The commitFeat message now correctly states that support for the 'process.env.PORT' environment variable was added. The commitDescription message explains that the use of the constant 'PORT' for the port variable provides consistency in naming conventions, and that the support for the 'process.env.PORT' environment variable allows the application to be more flexible and run on any available port specified by the environment variable. --- src/i18n/ja.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/i18n/ja.json b/src/i18n/ja.json index 9d529be..6845b68 100644 --- a/src/i18n/ja.json +++ b/src/i18n/ja.json @@ -1,6 +1,6 @@ { - "localLanguage": "にほんご", - "commitFix": "修正(server.ts): ポート変数のケースを小文字のポートから大文字のPORTに変更", - "commitFeat": "新機能(server.ts): process.env.PORT環境変数のサポートを追加する", - "commitDescription": "ポート変数は現在PORTという名前になっており、PORTは定数であるため命名規則に一貫性があります。環境変数のサポートにより、アプリケーションはより柔軟になり、process.env.PORT環境変数で指定された任意の利用可能なポートで実行できるようになりまし" + "localLanguage": "日本語", + "commitFix": "修正(server.ts): ポート変数を小文字のportから大文字のPORTに変更", + "commitFeat": "新機能(server.ts): 環境変数process.env.PORTのサポートを追加", + "commitDescription": "ポート変数は現在PORTという名前になり、定数であるPORTを使うことで命名規則に一貫性が生まれました。環境変数をサポートすることで、環境変数process.env.PORTで指定された任意の利用可能なポートで実行できるようになり、アプリケーションはより柔軟になりました。" } From 686f876cb0a07d16ccab66d5dca1f37e2c307e55 Mon Sep 17 00:00:00 2001 From: zankyr Date: Fri, 31 Mar 2023 12:11:39 +0200 Subject: [PATCH 3/5] [STYLE] Update commit messages using proper Italian language (#96) * style(it.json): update commit message language to use proper Italian grammar and spelling --- src/i18n/it.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/it.json b/src/i18n/it.json index 8994073..c9eaa05 100644 --- a/src/i18n/it.json +++ b/src/i18n/it.json @@ -1,6 +1,6 @@ { "localLanguage": "italiano", - "commitFix": "fix(server.ts): cambia il caso della variabile di porta da minuscolo port a maiuscolo PORT", - "commitFeat": "funzionalità(server.ts): aggiungi supporto per la variabile di ambiente process.env.PORT", - "commitDescription": "La variabile di porta è ora chiamata PORT, il che migliora la coerenza con le convenzioni di denominazione in quanto PORT è una costante. Il supporto per una variabile di ambiente consente all'applicazione di essere più flessibile poiché ora può essere eseguita su qualsiasi porta disponibile specificata tramite la variabile di ambiente process.env.PORT." + "commitFix": "fix(server.ts): cambia la grafia della variabile della porta dal minuscolo port al maiuscolo PORT", + "commitFeat": "feat(server.ts): aggiunge il supporto per la variabile di ambiente process.env.PORT", + "commitDescription": "La variabile port è ora chiamata PORT, migliorando la coerenza con le convenzioni di denominazione in quanto PORT è una costante. Il supporto per una variabile di ambiente consente all'applicazione di essere più flessibile poiché ora può essere eseguita su qualsiasi porta disponibile specificata tramite la variabile di ambiente process.env.PORT." } From 0d559d4499f53da2a6e7cca34dc93ac6710e7fe8 Mon Sep 17 00:00:00 2001 From: Matt <44251435+matt-degraffenreid@users.noreply.github.com> Date: Fri, 31 Mar 2023 04:12:43 -0600 Subject: [PATCH 4/5] Issue templates (#78) * Create bug.yaml * adding issue templates * Create featureRequest.yaml --- .github/ISSUE_TEMPLATE/bug.yaml | 91 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/featureRequest.yaml | 48 ++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.yaml create mode 100644 .github/ISSUE_TEMPLATE/featureRequest.yaml diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 0000000..0ddd69b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -0,0 +1,91 @@ +name: 🐞 Bug Report +description: File a bug report +title: "[Bug]: " +labels: ["bug", "triage"] +assignees: + - octocat +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: input + id: opencommit-version + attributes: + label: Opencommit Version + description: What version of our software are you running? + placeholder: ex. 1.1.22 + validations: + required: true + - type: input + id: node-version + attributes: + label: Node Version + description: What version of node are you running? + placeholder: ex. 19.8.1 + validations: + required: true + - type: input + id: npm-version + attributes: + label: NPM Version + description: What version of npm are you running? + placeholder: ex. 9.6.2 + validations: + required: true + - type: dropdown + id: OS + attributes: + label: What OS are you seeing the problem on? + multiple: true + options: + - Mac + - Windows + - Other Linux Distro + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you expected to happen! + validations: + required: true + - type: textarea + id: current-behavior + attributes: + label: Current Behavior + description: Also tell us, what is currently happening? + placeholder: Tell us what is happening now. + validations: + required: true + - type: textarea + id: possible-solution + attributes: + label: Possible Solution + description: Do you have a solution for the issue? + placeholder: Tell us what the solution could look like. + validations: + required: false + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to Reproduce + description: Tell us how to reproduce the issue? + placeholder: Tell us how to reproduce the issue? + validations: + required: false + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/featureRequest.yaml b/.github/ISSUE_TEMPLATE/featureRequest.yaml new file mode 100644 index 0000000..e4f930d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/featureRequest.yaml @@ -0,0 +1,48 @@ +--- +name: 🛠️ Feature Request +description: Suggest an idea to help us improve Opencommit +title: "[Feature]: " +labels: + - "feature_request" + +body: + - type: markdown + attributes: + value: | + **Thanks :heart: for taking the time to fill out this feature request report!** + We kindly ask that you search to see if an issue [already exists](https://github.com/di-sukharev/opencommit/issues?q=is%3Aissue+sort%3Acreated-desc+) for your feature. + + We are also happy to accept contributions from our users. For more details see [here](https://github.com/di-sukharev/opencommit/blob/master/.github/CONTRIBUTING.md). + + - type: textarea + attributes: + label: Description + description: | + A clear and concise description of the feature you're interested in. + validations: + required: true + + - type: textarea + attributes: + label: Suggested Solution + description: | + Describe the solution you'd like. A clear and concise description of what you want to happen. + validations: + required: true + + - type: textarea + attributes: + label: Alternatives + description: | + Describe alternatives you've considered. + A clear and concise description of any alternative solutions or features you've considered. + validations: + required: false + + - type: textarea + attributes: + label: Additional Context + description: | + Add any other context about the problem here. + validations: + required: false \ No newline at end of file From 6ba0f97163be3bd08178ddae2f49b096566e6712 Mon Sep 17 00:00:00 2001 From: Erick Amorim <73451993+ericklima-ca@users.noreply.github.com> Date: Sat, 1 Apr 2023 01:18:52 -0400 Subject: [PATCH 5/5] Add support for the Android platform (#105) --- src/commands/githook.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/githook.ts b/src/commands/githook.ts index 152d6c6..604255a 100755 --- a/src/commands/githook.ts +++ b/src/commands/githook.ts @@ -19,7 +19,8 @@ switch (platform) { case 'darwin': separator = ''; break; - // Linux + // Linux and Android + case 'android': case 'linux': separator = ''; break;