Empower Transify
[TOC]
Have you found it a bit inconvenient to find the content of transify key? Are you tired to manually add all the new transify keys into transify files? This VSCode Extension is the friendly solution to improve your work efficiency, which allows FE to hover over a transify key to get the content and generate transify keys according to code changes.
Usage
Note: the minimum version of VSCode that this extension depends on is v1.67.0. Please open your project at the top level of current workspace, do not nested.
Hover over Transify Key
You can simply hover over a transify key of a js/ts/tsx/jsx file under rn project and get the transify content. It shows all the languages of current package by default, you can also customize the configuration.
Configuration transify.source
Actually this extension is specifically designed for our RN FE projects, so there is no need to configure, it works out of the box. Transify content from current package would be displayed by default from v0.0.4. If you'd like to check content from all packages, just set configuration as below:
// .vscode/settings.json
{
"transify.source": ["all"]
}
Configuration transify.language
Every json file under **/assets/strings
directory would be handled by default, you can also customize your preferable languages, like
// .vscode/settings.json
{
"transify.language": ["id.json"]
}
Generate Transify Keys
Every time before you stage and commit your code, try to run the Generate Transify Keys
command from the Command Palette (⌘+shift+P) to automatically search the new transify keys according to your current changes(not staged) and write into the transify file under corresponding package.
After running the command, you can view the output in the Generate Transify Keys
Output window to check which transify keys are found.
Latest important changes: Automatically identify and write parameters of transify keys into corresponding transify.js file at v1.0.4.
Enjoy smoothly!