How to get the most out of the automative tools in the VSCode Extension
Quetzal: Translation Library
to the library you are using for your project.
t
functions in your JavaScript codebase.
It adds four commands to your VSCode/Cursor Command Palette (Command
+ Shift
+ P
to open):
Quetzal: Scan for User-Facing Strings
Quetzal: Scan Current Document
Quetzal: Wrap Strings
Quetzal: Stop Scanning
Quetzal: Scan Current Document
(Command
+ Shift
+ P
to open the command palette)
Your editor should then look something like this:
Translate this string
Conversely, if something is green but should not be translated it, hover over it and click Do not translate this string
Quetzal: Wrap Strings
in the top right of your code editor.
Your file should now look like this:
t
function, and the proper t
function was imported for this client-side component.
Quetzal: Scan for User-Facing Strings
(Command
+ Shift
+ P
to open the command palette)
This will open a menu to scan several folders of your project at once, and sort all files by the number of strings that likely need to be translated.
This should allow you to rapidly integrate, even in a large codebase.