Skip to content

Commit a2e0b4b

Browse files
Merge branch 'main' of https://github.com/opral/inlang
2 parents 2bc00e3 + 7ad8629 commit a2e0b4b

File tree

12 files changed

+386
-123
lines changed

12 files changed

+386
-123
lines changed

packages/plugins/i18next/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: i18next Plugin for Inlang - Translation Management
3+
description: Connect your i18next JSON translation files to your inlang project. Use Fink for translation management, Sherlock for inline previews, and CLI for linting.
4+
og:image: https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@latest/assets/banner.svg
5+
---
6+
17
# i18next Plugin for Inlang
28

39
This plugin enables your inlang project to read and write [i18next](https://inlang.com/m/kl95463j) translation files.
@@ -258,7 +264,3 @@ Run the following commands in your terminal (node and npm must be installed):
258264
2. `npm run dev`
259265
260266
`npm run dev` will start the development environment which automatically compiles the [src/index.ts](#getting-started) files to JavaScript ([dist/index.js](#getting-started)), runs tests defined in `*.test.ts` files and watches changes.
261-
262-
---
263-
264-
_Is something unclear or do you have questions? Reach out to us in our [Discord channel](https://discord.gg/gdMPPWy57R) or open a [Discussion](https://github.com/opral/inlang/discussions) or an [Issue](https://github.com/opral/inlang/issues) on [Github](https://github.com/opral/inlang)._

packages/plugins/json/README.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# What does this plugin do?
1+
# JSON Plugin for Inlang
2+
3+
> **Deprecated:** This plugin is deprecated in favor of the [inlang message format plugin](https://inlang.com/m/reootnfj/plugin-inlang-messageFormat), which provides a simpler, more robust solution.
24
35
This plugin is a general purpose plugin to read and write messages of json files.
46

57
> The plugin uses the inlang SDK v1 API but can be used in V2 projects.
68
>
7-
> A slight difference is that `languageTag` is called `locale` in v2 projects. Use `languageTag` for this plugin.
9+
> A slight difference is that `languageTag` is called `locale` in v2 projects. Use `languageTag` for this plugin.
810
911
## Manual Installation
1012

@@ -121,18 +123,6 @@ An array of strings that are used to ignore certain files. The strings are match
121123
122124
The message IDs are sorted in the order in which they appear in the sourceLanguage file. The nesting or flattening of IDs is detected on a file-by-file basis. If the sourceLanguage file contains nested IDs, the plugin will also create nested IDs in the targetLanguage files. If the sourceLanguage file contains flattened IDs, the plugin will also create flattened IDs in the targetLanguage files.
123125
124-
# Supercharge your i18n workflow by installing the Inlang Visual Studio Code extension (Sherlock)
125-
126-
The plugin can be used with [Sherlock - VS Code extension](https://inlang.com/m/r7kp499g/app-inlang-ideExtension) to extract keys from your code, display inline annotations, have quality checks with [lint rules](https://inlang.com/c/lint-rules) & more. There are only 2 steps to get started:
127-
128-
1. Install: [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=inlang.vs-code-extension).
129-
2. Add the correct syntax matcher:
130-
- [m function matcher](https://inlang.com/m/632iow21/plugin-inlang-mFunctionMatcher) or
131-
- [t function matcher](https://inlang.com/m/698iow33/plugin-inlang-tFunctionMatcher)
132-
3. Optional: Add lint rules: https://inlang.com/c/lint-rules
133-
4. 🎉 Done!
134-
135-
136126
# Contributing
137127
138128
## Getting started
@@ -143,15 +133,3 @@ Run the following commands in your terminal (node and npm must be installed):
143133
2. `npm run dev`
144134
145135
`npm run dev` will start the development environment which automatically compiles the [src/index.ts](#getting-started) files to JavaScript ([dist/index.js](#getting-started)), runs tests defined in `*.test.ts` files and watches changes.
146-
147-
## Publishing
148-
149-
Run `npm run build` to generate a build.
150-
151-
The [dist](./dist/) directory is used to distribute the plugin directly via CDN like [jsDelivr](https://www.jsdelivr.com/). Using a CDN works because the inlang config uses dynamic imports to import plugins.
152-
153-
Read the [jsDelivr documentation](https://www.jsdelivr.com/?docs=gh) on importing from GitHub.
154-
155-
---
156-
157-
_Is something unclear or do you have questions? Reach out to us in our [Discord channel](https://discord.gg/gdMPPWy57R) or open a [Discussion](https://github.com/opral/inlang/discussions) or an [Issue](https://github.com/opral/inlang/issues) on [Github](https://github.com/opral/inlang)._

packages/plugins/json/marketplace-manifest.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
"id": "plugin.inlang.json",
44
"icon": "./assets/icon.png",
55
"displayName": {
6-
"en": "JSON translation files"
6+
"en": "JSON translation files (Deprecated)"
77
},
88
"description": {
9-
"en": "This plugin enables using JSON files for messages. It is not library specific and can be used with any framework."
9+
"en": "Deprecated: Use the inlang message format plugin instead. This plugin enables using JSON files for messages."
10+
},
11+
"deprecated": {
12+
"reason": "Use the inlang message format plugin instead.",
13+
"replacement": "plugin.inlang.messageFormat"
1014
},
1115
"pages": {
1216
"/": "./README.md",
Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,49 @@
1-
### Introduction
1+
---
2+
title: m Function Matcher - Paraglide JS Integration for Sherlock
3+
description: Enable inline translation previews and linting for Paraglide JS m.message() function calls in VS Code with Sherlock.
4+
og:image: https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/assets/sherlock-preview.svg
5+
---
26

3-
This plugin provides the integration for [Paraglide JS](https://inlang.com/m/gerre34r/library-inlang-paraglideJs)` into the inlang Visual Studio Code extension (Sherlock). It allows you to extract messages from your code, view them inline in the text editor, and get lints for your messages.
7+
# m Function Matcher for Sherlock
48

5-
Match examples:
6-
```ts
7-
m.myMessage()
8-
```
9-
```ts
10-
m.another_message()
11-
```
9+
This plugin enables [Sherlock](https://inlang.com/m/r7kp499g/app-inlang-ideExtension) (VS Code extension) to recognize `m.message()` function calls used by [Paraglide JS](https://inlang.com/m/gerre34r/library-inlang-paraglideJs).
1210

11+
![Sherlock inline preview](https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/assets/sherlock-preview.svg)
1312

14-
### Usage
13+
## What it does
1514

16-
The plugin will automatically extract messages from your code and show them inline in the editor. You can then click on the message to open the web editor and translate the message.
15+
- **Inline previews**: See translations directly in your code editor
16+
- **Message extraction**: Extract hardcoded strings into messages
17+
- **Linting**: Get warnings for missing or invalid message references
1718

18-
1. Install the [Visual Studio Code extension (Sherlock)](https://inlang.com/m/r7kp499g)
19-
2. Install this plugin
20-
3. ✨ See your messages appear inline in the editor
19+
## Supported file types
2120

22-
> There might be a delay before the messages appear in the editor. This is because the plugin needs to be downloaded first. If you want to make sure that everything is setup correctly, reload your workspace.
21+
- TypeScript (`.ts`, `.tsx`)
22+
- JavaScript (`.js`, `.jsx`)
23+
- Svelte (`.svelte`)
24+
- Vue (`.vue`)
25+
- Astro (`.astro`)
2326

24-
### Manual installation
27+
## Installation
2528

26-
```diff
27-
// project.inlang/settings.json
29+
Add the plugin to your `project.inlang/settings.json`:
30+
31+
```json
2832
{
29-
"modules" : [
30-
+ "https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
31-
]
33+
"modules": [
34+
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
35+
]
3236
}
3337
```
38+
39+
Then install [Sherlock](https://marketplace.visualstudio.com/items?itemName=inlang.vs-code-extension) from the VS Code marketplace.
40+
41+
## Matched patterns
42+
43+
The plugin recognizes these patterns:
44+
45+
| Pattern | Example |
46+
| -------------- | ------------------------------- |
47+
| Simple call | `m.welcome()` |
48+
| With variables | `m.greeting({ name: "World" })` |
49+
| In JSX | `{m.button_label()}` |
Lines changed: 58 additions & 0 deletions
Loading

packages/plugins/m-function-matcher/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
".": "./dist/index.js"
88
},
99
"files": [
10-
"./dist"
10+
"./dist",
11+
"./assets"
1112
],
1213
"publishConfig": {
1314
"access": "public"

0 commit comments

Comments
 (0)