Skip to content
This repository has been archived by the owner on Jul 5, 2018. It is now read-only.

support attribute localization #59

Closed
wants to merge 1 commit into from

Conversation

jdlrobson
Copy link
Member

added data-localize-msg to jquery.localize -> allows for valid html markup,
provides a method to circumvent ie issues mentioned with and <html:msg key=""/>
added data-option-msg to jquery.localize -> provides a resolution to the issue
where jquery.localize cannot .find the msg within the elements
added to the jquery.localize embedded documentation

added data-localize-msg to jquery.localize -> allows for valid html markup,
provides a method to circumvent ie issues mentioned with <msg key=""/> and <html:msg key=""/>
added data-option-msg to jquery.localize -> provides a resolution to the issue
where jquery.localize cannot .find the msg within the <option> elements
added to the jquery.localize embedded documentation
@jdlrobson
Copy link
Member Author

OK, so I took a look at this and I'm not so keen on it.
Although I think html validation is useful to capture mistakes in markup I'm not sure what it wins us at the current time since this does not end up on the web (if it's just being able to run code through the validator then this could be achieved via replacing msg tags with span tags for example)

I would prefer a name convention data-msg for text and a generic data-msg-attributename if we were to go down this route - A comment tag may be a better way to go if the objections are with messages

Mostly I'm concerned about where jquery.localize come from? There is no license on it and it would be better for the change to be made upstream in that library. I'd hate us to run our own custom fork of it if it is still being maintained and not pick up any future updates.

@yuvipanda
Copy link
Contributor

jquery.localize came from mediawiki's resources/jquery/jquery.localize.js, written mostly by Krinkle and Trevor (with contribs by brion and werdna). And +1 on not forking it.

@yuvipanda
Copy link
Contributor

Closing pull req, since we don't want to fork from upstream.

@yuvipanda yuvipanda closed this Jul 19, 2012
@jdlrobson
Copy link
Member Author

Here is the library:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=resources/jquery/jquery.localize.js;h=27cae292bf69a88b92e1d444d7f7784a789c090f;hb=HEAD

We should start conversations / submit pull requests for

  • broken option tags
  • html validation
  • localising placeholder attribute
  • getting html out of a msg tag in the html rather than having to resort to javascript

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

Successfully merging this pull request may close these issues.

None yet

3 participants