Local repo for contributions
Find a file
Steffo 9a60537623
Separate scopes of messages, terms, and attributes
They now have, respectively, the following scopes:

- `meta.message.fluent`
	- `meta.identifier.message.fluent`
	- `keyword.operator.assignment.fluent`
	- `meta.pattern.message.fluent`

- `meta.term.fluent`
	- `punctuation.definition.term.fluent`
	- `meta.identifier.term.fluent`
	- `keyword.operator.assignment.fluent`
	- `meta.pattern.term.fluent`

- `meta.attribute.fluent`
	- `punctuation.definition.attribute.fluent`
	- `meta.identifier.attribute.fluent`
	- `keyword.operator.assignment.fluent`
	- `meta.pattern.attribute.fluent`
2025-12-24 00:44:52 +01:00
.github/workflows actions: add lint step 2024-02-29 23:33:26 +00:00
.vscode chore: auto-build syntax when building the extension 2022-07-23 21:14:00 +01:00
assets assets: add logo and fileicon 2022-07-23 21:14:00 +01:00
docs doc: update featured image 2020-10-19 00:00:04 +01:00
out extension: add hover 2020-07-20 01:48:41 +01:00
src add default value for getGroupComments 2024-05-15 00:22:33 +01:00
syntaxes Separate scopes of messages, terms, and attributes 2025-12-24 00:44:52 +01:00
tests chore: bump eslint 2024-02-29 23:33:26 +00:00
.eslintignore extension: add hover 2020-07-20 01:48:41 +01:00
.eslintrc.js chore: refac tests using jest-environment-vscode-extension 2021-12-31 15:35:21 +00:00
.gitignore chore: refac tests using jest-environment-vscode-extension 2021-12-31 15:35:21 +00:00
.vscodeignore extension: add hover 2020-07-20 01:48:41 +01:00
language-configuration.json language-configuration: add wordPattern 2020-08-09 00:50:52 +01:00
LICENSE chore: add license 2021-02-05 10:58:42 +00:00
package-lock.json chore: bump version to 1.1.0 2024-05-14 20:25:18 -03:00
package.json chore: bump version to 1.1.0 2024-05-14 20:25:18 -03:00
README.md readme: include documentation feature and fix typos 2024-05-15 00:22:33 +01:00
tsconfig.json chore: add the first tests (hover and document symbol) 2021-08-17 01:18:27 +01:00

vscode-fluent

💬 VS Code extension to work with Fluent, the correct-by-design l10n programming language

GitHub Stars Tests Visual Studio Marketplace Downloads

Fluent is a Mozilla's programming language for natural-sounding translations. And vscode-fluent is a Visual Studio Code extension to improve developer experience while working with this language.

Features

  • Syntax highlight
  • Show syntax errors
  • Code Action to extract a string to Fluent files
  • List file symbol (⇧⌘O on Mac, Ctrl+Shift+O on Linux and Windows)
  • Hover support on messages
  • Breadcrumbs support
  • Go to message definition from a reference
  • Generate documentation comments for messages

Code Action

Extract string to FTL

Using the code action "Extract to Fluent files" you can easily extract a string to from source code to all FTL files on your project.
To open the code action menu, you should select a string (including its quotes) and then type ⌘ + . (or Ctrl + .).

You can change the replacement template using the configuration vscodeFluent.replacementTemplate.

By default, the message will be added to all Fluent files on the workspace. But if you are working on a workspace with multiple projects, and each project has its Fluent files, you won't want mix messages between the projects. To avoid that, you should use the configuration vscodeFluent.projects, and add on it each projects' root path. See the below image for an instance.

How to develop vscode-fluent

Syntax

The syntax is written on a YML file. You can compile it running:

> npm run build:syntaxes

Extension

You can run the extension using the Run Extension task on VS Code.

Tests

You can run the automated tests using the Test Extension - No Workspace and Test Extension - With Workspace tasks on VS Code.