Giter VIP home page Giter VIP logo

vscode-crowdin's People

Contributors

andrii-bodnar avatar andrulko avatar dependabot[bot] avatar vainock avatar vexcited avatar yevheniyj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vscode-crowdin's Issues

File picker on `extract string` doesn't show file list using branches

Describe the bug
Hello, I'm utilizing the extension in a project with branches, and when attempting to extract text using the command string.extract, the File Picker does not display the file list and remains empty

To Reproduce
Steps to reproduce the behavior:

  1. Go to a file
  2. Left-click on the text you wish to extract.
  3. Set the key identifier
  4. File picker is shown as an empty list

Expected behavior
The file picker should display the list of translation files within the project.

Screenshots
image

Environment:

  • Extension: v2.2.1
  • OS: Windows 11
  • VS Code version: 1.90.1

Additional context
I investigated the issue and found that the problem is a bug that was resolved in @crowdin/crowdin-api-client related to listing project files recursively. However, this extension code still employs the outdated method.

Original extension code
image

The code that solved the issue for me
image

Translations don't get downloaded with `three_letters_code` is in `files.translations`

Describe the bug
When I have three_letters_code in my files.translation, and click on download translations, the UI shows loading infinitely, but when I use two_letters_code it'll get it without a problem.

To Reproduce
Steps to reproduce the behavior:

  1. Create a crowdin.yaml configuration file and specify three_letters_code in translations.
  2. Go to Crowdin extension
  3. Click on Download Translations button in TMS FILES section
  4. See the loading goes infinitely and never ends, also the files never show up.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
N/A

Environment (please complete the following information):

  • OS: Windows 10
  • VS Code version: 1.73.1

Additional context
Here is my crowding.yml:

"project_id": "MY_PROJECTID"
"api_token": "MY_API_TOKEN"
"base_path": "/public/locales/"
"branch": "main"
"files":
  [
    {
      "source": "/en/**/*.json",
      "translation": "/%two_letters_code%/%original_file_name%",
    },
  ]

Images are corrupted when uploading

Describe the bug
When uploading an image using the VS Code plugin it becomes corrupted. Examining the image in a hex editor it appears to be replacing all bytes that are invalid ASCII with EF BF BD (UTF-8 for �, U+FFFD) so it seems they're being parsed as ASCII text at some point. This doesn't happen if I upload directly using the website.

To Reproduce
Steps to reproduce the behavior:

  1. Upload an image
  2. Try to view the image online or download it

Expected behavior
Images are uploaded correctly.

Environment (please complete the following information):

  • OS: macOS
  • VS Code version: 1.55.2

Additional context
Source file: https://github.com/Epicpkmn11/TWiLightMenu/raw/translatable-images/romsel_dsimenutheme/nitrofiles/languages/en/photo_default.png
After upload: photo_default.png
Crowdin project: https://crowdin.com/project/TwilightMenu (Note: I've already reuploaded the image from the website)

Unable to download Translation

Describe the bug
Unable to download Translation

To Reproduce

files:
  [
    {
      source: Languages/en.xaml,
      translation: /%original_path%/%two_letters_code%.xaml,
    },
    {
      source: Properties/Resources.resx,
      translation: /%original_path%/Resources.%locale%.resx,
    },
  ]
commit_message: "[ci skip]"
project_id: "482461"

(api key is deleted here)

Expected behavior
It download translation files.

Screenshots
image

Environment (please complete the following information):

  • OS: Windows
  • VS Code version 1.64 Insider

Additional context
Add any other context about the problem here.

Specified Path via `dest` property is ignored

