
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@tolgee/ai-migrator
Advanced tools
AI migration tool to migrate your project from raw string to Tolgee SDKs
This tool is used to migrate your app code from raw string to use Tolgee SDKs, so you can manage your localization effectively with Tolgee.
Although we still recommend to prepare your project for localization from the beginning, the reality is that many developers start with raw strings and then decide to localize their app.
This tool is here to help you with this process. It will scan your project for raw strings and replace them with Tolgee SDK calls.
e.g. for React, it will replace:
export const WelcomeMessage = () => {
return <div>Welcome!</div>;
};
with:
import { T } from '@tolgee/react';
export const WelcomeMessage = () => {
return <div><T keyName="welcome-message" /></div>
}
The migration process is divided into two steps. First step, migrate
command execution, will process your files,
replacing them with migrated version and produce status file including the localization keys to create.
In the second step, you can manually fix the migrated files and status file. You can also add new keys to the status file.
The third step, upload-keys
command execution will upload the keys to the Tolgee platform.
migrate
command executionInstall the tool globally:
npm install -g @tolgee/ai-migrator
Run the migration command:
This will replace your original files with migrated versions and create a status file with keys to upload to Tolgee platform.
The command requires clean git state, if you have any uncommitted changes, stash them or commit them, or else you
will get Migrator requires a clean git state. Please commit or stash changes before proceeding.
error message.
tolgee-migrator migrate -p src/**/*.tsx -r react -k <your openAI api-key>
-p
- glob pattern to search for files to migrate-r
- preset according your project stack (currently only react
is supported)-k
- your OpenAI API keyYou can also use --help
to see all available options. Or see them bellow.
In the second step, you can go over the migrated files and status file and fix them. It's good idea to open each file diff in your favourite IDE.
If you add new key to any file, don't forget to add it to the status file.
FAQs
AI migration tool to migrate your project from raw string to Tolgee SDKs
The npm package @tolgee/ai-migrator receives a total of 0 weekly downloads. As such, @tolgee/ai-migrator popularity was classified as not popular.
We found that @tolgee/ai-migrator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.