lokalise / i18n-ally-jetbrains-docs

6 stars 4 forks source link

i18n-ally thinks this is a hard coded string, but shouldn't #34

Open abodnar opened 1 year ago

abodnar commented 1 year ago

HI,

Currently working on a React application and I have this piece of code. i18n-ally is complaining that the {icon} part is a hard coded string. But seems like it shouldn't be complaining about it since it's a variable(SVG actually). If I remove {icon} the alert goes away.

        <button className="btn-link" type="button" onClick={onClick}>
            <span className="inline-flex h-7 w-7 items-center rounded-lg bg-transparent p-1.5 text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-500 dark:hover:text-white">
                {icon}
                <span className="sr-only">{label}</span>
            </span>
        </button>

Am I doing something wrong or is this a bug?