mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: update inlang.config.js (#2542)
This commit is contained in:
parent
f8f0599462
commit
ca1ce8e19e
@ -1,29 +1,17 @@
|
|||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type { import("@inlang/core/config").DefineConfig }
|
|
||||||
*/
|
|
||||||
export async function defineConfig(env) {
|
export async function defineConfig(env) {
|
||||||
const plugin = await env.$import(
|
const { default: pluginJson } = await env.$import(
|
||||||
"https://cdn.jsdelivr.net/gh/samuelstroschein/inlang-plugin-json@1.1.1/dist/index.js"
|
'https://cdn.jsdelivr.net/gh/samuelstroschein/inlang-plugin-json@2/dist/index.js'
|
||||||
);
|
);
|
||||||
|
|
||||||
const { default: standardLintRules } = await env.$import(
|
const { default: standardLintRules } = await env.$import(
|
||||||
"https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@1.1.1/dist/index.js"
|
'https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js'
|
||||||
);
|
);
|
||||||
|
|
||||||
const pluginConfig = {
|
return {
|
||||||
pathPattern: "./frontend/appflowy_flutter/assets/translations/{language}.json",
|
referenceLanguage: 'en',
|
||||||
};
|
plugins: [pluginJson({
|
||||||
|
pathPattern: './frontend/appflowy_flutter/assets/translations/{language}.json',
|
||||||
return {
|
variableReferencePattern: ["@:"]
|
||||||
referenceLanguage: "en",
|
}), standardLintRules()]
|
||||||
languages: await plugin.getLanguages({ ...env, pluginConfig }),
|
};
|
||||||
readResources: (args) => plugin.readResources({ ...args, ...env, pluginConfig }),
|
}
|
||||||
writeResources: (args) => plugin.writeResources({ ...args, ...env, pluginConfig }),
|
|
||||||
lint: {
|
|
||||||
rules: [standardLintRules()],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user