diff --git a/.github/scripts/download-translations.js b/.github/scripts/download-translations.js index 8eb3fd69f..62f63a6a0 100644 --- a/.github/scripts/download-translations.js +++ b/.github/scripts/download-translations.js @@ -1,10 +1,7 @@ import axios from 'axios'; import fs from 'fs-extra'; import path from 'path'; -import { fileURLToPath } from 'url'; - -// Get current directory -const __filename = fileURLToPath(import.meta.url); +import { URLSearchParams } from 'url'; // POEditor API information const API_TOKEN = process.env.POEDITOR_API; diff --git a/.github/workflows/poeditor-sync.yml b/.github/workflows/poeditor-sync.yml index 876ab811b..984b27f4f 100644 --- a/.github/workflows/poeditor-sync.yml +++ b/.github/workflows/poeditor-sync.yml @@ -40,6 +40,7 @@ jobs: "name": "poeditor-scripts", "version": "1.0.0", "private": true, + "type": "module", "dependencies": { "axios": "^1.6.0", "fs-extra": "^11.1.1" @@ -54,7 +55,7 @@ jobs: - name: Download translations from POEditor env: - POEDITOR_API_TOKEN: ${{ secrets.POEDITOR_API_TOKEN }} + POEDITOR_API_TOKEN: ${{ secrets.POEDITOR_API }} POEDITOR_PROJECT_ID: ${{ secrets.POEDITOR_PROJECT_ID }} LANGUAGES: ${{ github.event.inputs.languages || 'tr,en' }} EXPORT_FORMAT: ${{ github.event.inputs.format || 'key_value_json' }}