- Select any text you want to extract for translations.
- Right click and click on Extract for translationor pressctrl+t.
- Enter the Labelfor JSON key and hit enter.
- Extraction done.
Common String (keys)
All common string values like Add, Remove, Cancel have common usage across the pages. We have nameing conventions for these keys.
It always start with txt_{key_name} where {key_name} can be add, remove and cancel for previous given examples.
When you are asked to enter Label, if you want to use predefined common keys from JSON, enter . (dot) and press Enter. It will prefill the input box with found value, hit Enter again and it will reuse this same key. And if it doesn't find any predefined/existing key, it will ask you enter Label.
Note: It only works for Common Keys which start with txt_ prefix.
Quick Sneak Peek
While working with localisation strings, mostly you need to see what is the actual value for the given JSON key (Label).
This extension also supports hover, so if you hover over the Label it will display the actaul value for 'EN (English)' and 'AR (عربى)'
Note: currently it only supports tsx files.
JSON files path
From workspace root path to /public/assets/lang.
- [x] /public/assets/lang/en.json
- [x] /public/assets/lang/ar.json
Features
- [x] Supports extracting single line text.
- [x] Supports extracting multines text.
- [x] Replaces tabs, extraspacesandnewlinesfrom text strings.