From 7d1647dfe9385943f972db1107abd67e39db563b Mon Sep 17 00:00:00 2001 From: Borisov Stepan Date: Sat, 5 Jun 2021 12:25:33 +0300 Subject: [PATCH 01/32] Minor changes --- src/main/java/translators/Languages.java | 29 ++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/main/java/translators/Languages.java b/src/main/java/translators/Languages.java index 3eaf194..6ec8558 100644 --- a/src/main/java/translators/Languages.java +++ b/src/main/java/translators/Languages.java @@ -11,8 +11,33 @@ public enum Languages { Chinese ("zh"), Czech ("cs"), Italian ("it"), - Japanese ("ja"); - + Japanese ("ja"), + Arabic ("ar"), + Afrikaans ("af"), + Bengali ("bn"), + Bulgarian ("bg"), + Danish ("da"), + Finnish ("fi"), + Georgian ("ka"), + Greek ("el"), + Hindi ("hi"), + Indonesian ("id"), + Irish ("ga"), + Kazakh ("kk"), + Latin ("la"), + Macedonian ("mk"), + Mongolian ("mn"), + Norwegian ("no"), + Polish ("pl"), + Portuguese ("pt"), + Romanian ("ro"), + Serbian ("sr"), + Slovak ("sk"), + Swedish ("sv"), + Thai ("th"), + Turkish ("tr"), + Vietnamese ("vi"); + private final String title; Languages(String title) { From 2ad6d0efb1c1b447ed7db19a6901000c12a33b09 Mon Sep 17 00:00:00 2001 From: Borisov Stepan Date: Sat, 5 Jun 2021 12:27:39 +0300 Subject: [PATCH 02/32] Minor changes --- src/main/java/translators/Languages.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/translators/Languages.java b/src/main/java/translators/Languages.java index 6ec8558..0cf3978 100644 --- a/src/main/java/translators/Languages.java +++ b/src/main/java/translators/Languages.java @@ -37,7 +37,7 @@ public enum Languages { Thai ("th"), Turkish ("tr"), Vietnamese ("vi"); - + private final String title; Languages(String title) { From 53f21c10dda84b4a85c0b070a4665f8c0f25d83a Mon Sep 17 00:00:00 2001 From: Stepan Borisov <64232056+stepanstefan@users.noreply.github.com> Date: Sat, 5 Jun 2021 15:11:16 +0300 Subject: [PATCH 03/32] Update README.md --- README.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9917955..2cd0027 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,76 @@ -# IntelliJ-Translator -comming soon... +# IntelliJ Translator +### Simple IntelliJ IDEA plugin for translate +

+Qries +Qries +Qries +

+ +## Features +- Support for **34 languages**; +- The ability to both **replace** and simply **display** the translation of the text, taking into account **all special characters**.; +- The quality of the translation is comparable to that of **google translator**, because we use its **API** :) + + +## Installation + +### Installation from disk +**1.** Download the **ZIP** file with the latest version of **IntelliJ Plugin** from [releases](https://github.com/timurbabs/IntelliJ-Translator/rele.. "releases"). +**2.** Press **Ctrl+Alt+S** to open IDE settings and select **Plugins**. +**3.** On the **Plugins** page, click :fa-cog: and then click **Install Plugin from Disk**. +**4.** Select the plugin archive file and click **OK**. +### Installation from source +**1.** Clone this repository. + +`git clone https://github.com/timurbabs/IntelliJ-Translator.git` + +**2.** In the cloned repository, run: + +`~$ ./gradlew` for **Linux** +`> gradlew` for **Windows** + +**3.** **ZIP** file with the plugin will appear in the **build/distributions** folder. +**4.** Follow [this](#instruction) instruction from **point 2**. + +## Usage +### Replacing text + +To translate text with replacement, press **Ctrl+\ , Ctrl+T** and select languages ​​for translation. + +Qries + +Qries + +Qries + +You can also translate text with replacement **without choosing languages**. For this **select default languages ​​in the plugin settings** (**File -> Settings -> Tools -> Translator**) or by pressing **Ctrl+\ , Ctrl+S** , and then you do not have to select languages ​​for translation. +For replacing without choosing languages press **Ctrl+\ , Ctrl+P**. + +If you do not know the language from which you are going to translate, you can use the **automatic language detection**. For this press **Ctrl+\ , Ctrl+[**. Тhe default language will be used as the language to translate into. + +### Display text + +If you **do not need to replace the text**, but you just want to find out its translation, then you can **display** it on the screen by pressing **Сtrl+\, Ctrl+R**, to choose language from menu. + +[![](https://sun9-51.userapi.com/impg/JyO40X09FA_JhQk9dXWHzeS3pKNFAklEKNUQjA/PecfT-8k81w.jpg?size=177x94&quality=96&sign=5fd9d0bb58afcd4a4959619e464adcee&type=album)](https://sun9-51.userapi.com/impg/JyO40X09FA_JhQk9dXWHzeS3pKNFAklEKNUQjA/PecfT-8k81w.jpg?size=177x94&quality=96&sign=5fd9d0bb58afcd4a4959619e464adcee&type=album) + + +If you do not want to choose a language or do not know the word in which language in front of you, then you can use the option of **displaying without choosing** a language (**Ctrl+\, Ctrl+Q**) or the ability to **automatically detect** the language (**Ctrl+\ , Ctrl+]**). + + +------------ + + +### You can access all previous hotkeys by pressing **right-click** and select IntelliJ Translator menu. + +[![](https://sun9-32.userapi.com/impg/Sq6qQ4_lbuPlbjBsmzU3kMZiL6XE69u5teVQtA/CX9lqO6-X0s.jpg?size=767x480&quality=96&sign=2f4538ee6d515ce8ebc9e751e63d26c1&type=album)](https://sun9-32.userapi.com/impg/Sq6qQ4_lbuPlbjBsmzU3kMZiL6XE69u5teVQtA/CX9lqO6-X0s.jpg?size=767x480&quality=96&sign=2f4538ee6d515ce8ebc9e751e63d26c1&type=album) + +------------ + + +### You can change hotkeys in File -> Settings -> Keymap -> Plugins -> TranslatorYou can change hotkeys in File -> Settings -> Keymap -> Plugins -> Translator. + +------------ + + +### IntelliJ Translator can translate only selected text! From f699810b74f11bc790a5cf850b62bdfdc9a21a10 Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 15:15:30 +0300 Subject: [PATCH 04/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cd0027..1f079dd 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To translate text with replacement, press **Ctrl+\ , Ctrl+T** and select languag Qries -Qries +Qries Qries From 5b920ef94c23fe28e570cfa9d336a845dff64002 Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 15:16:02 +0300 Subject: [PATCH 05/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f079dd..1fe56a8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To translate text with replacement, press **Ctrl+\ , Ctrl+T** and select languag Qries -Qries +Qries Qries From 391ae3c20a824c370bdb9d26df0c88596add2f25 Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 15:16:27 +0300 Subject: [PATCH 06/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1fe56a8..d8de7ca 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To translate text with replacement, press **Ctrl+\ , Ctrl+T** and select languag Qries -Qries +Qries Qries From b5865c19f472fe636423000c67058f4afd80a4ce Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 15:24:41 +0300 Subject: [PATCH 07/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d8de7ca..2cd0027 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To translate text with replacement, press **Ctrl+\ , Ctrl+T** and select languag Qries -Qries +Qries Qries From 943cbd8e04e190b1df20db298c7956513eca7a0c Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 15:25:07 +0300 Subject: [PATCH 08/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cd0027..1f079dd 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To translate text with replacement, press **Ctrl+\ , Ctrl+T** and select languag Qries -Qries +Qries Qries From 472d9ed476d8d58d46a5ae8ab33969d2d8c86140 Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 15:25:26 +0300 Subject: [PATCH 09/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f079dd..7c208cd 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To translate text with replacement, press **Ctrl+\ , Ctrl+T** and select languag Qries -Qries +Qries Qries From d016cb1499c61335aebd86ffab3d07617c017095 Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 15:40:10 +0300 Subject: [PATCH 10/32] Minor changes. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7c208cd..77037b7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@

## Features -- Support for **34 languages**; - The ability to both **replace** and simply **display** the translation of the text, taking into account **all special characters**.; - The quality of the translation is comparable to that of **google translator**, because we use its **API** :) From 5b9ee0ab7c5ee0a5f92c7980a879bfa976788977 Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 17:57:49 +0300 Subject: [PATCH 11/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77037b7..22828b1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### Simple IntelliJ IDEA plugin for translate

Qries -Qries +Qries Qries

From 0801ca1d5f6cbf176db29c03bac317c28c0523bc Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 18:06:43 +0300 Subject: [PATCH 12/32] Minor changes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 22828b1..4fb4a03 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ ### Simple IntelliJ IDEA plugin for translate

Qries -Qries -Qries +Qries +Qries

## Features From e4c1882dd18dab045477b5e2469533e9a1ddacf1 Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 18:20:23 +0300 Subject: [PATCH 13/32] Minor changes. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 4fb4a03..baf6ad6 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,7 @@ If you do not want to choose a language or do not know the word in which languag ------------ - -### You can change hotkeys in File -> Settings -> Keymap -> Plugins -> TranslatorYou can change hotkeys in File -> Settings -> Keymap -> Plugins -> Translator. +### You can change hotkeys in File -> Settings -> Keymap -> Plugins -> Translator ------------ From ecfad21152b344794138d5d49058b17182abfe4c Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sat, 5 Jun 2021 18:20:58 +0300 Subject: [PATCH 14/32] Minor changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index baf6ad6..0db9bbd 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ If you do not want to choose a language or do not know the word in which languag ------------ -### You can change hotkeys in File -> Settings -> Keymap -> Plugins -> Translator +### You can change hotkeys in File -> Settings -> Keymap -> Plugins -> Translator. ------------ From fd48651666db6e601801e5bd608a081abef4caff Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sun, 6 Jun 2021 12:10:21 +0300 Subject: [PATCH 15/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0db9bbd..fc5551e 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ To translate text with replacement, press **Ctrl+\ , Ctrl+T** and select languag Qries -Qries +Qries Qries From 2345fe3aba19dc226611ce454c491fba46871e28 Mon Sep 17 00:00:00 2001 From: Timur Baburin Date: Sun, 6 Jun 2021 19:42:41 +0300 Subject: [PATCH 16/32] Minor changes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc5551e..bc2a444 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ## Installation ### Installation from disk -**1.** Download the **ZIP** file with the latest version of **IntelliJ Plugin** from [releases](https://github.com/timurbabs/IntelliJ-Translator/rele.. "releases"). +**1.** Download the **ZIP** file with the latest version of **IntelliJ Plugin** from [releases](https://github.com/timurbabs/IntelliJ-Translator/releases). **2.** Press **Ctrl+Alt+S** to open IDE settings and select **Plugins**. **3.** On the **Plugins** page, click :fa-cog: and then click **Install Plugin from Disk**. **4.** Select the plugin archive file and click **OK**. From 16412d8abd4aaba7871e8da5eabe05c7ab9f7e45 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 05:13:11 +0300 Subject: [PATCH 17/32] Updated workflow --- .github/workflows/gradle.yml | 215 ++++++++++++++++++++++++++++++++--- 1 file changed, 197 insertions(+), 18 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8e986fc..65590fc 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,27 +1,206 @@ name: Java CI with Gradle - on: - pull_request: - branches: - - '*' push: - branches: - - 'master' + branches: [master] + pull_request: [develop] jobs: + + gradleValidation: + name: Gradle Wrapper + runs-on: ubuntu-latest + steps: + + - name: Fetch Sources + uses: actions/checkout@v2.3.4 + + - name: Gradle Wrapper Validation + uses: gradle/wrapper-validation-action@v1.0.4 + + test: + name: Test + needs: gradleValidation + runs-on: ubuntu-latest + steps: + + - name: Setup Java + uses: actions/setup-java@v2 + with: + distribution: zulu + java-version: 8 + + - name: Fetch Sources + uses: actions/checkout@v2.3.4 + + - name: Setup Gradle Dependencies Cache + uses: actions/cache@v2.1.6 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} + + - name: Setup Gradle Wrapper Cache + uses: actions/cache@v2.1.6 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + + - name: Run Linters and Test + env: + URL: ${{ secrets.URL }} + run: ./gradlew check + + - name: Verify Plugin + env: + URL: ${{ secrets.URL }} + run: ./gradlew verifyPlugin + build: + name: Build + needs: test runs-on: ubuntu-latest + outputs: + name: ${{ steps.properties.outputs.name }} + version: ${{ steps.properties.outputs.version }} + changelog: ${{ steps.properties.outputs.changelog }} + artifact: ${{ steps.properties.outputs.artifact }} + steps: + + - name: Setup Java + uses: actions/setup-java@v2 + with: + distribution: zulu + java-version: 8 + + - name: Fetch Sources + uses: actions/checkout@v2.3.4 + - name: Setup Gradle Dependencies Cache + uses: actions/cache@v2.1.6 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} + + - name: Setup Gradle Wrapper Cache + uses: actions/cache@v2.1.6 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + + - name: Export Properties + id: properties + shell: bash + run: | + PROPERTIES="$(./gradlew properties --console=plain -q)" + VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" + NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')" + CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + ARTIFACT="${NAME}-${VERSION}.zip" + echo "::set-output name=version::$VERSION" + echo "::set-output name=name::$NAME" + echo "::set-output name=changelog::$CHANGELOG" + echo "::set-output name=artifact::$ARTIFACT" + - name: Build Plugin + env: + URL: ${{ secrets.URL }} + run: ./gradlew buildPlugin + + - name: Upload artifact + uses: actions/upload-artifact@v2.2.3 + with: + name: plugin-artifact + path: ./build/distributions/${{ steps.properties.outputs.artifact }} + + verify: + name: Verify + needs: build + runs-on: ubuntu-latest + steps: + + - name: Setup Java + uses: actions/setup-java@v2 + with: + distribution: zulu + java-version: 8 + + - name: Fetch Sources + uses: actions/checkout@v2.3.4 + + - name: Setup Gradle Dependencies Cache + uses: actions/cache@v2.1.6 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} + + - name: Setup Gradle Wrapper Cache + uses: actions/cache@v2.1.6 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} + + - name: Export Properties + id: properties + shell: bash + run: | + PROPERTIES="$(./gradlew properties --console=plain -q)" + IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)" + echo "::set-output name=ideVersions::$IDE_VERSIONS" + echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier" + - name: Setup Plugin Verifier IDEs Cache + uses: actions/cache@v2.1.6 + with: + path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides + key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }} + + - name: Verify Plugin + env: + URL: ${{ secrets.URL }} + run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }} + + releaseDraft: + name: Release Draft + if: github.event_name != 'pull_request' + needs: [build, verify] + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - env: - URL: ${{ secrets.URL }} - run: ./gradlew build + + - name: Fetch Sources + uses: actions/checkout@v2.3.4 + + - name: Remove Old Release Drafts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + curl -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/$GITHUB_REPOSITORY/releases \ + | tr '\r\n' ' ' \ + | jq '.[] | select(.draft == true) | .id' \ + | xargs -I '{}' \ + curl -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/$GITHUB_REPOSITORY/releases/{} + - name: Create Release Draft + id: createDraft + uses: actions/create-release@v1.1.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ needs.build.outputs.version }} + release_name: v${{ needs.build.outputs.version }} + body: ${{ needs.build.outputs.changelog }} + draft: true + + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: plugin-artifact + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.createDraft.outputs.upload_url }} + asset_path: ./${{ needs.build.outputs.artifact }} + asset_name: ${{ needs.build.outputs.artifact }} + asset_content_type: application/zip From 630cab5d3ecb1d7bd0e6aaa081cd51751b255af7 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 05:26:55 +0300 Subject: [PATCH 18/32] Fixing syntax --- .github/workflows/gradle.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 65590fc..e7d6b06 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -5,12 +5,10 @@ on: pull_request: [develop] jobs: - gradleValidation: name: Gradle Wrapper runs-on: ubuntu-latest steps: - - name: Fetch Sources uses: actions/checkout@v2.3.4 @@ -22,7 +20,6 @@ jobs: needs: gradleValidation runs-on: ubuntu-latest steps: - - name: Setup Java uses: actions/setup-java@v2 with: @@ -64,7 +61,6 @@ jobs: changelog: ${{ steps.properties.outputs.changelog }} artifact: ${{ steps.properties.outputs.artifact }} steps: - - name: Setup Java uses: actions/setup-java@v2 with: @@ -118,7 +114,6 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - name: Setup Java uses: actions/setup-java@v2 with: @@ -165,7 +160,6 @@ jobs: needs: [build, verify] runs-on: ubuntu-latest steps: - - name: Fetch Sources uses: actions/checkout@v2.3.4 From b9973421fd2ad631aea5534674c0ee5080cd988d Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 05:33:05 +0300 Subject: [PATCH 19/32] Fixing syntax --- .github/workflows/gradle.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e7d6b06..0438993 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -42,7 +42,8 @@ jobs: key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} - name: Run Linters and Test - env: + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} URL: ${{ secrets.URL }} run: ./gradlew check @@ -193,6 +194,7 @@ jobs: uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + env: with: upload_url: ${{ steps.createDraft.outputs.upload_url }} asset_path: ./${{ needs.build.outputs.artifact }} From 2d2bdb1ae027334b1d6f1d67349508dde4f1e3c1 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 05:35:36 +0300 Subject: [PATCH 20/32] Fixing syntax --- .github/workflows/gradle.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 0438993..8bc80ce 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -43,12 +43,11 @@ jobs: - name: Run Linters and Test env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} URL: ${{ secrets.URL }} run: ./gradlew check - name: Verify Plugin - env: + env: URL: ${{ secrets.URL }} run: ./gradlew verifyPlugin @@ -151,8 +150,6 @@ jobs: key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }} - name: Verify Plugin - env: - URL: ${{ secrets.URL }} run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }} releaseDraft: From 4a186a4301086ea9a3078980c63807e4d89bb288 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 05:37:23 +0300 Subject: [PATCH 21/32] Fixing syntax --- .github/workflows/gradle.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8bc80ce..38dce33 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -98,8 +98,9 @@ jobs: echo "::set-output name=name::$NAME" echo "::set-output name=changelog::$CHANGELOG" echo "::set-output name=artifact::$ARTIFACT" + - name: Build Plugin - env: + env: URL: ${{ secrets.URL }} run: ./gradlew buildPlugin From 7a02348af6363ea7ad906a7c87e10f522bc7c4a3 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 05:38:23 +0300 Subject: [PATCH 22/32] Fixing syntax --- .github/workflows/gradle.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 38dce33..18ff38d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -192,7 +192,6 @@ jobs: uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - env: with: upload_url: ${{ steps.createDraft.outputs.upload_url }} asset_path: ./${{ needs.build.outputs.artifact }} From 811e39562c126077eee8bbfb2bf41feeb2dbdf8a Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 05:42:48 +0300 Subject: [PATCH 23/32] Fixing syntax --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 18ff38d..9a55447 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,8 +2,8 @@ name: Java CI with Gradle on: push: branches: [master] - pull_request: [develop] - + pull_request: + branches: [develop] jobs: gradleValidation: name: Gradle Wrapper From 85abaf5e87ef01b8d08d792578ea531e201991c2 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 06:00:30 +0300 Subject: [PATCH 24/32] Fixing syntax --- .github/workflows/gradle.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9a55447..9be8ea8 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -23,8 +23,8 @@ jobs: - name: Setup Java uses: actions/setup-java@v2 with: - distribution: zulu - java-version: 8 + distribution: adopt + java-version: 11 - name: Fetch Sources uses: actions/checkout@v2.3.4 @@ -64,8 +64,8 @@ jobs: - name: Setup Java uses: actions/setup-java@v2 with: - distribution: zulu - java-version: 8 + distribution: adopt + java-version: 11 - name: Fetch Sources uses: actions/checkout@v2.3.4 @@ -118,8 +118,8 @@ jobs: - name: Setup Java uses: actions/setup-java@v2 with: - distribution: zulu - java-version: 8 + distribution: adopt + java-version: 11 - name: Fetch Sources uses: actions/checkout@v2.3.4 From 3e7331f5cfe9bef84d5ea0e0c8d3a2e13dc008b1 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 06:07:56 +0300 Subject: [PATCH 25/32] Fixing syntax --- .github/workflows/gradle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9be8ea8..e38b2c4 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -94,6 +94,7 @@ jobs: CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" ARTIFACT="${NAME}-${VERSION}.zip" + echo "::set-output name=version::$VERSION" echo "::set-output name=name::$NAME" echo "::set-output name=changelog::$CHANGELOG" From 00106d0843fd9e09825d397648341e615ac00832 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 06:23:42 +0300 Subject: [PATCH 26/32] Fixing syntax --- .github/workflows/gradle.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e38b2c4..2094352 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -58,7 +58,6 @@ jobs: outputs: name: ${{ steps.properties.outputs.name }} version: ${{ steps.properties.outputs.version }} - changelog: ${{ steps.properties.outputs.changelog }} artifact: ${{ steps.properties.outputs.artifact }} steps: - name: Setup Java @@ -89,15 +88,10 @@ jobs: PROPERTIES="$(./gradlew properties --console=plain -q)" VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')" - CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" ARTIFACT="${NAME}-${VERSION}.zip" echo "::set-output name=version::$VERSION" echo "::set-output name=name::$NAME" - echo "::set-output name=changelog::$CHANGELOG" echo "::set-output name=artifact::$ARTIFACT" - name: Build Plugin @@ -180,7 +174,6 @@ jobs: with: tag_name: v${{ needs.build.outputs.version }} release_name: v${{ needs.build.outputs.version }} - body: ${{ needs.build.outputs.changelog }} draft: true - name: Download Artifact From 6ab17a9c32bf5bdb8e7531faadf1d8349597c330 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 06:37:09 +0300 Subject: [PATCH 27/32] Fixing syntax --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2094352..e56d7bf 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -87,7 +87,7 @@ jobs: run: | PROPERTIES="$(./gradlew properties --console=plain -q)" VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" - NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')" + NAME="$(echo "$PROPERTIES" | grep "^archivesBaseName:" | cut -f2- -d ' ')" ARTIFACT="${NAME}-${VERSION}.zip" echo "::set-output name=version::$VERSION" From 46aed85ca633f49498272395e7cc2d29c440e80a Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 06:49:28 +0300 Subject: [PATCH 28/32] Fixing syntax --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e56d7bf..71165d0 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -136,7 +136,7 @@ jobs: shell: bash run: | PROPERTIES="$(./gradlew properties --console=plain -q)" - IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)" + IDE_VERSIONS="2020.2.4, 2020.3.4, 2021.1.1" echo "::set-output name=ideVersions::$IDE_VERSIONS" echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier" - name: Setup Plugin Verifier IDEs Cache From 4dc844d8fd835206514ebed9e02b477d5f648cc5 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 07:08:39 +0300 Subject: [PATCH 29/32] Fixing syntax --- .github/workflows/gradle.yml | 9 ++++++++- build.gradle | 2 +- gradle.properties | 3 +++ src/main/resources/META-INF/plugin.xml | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 gradle.properties diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 71165d0..a418854 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -58,6 +58,7 @@ jobs: outputs: name: ${{ steps.properties.outputs.name }} version: ${{ steps.properties.outputs.version }} + changelog: ${{ steps.properties.outputs.changelog }} artifact: ${{ steps.properties.outputs.artifact }} steps: - name: Setup Java @@ -88,10 +89,15 @@ jobs: PROPERTIES="$(./gradlew properties --console=plain -q)" VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" NAME="$(echo "$PROPERTIES" | grep "^archivesBaseName:" | cut -f2- -d ' ')" + CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" ARTIFACT="${NAME}-${VERSION}.zip" echo "::set-output name=version::$VERSION" echo "::set-output name=name::$NAME" + echo "::set-output name=changelog::$CHANGELOG" echo "::set-output name=artifact::$ARTIFACT" - name: Build Plugin @@ -136,7 +142,7 @@ jobs: shell: bash run: | PROPERTIES="$(./gradlew properties --console=plain -q)" - IDE_VERSIONS="2020.2.4, 2020.3.4, 2021.1.1" + IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)" echo "::set-output name=ideVersions::$IDE_VERSIONS" echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier" - name: Setup Plugin Verifier IDEs Cache @@ -174,6 +180,7 @@ jobs: with: tag_name: v${{ needs.build.outputs.version }} release_name: v${{ needs.build.outputs.version }} + body: ${{ needs.build.outputs.changelog }} draft: true - name: Download Artifact diff --git a/build.gradle b/build.gradle index 70a230e..1773593 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group 'com.devtools.java' -version '1.0-SNAPSHOT' +version '0.1.1' repositories { mavenCentral() diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..cae7e86 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +pluginName_ = IntelliJ Platform Plugin Template +pluginVersion = 0.7.0 +pluginVerifierIdeVersions = 2019.3.5, 2020.1.4, 2020.2.3 diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 638c264..cda8cc6 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -5,7 +5,7 @@ Student project. Plugin for intellij idea to translate text in code. - 1.0.0 + 0.1.1 Initial release of the plugin. vsem dobra kto chitaet :) com.intellij.modules.platform From 16484d9e7ce6dc026e20923a49274d5b0962e61e Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 07:10:59 +0300 Subject: [PATCH 30/32] Fixing syntax --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index cae7e86..4a3fc14 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -pluginName_ = IntelliJ Platform Plugin Template -pluginVersion = 0.7.0 +pluginName_ = IntelliJ-Translator +pluginVersion = 0.1.1 pluginVerifierIdeVersions = 2019.3.5, 2020.1.4, 2020.2.3 From 39e76e58c9d26bac6a7314c34375755ff5948fc4 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 07:21:18 +0300 Subject: [PATCH 31/32] Fixing syntax --- .github/workflows/gradle.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a418854..e56d7bf 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -58,7 +58,6 @@ jobs: outputs: name: ${{ steps.properties.outputs.name }} version: ${{ steps.properties.outputs.version }} - changelog: ${{ steps.properties.outputs.changelog }} artifact: ${{ steps.properties.outputs.artifact }} steps: - name: Setup Java @@ -89,15 +88,10 @@ jobs: PROPERTIES="$(./gradlew properties --console=plain -q)" VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" NAME="$(echo "$PROPERTIES" | grep "^archivesBaseName:" | cut -f2- -d ' ')" - CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" ARTIFACT="${NAME}-${VERSION}.zip" echo "::set-output name=version::$VERSION" echo "::set-output name=name::$NAME" - echo "::set-output name=changelog::$CHANGELOG" echo "::set-output name=artifact::$ARTIFACT" - name: Build Plugin @@ -180,7 +174,6 @@ jobs: with: tag_name: v${{ needs.build.outputs.version }} release_name: v${{ needs.build.outputs.version }} - body: ${{ needs.build.outputs.changelog }} draft: true - name: Download Artifact From d87acef02c7a7ea112ab55a4f8c8aa82334ec798 Mon Sep 17 00:00:00 2001 From: Timur Date: Sun, 13 Jun 2021 07:58:53 +0300 Subject: [PATCH 32/32] Fixing syntax --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e56d7bf..c7f70aa 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -146,7 +146,7 @@ jobs: key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }} - name: Verify Plugin - run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }} + run: ./gradlew verifyPlugin releaseDraft: name: Release Draft