Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
VARGA-Peter opened this issue Nov 19, 2020 · 4 comments

Comments

@VARGA-Peter
Copy link

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.

@jstuop
Copy link

jstuop commented Jul 26, 2021

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.

@fijemax
Copy link

fijemax commented Oct 10, 2021

I got the same

@VARGA-Peter
Copy link
Author

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.

@acarlstein
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants