@@ -4126,3 +4126,8 @@ The Home Assistant container will get preconfigured during first initialization,
|
|||||||
1. Use the same version number for the release title and tag.
|
1. Use the same version number for the release title and tag.
|
||||||
1. Choose 'This is a pre-release' for a beta version.
|
1. Choose 'This is a pre-release' for a beta version.
|
||||||
1. Hit 'Publish release'.
|
1. Hit 'Publish release'.
|
||||||
|
|
||||||
|
### Translations
|
||||||
|
[](https://inlang.com/editor/github.com/dermotduffy/frigate-hass-card?ref=badge)
|
||||||
|
|
||||||
|
To add translations, you can manually edit the JSON translation files in `src/localize/languages`, use the [inlang](https://inlang.com/) online editor, or run `yarn machine-translate` to add missing translations using AI from Inlang.
|
||||||
|
|||||||
+13
-24
@@ -1,28 +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/dist/index.js"
|
"https://cdn.jsdelivr.net/gh/samuelstroschein/inlang-plugin-json@2/dist/index.js"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { standardLintRules } = await env.$import(
|
const { default: standardLintRules } = await env.$import(
|
||||||
"https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@1/dist/index.js"
|
"https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js"
|
||||||
);
|
);
|
||||||
|
|
||||||
const pluginConfig = {
|
return {
|
||||||
pathPattern: "./src/localize/languages/{language}.json",
|
referenceLanguage: 'en',
|
||||||
};
|
plugins: [pluginJson({
|
||||||
|
pathPattern: "./src/localize/languages/{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()],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user