crowdin / vscode-crowdin Goto Github PK
View Code? Open in Web Editor NEWCrowdin Explorer for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items?itemName=Crowdin.vscode-crowdin
License: MIT License
Crowdin Explorer for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items?itemName=Crowdin.vscode-crowdin
License: MIT License
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:
Expected behavior
The file picker should display the list of translation files within the project.
Environment:
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.
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:
crowdin.yaml
configuration file and specify three_letters_code
in translations.Crowdin
extensionDownload Translations
button in TMS FILES sectionExpected behavior
A clear and concise description of what you expected to happen.
Screenshots
N/A
Environment (please complete the following information):
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%",
},
]
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:
Expected behavior
Images are uploaded correctly.
Environment (please complete the following information):
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)
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.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
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)
please add suport to flags
project_id_env: "CROWDIN_PROJECT_ID"
api_token_env: "CROWDIN_API_TOKEN"
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
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"}
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
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?
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.