Describe the bug
A clear and concise description of what the bug is.
According to the documentation for the configuration file (https://support.crowdin.com/configuration-file/#uploading-files-to-specified-path-with-specified-type).
Setting dest property to files array object should upload the files to the specified path. However this setting seems to be ignored using the VS Code Extension. (Using the CLI with the same project, works)

To Reproduce
Steps to reproduce the behavior:

# crowdin.yml
"project_id": "XYZ"
"api_token": "XYZ"
"preserve_hierarchy": true

"files": [
  {
    "source": "/locales/de-DE.json",
    "dest": "/skeleton/de-DE.json",
    "translation": "/locales/%locale%.json",
  }
]

Expected behavior
A clear and concise description of what you expected to happen.
I expect that VS Code Extension behaves 1:1 with the CLI.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):
System:
OS: Windows 10 10.0.22478
CPU: (24) x64 AMD Ryzen 9 3900XT 12-Core Processor
Memory: 16.20 GB / 31.92 GB
Binaries:
Node: 16.11.0 - ~\AppData\Local\Volta\tools\image\node\16.11.0\node.EXE
Yarn: 1.22.11 - ~\AppData\Local\Volta\tools\image\yarn\1.22.11\bin\yarn.CMD
npm: 8.0.0 - ~\AppData\Local\Volta\tools\image\npm\8.0.0\bin\npm.CMD
Utilities:
Git: 2.33.1.
Virtualization:
Docker: 20.10.9 - C:\docker\docker.EXE
SDKs:
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.17763.0, 10.0.18362.0, 10.0.19041.0
IDEs:
Visual Studio: 16.7.30621.155 (Visual Studio Community 2019)
Languages:
Bash: 4.4.12 - C:\Windows\System32\bash.EXE
Go: 1.16 - C:\Program Files\Go\bin\go.EXE
Java: 14.0.2
Python: 3.9.7
Python3: 3.9.7
Browsers:
Edge: Spartan (44.22478.1012.0), Chromium (94.0.992.50), ChromiumDev (96.0.1047.2)
Internet Explorer: 11.0.22478.1000
Monorepos:
Yarn Workspaces: 1.22.11

Additional context
Add any other context about the problem here.
Not quite sure if that is a bug in vscode-crowdin or the used api client (https://github.com/crowdin/crowdin-api-client-js)

Add support for split project configuration and API credentials

As recommended in https://support.crowdin.com/configuration-file/#split-project-configuration-and-api-credentials

Extension doesn't seem to support reading split sensitive informations from .crowdin.[yml|yaml] aside of the default file for project configuration.

It'd be great so we can place this private file at the root directory of VCS managed project and add it to the ignored files list so it is not pushed to public repositories.

Thanks in advance
TY

Invalid project id

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"}

Autocomplete and hover hints

Is your feature request related to a problem? Please describe.

It would be great if this extension could help me fill in the correct translation keys and provide hover information about a translation key.

Describe the solution you'd like

  • In my source code, as I start typing a translation key, show me auto-complete suggestions for translation keys in my Crowdin sources files.
  • When I hover over a translation key, show information about that translation key, such as the text associated with that key in the source language and possibly its translation status from Crowdin.

I understand that these features require some level of parsing of source files, which the Crowdin app already can do. For my use case, the i18next JSON format, Android XML, and iOS strings are what I need.

Describe alternatives you've considered

Additional context

I am interested in contributing. Is this something you would accept outside contributions for?

How to specify API key in a public project?

Is your feature request related to a problem? Please describe.
I have a public project in GitLab. If I configure the api_token as described in the instructions the API token would get to the repository which would mean that anyone could get access to translations. I am new to Crowdlin, so I do not know exactly, but I assume the API key would have access to quite a large set of features so this is probably a big security risk.

I cannot put the crowdin.yml in gitignore because then the integration through GitLab would not work.

Describe the solution you'd like
Ability to specify the API key in VSCode settings so that they can be machine specific, not in the project files that go to GIT. Can I use "Environment variables" here somehow? I am not aware of any way that I could specify them in VSCode...

Describe alternatives you've considered
Perhaps a separate file for project id and API key. This could then be put to GitIgnore.

Config, update_option

Hi! First of all great job with this makes my life easier as a developer.

Would it be possible to be able to keep existing strings when i upload my source file.
From the configuration file it would be:

"update_option": "update_without_changes"

We use the original translation in the source file and for that reason it would be nice to not have to retranslate the translations for minor changes. I do understand the reason for this to be default though.

Keep up the great work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.