opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
52 stars 1 forks source link

No warnings/indications for missing message source for `message-lint-rule-without-source` plugin #226

Closed SaintPepsi closed 2 months ago

SaintPepsi commented 2 months ago

I added the "Missing translation" Message Lint Rule to my Sveltekit project's project.inlang/settings.json file:

{
    "$schema": "https://inlang.com/schema/project-settings",
    "sourceLanguageTag": "en",
    "languageTags": ["en", "nl", "fil"],
    "modules": [
        "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js",
        "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@latest/dist/index.js",
        "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js",
        "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js",
        "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-valid-js-identifier@latest/dist/index.js",
        "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js",
        "https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
    ],
    "plugin.inlang.messageFormat": {
        "pathPattern": "./messages/{languageTag}.json"
    },
    "messageLintRuleLevels": {
        "messageLintRule.inlang.messageWithoutSource": "error",
        "messageLintRule.inlang.validJsIdentifier": "error"
    }
}

But in fink it only shows "Identical pattern"

image

When I search for a specific translation key that I know is no longer used the messages show up:

image

How does one check for translations that are no longer used in your application?

samuelstroschein commented 2 months ago

Hi @SaintPepsi,

How does one check for translations that are no longer used in your application?

See this issue https://github.com/opral/inlang-sdk/issues/6#issue-2201429189.

In regards to the missing translation rule that you used, it checks if a translation is missing. Not if a message is used in code. Closing this as a duplicate of https://github.com/opral/inlang-sdk/issues/6.