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

Implement {{int:}} magic word #211

Open
lucaswerkmeister opened this issue Apr 4, 2020 · 0 comments
Open

Implement {{int:}} magic word #211

lucaswerkmeister opened this issue Apr 4, 2020 · 0 comments

Comments

@lucaswerkmeister
Copy link
Member

I just noticed the {{int:message-key}} magic word isn’t implemented. Is there a particular reason to omit it or was it just not done yet?

Here’s a simple implementation (using modern JS syntax because I’m lazy):

$.extend( $.i18n.parser.emitter, {
	int( nodes ) {
		return $.i18n( ...nodes );
	},
} );

(It doesn’t emit “⧼xyz⧽” for undefined message keys like MediaWiki does, but jquery.i18n doesn’t seem to do that in general, so I’m not sure if its {{int:}} should.)

@wikimedia wikimedia deleted a comment from ecococox Nov 8, 2023
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

1 participant