https://github.com/macabeus/vscode-fluent
π¬ VS Code extension to work with Fluent, the correct-by-design l10n programming language
https://github.com/macabeus/vscode-fluent
fluent hacktoberfest i10n i18n internacionalization localization vscode-extension
Last synced: 5 months ago
JSON representation
π¬ VS Code extension to work with Fluent, the correct-by-design l10n programming language
- Host: GitHub
- URL: https://github.com/macabeus/vscode-fluent
- Owner: macabeus
- License: mit
- Created: 2020-04-11T11:46:44.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-14T23:26:18.000Z (over 1 year ago)
- Last Synced: 2024-05-15T18:28:32.094Z (over 1 year ago)
- Topics: fluent, hacktoberfest, i10n, i18n, internacionalization, localization, vscode-extension
- Language: TypeScript
- Homepage:
- Size: 9.87 MB
- Stars: 36
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# vscode-fluent
> π¬ VS Code extension to work with Fluent, the correct-by-design l10n programming language
[](https://github.com/macabeus/vscode-fluent)
[](https://github.com/macabeus/vscode-fluent)
[](https://marketplace.visualstudio.com/items?itemName=macabeus.vscode-fluent)
**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.
- π [Official Fluent's website](https://projectfluent.org/)
- π [Fluent Syntax Guide](https://www.projectfluent.org/fluent/guide/)
- π’ [Fluent's Playground](https://projectfluent.org/play/)
- π₯ Talk about localization and Fluent
- [πΊπΈ In English](https://youtu.be/kHHFcuQq70k?t=357)
- [π§π· In Portuguese](https://youtu.be/nJnAVUIyf5U?t=76)
## 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](./syntaxes/fluent.tmLanguage.yml). 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.