The SFCC Resource Bundle Editor is the extension's editor for .properties resource bundles in cartridge/templates/resources. It shows one key at a time across every locale file of the bundle and every cartridge that ships it, so you can compare, fill, and override translations without opening each file
Open the editor
The editor is registered for **/cartridge/templates/resources/*.properties as an optional editor, so these files still open as text by default. Open the bundle editor from any of these places:
- Open Resource Bundle Editor in the editor title bar of a
.propertiesfile incartridge/templates/resources - Open Resource Bundle Editor in the Command Palette, while such a file is active
- Reopen Editor With... in the Command Palette, then SFCC Resource Bundle Editor
- The N localizations Code Lens above a key in the text editor, which opens the editor with that key selected
Opening any locale file opens the whole bundle. checkout_de_DE.properties opens as checkout.properties, with the default file and every locale of the bundle side by side
When no suitable file is active, the command warns No SFCC resource .properties file is active. Files outside cartridge/templates/resources, or files that are not saved on disk, reopen in the text editor
Layout
The header shows the bundle name, an Unsaved badge while edits are pending, and the key actions: Rename key, Delete key, Create locale file, Copy key, and Open source
The key sidebar on the left lists every key of the bundle. Each row can carry three markers:
| Marker | Meaning |
|---|---|
| Usage count | How often scripts and ISML templates use the key |
| Yellow dot | A missing or empty value in one or more locale files |
| Violet dot | A value overridden by a higher-priority cartridge |
The sidebar toolbar shapes the list:
| Control | What it does |
|---|---|
| Add key | Adds a key to the bundle, see Manage keys and locale files |
| Sort A-Z | Sorts keys alphabetically instead of in file order |
| By Prefixes | Groups keys into folders by a separator, . by default. A collapse or expand all button appears while grouping is on |
| Show incomplete only | Lists only keys with a yellow dot |
| Show overridden only | Lists only keys with a violet dot |
| Focus selected key in sidebar | Scrolls the list to the selected key and clears a search or filter that hides it |
| Refresh | Reloads the bundle from disk and discards unsaved edits |
| Resource Bundle editor settings | Opens checkboxes for the same view options plus the Group separator: ., _, /, or a custom value |
Search keys filters by key or group name, ignoring case, and the counter under it reads visible of total. Grouping starts on, sorting off, and the separator . each time the editor opens
Drag the splitter between the sidebar and the values to resize the sidebar, or focus it and use the arrow keys, Home, and End. The width is remembered
Values across cartridges
The value panel shows the selected key, a N usages button, and one group for each cartridge that ships the bundle. Cartridges are listed by priority: with a B2C Scope selected, the cartridges of its cartridge path come first in path order, followed by the cartridge of the opened file and the other linked cartridges
A group header shows the cartridge's position, its name, Current for the cartridge of the opened file, the file count, and the cartridge path. Inside it, the default file comes first, then each locale. Every locale card names its file and locale, such as Default, German, or German (Germany), and has an Open raw button that opens the file in the text editor
| Badge | Meaning |
|---|---|
| Missing | The file has no line for the key |
| Empty | The file defines the key without a value |
| Overridden by [cartridge] | A cartridge earlier in the order defines the key in the same locale file, so this value is not the one that wins |
Overrides compare files of the exact same locale. The editor does not simulate locale fallback, so a key missing from checkout_de_DE.properties shows Missing even when checkout_de.properties defines it
Edit values
Type in a locale card to change its value. Typing in a Missing card adds key=value to that file, and clearing a value leaves key=, which shows as Empty
Edits stay in memory until you save. The tab shows the unsaved dot and the header shows Unsaved. File: Save writes every changed file of the bundle as UTF-8, and File: Revert File reloads them from disk
- The editor has no undo history of its own, and hot exit does not keep its unsaved edits, so save before you close VS Code
- Open source reopens the file in the text editor and closes the bundle editor. Save first to keep your edits
- Backslashes, line breaks, tabs, and a leading space are written as
\\,\n,\r,\t, and\.\uXXXXescapes are decoded when a file is read, but never written. Values continued over several lines with a trailing\are not supported
Manage keys and locale files
| Action | Where | What happens |
|---|---|---|
| Add key | Sidebar toolbar | Asks for the Property key, then the Default value. The key is added to every loaded file of every cartridge: default files get the value, locale files get it empty |
| Rename key | Header | Asks for the New property key and renames the key in every loaded file of every cartridge |
| Delete key | Header | Confirms Delete <key> from all locale files? and removes the key from every cartridge |
| Create locale file | Header, or Create Properties Locale File in the Command Palette | Asks for a locale suffix such as de or de_DE, then writes <bundle>_<locale>.properties to the current cartridge with an empty value for every key |
| Copy key | Header | Copies the selected key to the clipboard |
Add key, Rename key, and Delete key change every cartridge that ships the bundle, including base cartridges such as
app_storefront_base. Rename key and Delete key do not update Resource.msg calls, so check the key's usages first
Add, rename, and delete are pending edits until you save. Create locale file writes the new file to disk right away and shows Locale file created.
- A key that already exists is refused with
Property key already exists: <key> - The locale suffix is normalized, so
de-debecomesde_DE, and it must start with a supported language code. An existing file is refused withLocale file already exists - Running Create Properties Locale File without an open bundle warns
Open a properties resource bundle before creating a locale file.
Find usages
The N usages button opens the Usages list of the selected key. Each row shows the file, line and column, path, and source line, and a click opens that spot. Keys without usages show No usages found.
Counts come from the language server's index of controllers, scripts, and templates, and refresh while you edit code, without reloading the bundle. Only literal keys are counted, so a key built at runtime shows fewer usages than it has
Code Lens in the text editor
In the text editor, every key of a resource file gets two lenses. N usages peeks the Resource.msg and Resource.msgf calls of the key, and N localizations opens this editor with the key selected. See Code Lens for the details
Search Properties
Search Properties in the Command Palette, or the Properties button in the title bar of the other SFCC searches, finds a key across every bundle:
- Pick a key in Properties (N). Each item shows its bundle and locales
- Pick a declaration in [key] property declarations. Each row shows the value, locale, cartridge, and file. Enter opens the file at the key, References peeks the usages, and Localizations peeks every file that defines the key
Resource.msg code assistance
The language server completes resource keys and bundle names in Resource.msg and Resource.msgf calls, in scripts and in ISML:
- The first argument completes keys from every bundle, the second argument completes bundle names
- Go to Definition on a key opens its declarations in the named bundle, and on a bundle name opens the bundle's files
- Find All References on a key lists every call that uses it
Two settings define which calls and arguments count, see Settings:
| Setting | Default |
|---|---|
intellij-sfcc.completions.resources.properties | [{"methods": ["msg", "msgf"], "paramIndex": 0}] |
intellij-sfcc.completions.resources.bundles | [{"methods": ["msg", "msgf"], "paramIndex": 1}] |
Keys that do not exist are not reported as problems. For how templates resolve bundles across cartridges, see Templates and localized resources
Access
The Resource Bundle Editor, its Code Lens, Search Properties, and the language server features need Intellij SFCC access through a trial, a personal subscription, or an organization seat. Without it, the editor shows Intellij SFCC access required with the button for your next step (Sign In, Choose a Plan, Renew Subscription or View Assigned Seat, and Open Dashboard when access could not be checked), Sync Access once you are signed in, and Open source