jquery.i18n icon indicating copy to clipboard operation
jquery.i18n copied to clipboard

None existing key is replaced with the key name instead of the fallback text!

Open VARGA-Peter opened this issue 3 years ago • 4 comments

I am referring to https://github.com/wikimedia/jquery.i18n#data-api in the JQuery.i18n documentation:

<li data-i18n="message-key">Fallback text</li>

It is also possible to have the above li node with fallback text already in place.

Unfortunately I don't get this work. When I don't have message-key in the language file then JQuery.i18n displays instead of Fallback text the key: message-key

My question:

What am I doing wrong? As soon I add the key to the language file then it gets replaced, so apparently the language file is loaded correctly and also the function calls seem to work.

I posted the solution/fix on Stackoverflow.

VARGA-Peter avatar Nov 19 '20 18:11 VARGA-Peter

Hey I run into the same problem. The data-api is not working and all messages are displayed the keys instead.

However it seems the fix didn't solve the problem? After the fix, it's displaying the fallback instead of the intended messages.

jstuop avatar Jul 26 '21 18:07 jstuop

I got the same

fijemax avatar Oct 10 '21 10:10 fijemax

I got the same

Check the other issues. The developer apparently stopped maintaining it and doesn't even bother to reply. I am thinking about a fork with the fixed code but I am unfortunately too busy as I would have to "generalise" it.

I am using the library and a heavily localised project and it works very reliable. It's a pity to waste such a good project.

VARGA-Peter avatar Oct 12 '21 08:10 VARGA-Peter

Do anyone knows if this plugin as a property that prevent the text inside the element be replaced by the key, when the key isn't found?

acarlstein avatar Feb 05 '22 22:02 acarlstein