
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
@techfetch-dev/project-translator
Advanced tools
An easy-to-use vscode extension for multi-language localization of projects.
Project repository: https://github.com/Project-Translation/project_translator
techfetch-dev.project-translator in the VS Code Extensions view and click install
The extension supports translation to these languages:
| Project | Original Repository | Description | Stars | Tags |
|---|---|---|---|---|
| algorithm-visualizer | algorithm-visualizer/algorithm-visualizer | :fireworks:Interactive Online Platform that Visualizes Algorithms from Code | 47301 | algorithm, animation, data-structure, visualization |
| algorithms | algorithm-visualizer/algorithms | :crystal_ball:Algorithm Visualizations | 401 | N/A |
| cline-docs | cline/cline | Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way. | 39572 | N/A |
| cursor-docs | getcursor/docs | Cursor's Open Source Documentation | 309 | N/A |
| gobyexample | mmcgrana/gobyexample | Go by Example | 7523 | N/A |
| golang-website | golang/website | [mirror] Home of the go.dev and golang.org websites | 402 | N/A |
| reference-en-us | Fechin/reference | ⭕ Share quick reference cheat sheet for developers. | 7808 | awk, bash, chatgpt, cheatsheet, cheatsheets, css, golang, grep, markdown, python, reference, sed, snippets, vim |
| styleguide | google/styleguide | Style guides for Google-originated open-source projects | 38055 | cpplint, style-guide, styleguide |
| vscode-docs | microsoft/vscode-docs | Public documentation for Visual Studio Code | 5914 | vscode |
If you want to contribute a translation or need a project to be translated:
**Project**: [project_url]
**Target Language**: [target_lang]
**Description**: Brief description of why this translation would be valuable
sequenceDiagram
Contributor->>Project Translator: Create translation issue
Project Translator->>Community: Review issue
Community-->>Contributor: Approve/Comment
Contributor->>New Project: Start translation
Contributor->>New Project: Submit to New Project
Contributor->>Project Translator: Create Pull Request, modify README.Samples
Project Translator-->>Project Translator: Review & Merge
Current translations in progress: View Issues
The extension supports the following configuration options:
{
"projectTranslator.specifiedFolders": [
{
"sourceFolder": {
"path": "Source folder path",
"lang": "Source language code"
},
"targetFolders": [
{
"path": "Target folder path",
"lang": "Target language code"
}
]
}
],
"projectTranslator.specifiedFiles": [
{
"sourceFile": {
"path": "Source file path",
"lang": "Source language code"
},
"targetFiles": [
{
"path": "Target file path",
"lang": "Target language code"
}
]
}
],
"projectTranslator.currentVendor": "openai",
"projectTranslator.vendors": [
{
"name": "openai",
"apiEndpoint": "API endpoint URL",
"apiKeyEnvVarName": "MY_OPENAI_API_KEY",
"model": "gpt-4o",
"rpm": "10",
"maxTokensPerSegment": 4096,
"timeout": 180,
"temperature": 0.1
}
],
"projectTranslator.userPrompts": [
"1. Should return no need translate if the markdown file has 'draft' set to 'true' in the front matter.",
"2. './readmes/' in the sentences should replace with './'",
],
"projectTranslator.ignore": {
"paths": [
"**/node_modules/**"
],
"extensions": [
".log"
]
},
}
Key configuration details:
| Configuration Option | Description |
|---|---|
projectTranslator.specifiedFolders | Multiple source folders with their corresponding destination folders for translation |
projectTranslator.specifiedFiles | Multiple source files with their corresponding destination files for translation |
projectTranslator.translationIntervalDays | Translation interval in days (default 7 days) |
projectTranslator.copyOnly | Files to copy but not translate (with paths and extensions arrays) |
projectTranslator.ignore | Files to ignore completely (with paths and extensions arrays) |
projectTranslator.skipFrontMatterMarkers | Skip files based on front matter markers (with enabled and markers arrays) |
projectTranslator.currentVendor | Current API vendor in use |
projectTranslator.vendors | API vendor configuration list (can use apiKey directly or apiKeyEnvVarName for environment variables) |
projectTranslator.systemPromptLanguage | Language used for built-in system prompts (default: en). Affects how the model is instructed, not the UI language |
projectTranslator.systemPrompts | System prompt array for guiding the translation process |
projectTranslator.userPrompts | User-defined prompt array, these prompts will be added after system prompts during translation |
projectTranslator.segmentationMarkers | Segmentation markers configured by file type, supports regular expressions |
projectTranslator.debug | Enable debug mode to log all API requests and responses to output channel (default: false) |
projectTranslator.logFile | Configuration for debug log files (see Log File Feature) |
projectTranslator.diffApply.enabled | Enable experimental differential translation mode (default: false) |
During translation:
The project now supports CLI execution in addition to the VS Code extension.
Build CLI output:
npm run compile
Run translation:
# Default target language: en-us
npx project-translator translate project --workspace . --config project.translation.json
# Specify target language
npx project-translator translate project --workspace . --config project.translation.json --lang ja-jp
Manage config:
npx project-translator config list --workspace . --config project.translation.json --json
npx project-translator config set currentVendor deepseek --workspace . --config project.translation.json
npx project-translator config schema --workspace .
npx project-translator config validate --workspace . --config project.translation.json
config schema will export project.translation.schema.json by default.
config validate performs JSON Schema validation on the config file and returns a non-zero exit code when invalid.
This extension uses esbuild for fast bundling and development:
npm run build - Production build with minificationnpm run compile - Development buildnpm run watch - Watch mode for developmentnpm test - Run testsnpm install to install dependenciesF5 to start debugging or run the "watch" task for developmentThe esbuild configuration:
out/extension.jsProject Translator supports using environment variables for API keys, which is a more secure approach than storing API keys directly in configuration files:
apiKeyEnvVarName property:{
"projectTranslator.vendors": [
{
"name": "openai",
"apiEndpoint": "https://api.openai.com/v1",
"apiKeyEnvVarName": "OPENAI_API_KEY",
"model": "gpt-4"
},
{
"name": "openrouter",
"apiEndpoint": "https://openrouter.ai/api/v1",
"apiKeyEnvVarName": "OPENROUTER_API_KEY",
"model": "anthropic/claude-3-opus"
}
]
}
Set the environment variable in your system:
set OPENAI_API_KEY=your_api_keyexport OPENAI_API_KEY=your_api_keyWhen the extension runs, it will:
apiKey is provided directly in the configurationapiKeyEnvVarNameThis approach keeps your API keys out of configuration files and version control systems.
Project Translator can skip translation of Markdown files based on their front matter metadata. This is useful for draft documents or files marked as not requiring translation.
To enable this feature, configure the projectTranslator.skipFrontMatterMarkers option:
{
"projectTranslator.skipFrontMatterMarkers": {
"enabled": true,
"markers": [
{
"key": "draft",
"value": "true"
},
{
"key": "translate",
"value": "false"
}
]
}
}
With this configuration, any Markdown file with front matter containing draft: true or translate: false will be skipped during translation and directly copied to the target location.
Example Markdown file that would be skipped:
---
draft: true
title: "Draft Document"
---
This document is a draft and should not be translated.
⚠️ Experimental Feature Warning: Differential translation mode is currently an experimental feature and may have stability and compatibility issues. It is recommended to use it with caution in production environments and always backup important files.
The extension supports an optional differential translation mode (diff-apply). When enabled, the extension sends both the source content and the existing translated target file to the model. The model should return one or more SEARCH/REPLACE blocks (plain text, no code fences). The extension applies these blocks locally to minimize changes, reduce API usage, and better preserve version history.
projectTranslator.diffApply.enabled in VS Code settings or project.translation.json (default: false).validationLevel: normal or strict (default: normal). In strict mode, invalid markers or matching failures will cause an error and the extension will fall back to the standard translation flow.autoBackup: If true, create a .bak backup of the target file before applying edits (default: true).maxOperationsPerFile: (retained for compatibility) not used by the new strategy.Workflow:
diffApply.enabled is true and the target file exists, the extension reads both source and target contents.Example SEARCH/REPLACE (multiple blocks allowed):
<<<<<<< SEARCH
:start_line: 10
-------
const label = "Old"
=======
const label = "New"
>>>>>>> REPLACE
<<<<<<< SEARCH
:start_line: 25
-------
function foo() {
return 1
}
=======
function foo() {
return 2
}
>>>>>>> REPLACE
Notes:
======= between SEARCH and REPLACE.Why differential translation currently performs poorly (explanation)
Cross-language alignment and comparison challenges: Differential translation requires sending both the original source document and the existing translated document to the model, and the model must compare them across languages to decide which parts of the translation need to be changed. This is a fundamentally harder task than modifying a single document in-place because the model must accurately align segments in different languages and judge semantic differences.
Complexity of format and boundary preservation: Many documents contain code blocks, tables, frontend markers, or special placeholders. A reliable diff workflow must preserve these structures while making textual edits. If the model cannot consistently produce results that strictly follow the SEARCH/REPLACE format, applying edits automatically may introduce formatting regressions or structural errors.
Context and terminology consistency issues: Small, localized edits often depend on broader context and an existing terminology/style glossary. When asked to produce minimal edits, the model may neglect global consistency (terminology, style, comments, variable names), resulting in inconsistent or semantically shifted translations.
Model stability and cost trade-offs: Achieving a dependable differential translation requires models with strong comparative reasoning and stable, predictable output formats. Current mainstream models do not reliably provide both robust cross-language alignment and strictly formatted outputs at reasonable cost, so systems often fall back to a full retranslation to ensure correctness.
Therefore, while differential translation can theoretically reduce expensive output tokens and better preserve version history, it is currently limited by models' cross-language comparison capabilities and output stability. This feature remains experimental; recommended mitigations include keeping automatic backups (autoBackup: true), using a tolerant validation level (validationLevel: "normal"), and falling back to full retranslation when matching or formatting fails. In the future, specialized bilingual alignment post-processors or custom smaller models may improve the stability of the diff approach.
Cost savings and why it helps
Input vs Output token cost: Large-model APIs commonly charge differently for input (prompt) and output (completion) tokens. Often, output tokens are significantly more expensive because the model generates longer text. Diff-apply helps because we send the updated source (input) and the existing translated file (input) to the model and ask for a compact JSON of edits. The model's response is a small JSON (few output tokens) rather than a full retranslated file (many output tokens), so you pay much less for the expensive output portion.
Only send what's changed: Instead of re-translating the entire file whenever small changes occur, diff-apply instructs the model to compute the minimal edit operations to update the existing translation. This is particularly effective for files that were previously translated and only receive incremental edits.
Best for formatted files: Files with strict formatting (JSON, XML, Markdown with code blocks) benefit greatly because diff-apply preserves structure and only changes textual parts that need translation. That reduces the chance of format-related regressions and extra output tokens caused by model reformatting.
Line-oriented base unit, smarter aggregation: The tool treats the basic translation unit as a "line", and the SEARCH/REPLACE strategy applies exact or fuzzy matching near :start_line:. Use validationLevel: "normal" for tolerant behavior and "strict" when you need conservative, exact edits.
When to use diff-apply:
FAQs
%description.description%
The npm package @techfetch-dev/project-translator receives a total of 0 weekly downloads. As such, @techfetch-dev/project-translator popularity was classified as not popular.
We found that @techfetch-dev/project-translator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.