crowdin / vscode-crowdin

Crowdin Explorer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=Crowdin.vscode-crowdin
MIT License
51 stars 5 forks source link

Invalid project id #17

Closed dfdgsdfg closed 4 years ago

dfdgsdfg commented 4 years ago

Seems crowdin.yml configured correctly. CLI works well with it like listing or download.

Here is a log that is related on Log (Extension Host)

[2020-04-13 13:30:16.518] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/dididi/.vscode/extensions/ms-azuretools.vscode-docker-1.0.0/main
[2020-04-13 13:30:21.309] [exthost] [info] ExtensionService#_doActivateExtension Crowdin.vscode-crowdin {"startup":false,"extensionId":{"value":"Crowdin.vscode-crowdin","_lower":"crowdin.vscode-crowdin"},"activationEvent":"onView:tmsFiles"}
[2020-04-13 13:30:21.309] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/dididi/.vscode/extensions/crowdin.vscode-crowdin-1.0.3/dist/extension.js
[2020-04-13 13:30:21.470] [exthost] [info] ExtensionService#_doActivateExtension Orta.vscode-ios-common-files {"startup":true,"extensionId":{"value":"Orta.vscode-ios-common-files","_lower":"orta.vscode-ios-common-files"},"activationEvent":"workspaceContains:fastlane/Fastfile"}
crowdin-support commented 4 years ago

Hi @dfdgsdfg I'm sorry for the inconvenience!

Let me forward it to our developers for further investigation, we will get back to you with the updates in the short run

andrii-bodnar commented 4 years ago

Hi @dfdgsdfg , could you please provide your crowdin.yml file content?

dfdgsdfg commented 4 years ago

Of course.

"project_identifier": "________ from project settings > API ________ "
"api_key": "________ from project settings > API ________ "
"preserve_hierarchy": true

files: [
    {
      "source": "lib/l10n/*.arb",

      "translation": "lib/l10n/intl_%two_letters_code%.arb",
    },
  ]
andrii-bodnar commented 4 years ago

@dfdgsdfg this plugin works only with the new Configuration File Config (for CLI v3).

All you need to do is:

Also, we will try to fix the current behavior and display an appropriate error message.

dfdgsdfg commented 4 years ago

Still have same error. Also cli does not work.

"project_id": "__from Project Settings > API__"
"api_token": "__Account Settings > API & SSO > Personal Access Tokens__"
"base_path": ""
"preserve_hierarchy": true
$ crowdin list project
Project identifier is empty
Project key is empty
andrii-bodnar commented 4 years ago

@dfdgsdfg, I suppose you are using CLI v2. This config (containing project_id, api_token) compatible only with CLI v3. Try to use CLI v3

dfdgsdfg commented 4 years ago

I removed brew installed Crowdin CLI, then install a new version.

$ java -jar ~/bin/crowdin-cli.jar lint
Your configuration file looks good

$java -jar ~/bin/crowdin-cli.jar list project
❌ Fetching project info     
❌ Failed to collect project info. Please contact our support team for help
❌ Project with id 'effy-app' doesn't exist

Is it related with my project id? It has a hyphen in the project name.

스크린샷 2020-04-13 오후 4 37 33
andrii-bodnar commented 4 years ago

The project identifier is using only for CLI v2.

For CLI v3 and Configuration file v3 you should use numerical project ID:

screenshot-crowdin com-2020 04 13-10_42_09

dfdgsdfg commented 4 years ago

Seems connect project without error.

How can I use this plugin?

It shows a project, but doesn't contain anything. I clicked the refresh icon and download icon, but nothing happened.

스크린샷 2020-04-13 오후 4 53 25
andrii-bodnar commented 4 years ago

The plugin will build tree with source files. In Crowdin Explorer you can upload those files into Crowdin and download translations.

Please check the files section in crowdin.yml and make sure that patterns respond to localization files structure in your project.

dfdgsdfg commented 4 years ago

@alexandrtovmach Thanks. I will try it.