Skip to content

Implement {{int:}} magic word #211

@lucaswerkmeister

Description

@lucaswerkmeister

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions