Lola for Dev is a Visual Studio Code extension that streamlines localization and i18n (internationalization) workflows for developers using the Lola platform. It provides seamless integration with your Lola project, allowing you to manage translation keys, sync resources, and preview translations directly within your editor.
Features
Change Live View Language
Instantly switch the language used for live previews in your code, making it easy to review translations in context.
Sync JSON Resources with Remote
Synchronize your local i18n resource files with the latest translations from your Lola project, ensuring your workspace is always up to date.
Auto t('key') (Beta)
Automatically generate and insert translation keys for selected text, reducing manual effort and improving consistency.
Generate as Plain Text
Quickly convert selected text into a translation key and replace it in your code, with context-aware suggestions.
UUID Redaction and Preview
Sensitive translation keys (UUIDs) are redacted in the editor by default. Hover or place your cursor on a key to reveal its translation for the currently selected language.
Change Live View Language:
Open the command palette (Cmd+Shift+P or Ctrl+Shift+P), search for Lola: Change live view language, and select your desired language.
Sync JSON Resources with Remote:
Run the command Lola: Sync JSON resources with remote to fetch and update your local translation files.
Auto t('key') (Beta):
Enable or disable auto-generation of translation keys by running Lola: Beta feature: Auto t('key').
Generate as Plain Text:
Select any text in your editor and press Cmd+Alt+I (Mac) or Ctrl+Alt+I (Windows/Linux) to convert it into a translation key.
UUID Redaction and Preview:
Translation keys matching the pattern L-XXXXXXXX are redacted by default. Place your cursor on a key to reveal its translation.
Configuration
The extension reads settings from lola.json in your workspace root:
projectId: Your Lola project ID (required)
accessKey: Your Lola access key (required)
path: Relative path to your i18n resource directory (required)
endpoint: (Optional) Custom Lola API endpoint
Commands & Keybindings
Command
Description
Default Keybinding
Lola: Change live view language
Switch the language for live code previews
—
Lola: Sync JSON resources with remote
Sync local i18n files with Lola project
—
Lola: Beta feature: Auto t('key')
Toggle auto-generation of translation keys
—
Lola: Generate as Plain Text
Convert selected text to a translation key
Cmd+Alt+I / Ctrl+Alt+I
Development
Clone the repository and run yarn install in the packages/plugin directory.
Use yarn watch to build in development mode.
Use yarn package to build for production.
License
This project is licensed under the terms of the MIT License.