Commit graph

5253 commits

Author SHA1 Message Date
Subramanya Sastry 6dcfba79fa Dont set TSR on ref-end-meta-tags if incoming TSR is missing.
* Setting tsr to (endTsr || [null, text.length]) was causing
  serious duplication of rt-src on the following page:
    en:Almirante Latorre-class battleship
  This is the case for ref-tokens that come from templates
  which have their TSR stripped.  So, we shouldn't attempt
  to set it to [null, text.length] again.
* No change in parserTests.
* No change in errors for en:L'Opéra national de Paris.

Change-Id: If6a79638c349c9a3fab42094aad51e2e476f9632
2012-11-01 13:25:08 -05:00
Gabriel Wicke 2a774f0720 Set proper TSR on cite expansion output end meta
Also remove the src, as we re-set it based on DSR anyway.

No change in parserTests, but three less diffs in L'Opéra national de Paris.

Change-Id: Ia6784efe7d76c41f24a183465393bda78641a8eb
2012-10-31 16:43:28 -07:00
Gabriel Wicke a884a28b09 Deep-freeze cache returns and enable strict mode
This exposed a few bugs (primarily missing var declarations), which are fixed.
It would for example have caught the shallow clone bug we just fixed, and
should catch similar bugs early in the future.

TODO / issues this exposed:
Avoid attempted tsr modification in ext.core.TemplateHandler.js:306:29. This
is fixed for now by cloning the tokens, but should really be avoided by
stripping the tsr before caching the tokens (anything in phase 1 will work for
example).

Change-Id: I6a1a07de7ac333f31da9cf0ae9ed20e5507bacba
2012-10-30 12:53:27 -07:00
Subramanya Sastry 7aad9fc1b7 Enable RT-ing of references tag if page has no refs/citations.
* There was a fixme for this in ext.Cite.js which was triggering
  an error in the serializer and introducing rt-diffs.
* No change in parser tests.
* Eliminates semantic error in en:Birkenhauer Island and other
  pages.

Change-Id: I9fe6ea26fdf1859d751b02a288393af610be5474
2012-10-29 12:10:40 -05:00
Translation updater bot bf9bc7d8ef Localisation updates from http://translatewiki.net.
Change-Id: I235f6c2d100db0688125cfaa119df80c202f702b
2012-10-28 21:07:12 +00:00
Translation updater bot 481e47c644 Localisation updates from http://translatewiki.net.
Change-Id: I3a579e1c719991e956c0be16cc6beb0828195eed
2012-10-26 19:38:21 +00:00
Translation updater bot 9e2baf7ce8 Localisation updates from http://translatewiki.net.
Change-Id: Ie727b359ff23904a19bd33ebec136e11b6418bf5
2012-10-24 20:00:58 +00:00
Ori.livneh 5a8c11107b Merge "Cite anchors should be numbered starting at 1" 2012-10-23 17:10:58 +00:00
Siebrand 173be7bbd4 Merge "Removing obsoleted system message" 2012-10-22 09:49:08 +00:00
Translation updater bot 0fd657833a Localisation updates from http://translatewiki.net.
Change-Id: I6b9dcda25eb103be880014a7148d55261ef5d3db
2012-10-22 01:09:52 +00:00
kghbln a44624f1a1 Removing obsoleted system message
* removed system message which was obsoleted by its de fallback

Change-Id: Ie5425658ee46cc40c68438156ed7380a6df4d279
2012-10-21 22:57:03 +02:00
eranroz da8e6f3b45 Cite anchors should be numbered starting at 1
Fix for bug 10537: Cite anchors should be numbered starting at 1
On the way a small refactoring (getting rid of redundant variable)

Change-Id: Iee94917f3f860516cc310d1cdb1c4f9065d40984
2012-10-18 01:03:31 +02:00
Mark Holmquist d39d4fa9e8 Modularizing the roundtrip-testing code
In response to comments on change I55c31a83, I've made things a bit
more modular.

Change-Id: I462dca175f26bc22e18a357831167358c63eefe0
2012-10-12 21:28:03 +00:00
Translation updater bot 1cf2f35412 Localisation updates from http://translatewiki.net.
Change-Id: Icb2e173920f6b014592cb879597620c731dfe24c
2012-10-12 21:16:03 +00:00
Translation updater bot 1b74ed0875 Localisation updates from http://translatewiki.net.
Change-Id: Id20c5041abb3588a252395966cc675ce8c02ae5c
2012-10-02 13:37:06 +00:00
Translation updater bot 3f6f911d84 Localisation updates from http://translatewiki.net.
Change-Id: I9bd8e87140f7b16230a10fbb1cecb10592761e88
2012-09-30 19:17:21 +00:00
Translation updater bot 26be18442c Localisation updates from http://translatewiki.net.
Change-Id: I6aeb459a4c9cee312e27182604445553463b1648
2012-09-27 20:59:37 +00:00
Translation updater bot f6fbdb26cf Localisation updates from http://translatewiki.net.
Change-Id: I7554803fd423f43cd7c0f657e485002b0c9afed6
2012-09-26 19:41:35 +00:00
Siebrand Mazeland 10650dd977 More updates suggested by JSHint/JSLint.
Also removed some superfluous newlines.

Change-Id: I4014888383d6500fa14030e37b4aba17d2082cf2
2012-09-25 16:35:56 -07:00
Translation updater bot 4fefe6fcbd Localisation updates from http://translatewiki.net.
Change-Id: I0e45db33d35523a7d703cc02a65518a21439d8d8
2012-09-25 19:41:47 +00:00
Translation updater bot 9a69b3bfdc Localisation updates from http://translatewiki.net.
Change-Id: I6198d3fea80134e26b4d94cca36525866973b04e
2012-09-23 19:01:45 +00:00
Subramanya Sastry 760d63d033 Improved template roundtripping based on WT ranges on DOM nodes.
- Fixed several bugs in the DSR computation.
- Deleted comment tokens from template output.
- Eliminated TSR info from template output.
- Rearranged order of DOM post passes.
- Updated template encapsulation to use DSR values.
- There are still a few missing pieces and scenarios that are
  not handled properly.

Change-Id: I644914902ec1d27418138b107abe765f81178398
2012-09-17 21:08:35 -05:00
Translation updater bot 3c307d67a4 Localisation updates from http://translatewiki.net.
Change-Id: I618496f94bdba101b8269d72bba82a9e54cca613
2012-09-16 19:52:48 +00:00
Translation updater bot fc8e405ef4 Localisation updates from http://translatewiki.net.
Change-Id: I2ee7ba5141b6f116769839d9b675ed6766ec62be
2012-09-14 21:07:44 +00:00
Subramanya Sastry 0520effd3d JSHint fixes only.
Change-Id: I8ad4e283685ab460802e69e21504ddc241985f80
2012-09-12 12:06:48 -05:00
Translation updater bot f07fd8faf4 Localisation updates from http://translatewiki.net.
Change-Id: Id8f1244093cd5f48da472eb4c04a989b9c95484a
2012-09-11 19:33:14 +00:00
Translation updater bot 52d16feb5e Localisation updates from http://translatewiki.net.
Change-Id: Iebc856f93ac8409c8038b3e6690927d924d65682
2012-09-10 19:27:21 +00:00
Translation updater bot 6753ef88ba Localisation updates from http://translatewiki.net.
Change-Id: Id43f3733f8ac4bcbca4e01dad41e35bef8849272
2012-09-09 19:31:44 +00:00
Translation updater bot c0aa5aa9f6 Localisation updates from http://translatewiki.net.
Change-Id: I57ba0d0a4e40feefc0377aee17a253305f1b810e
2012-09-08 18:58:34 +00:00
raymond 7cfecee646 Bug 40101 - Add <code> tags to MediaWiki:Cite_error_included_ref
Change-Id: I8e18b0ab9e5e12fa8d93a8e1f18da16f7d6a906c
2012-09-08 10:59:32 +02:00
Subramanya Sastry dbd628fd87 Added getWTSource convenience method to tokens.
Change-Id: I8c99fcd4ccefbae62a1639e5738fe2d4c88f122a
2012-09-06 09:29:38 -07:00
Subramanya Sastry 67326f063a Check if tsr is present in references tokens before generating src rt-info.
* Only one instance of Cite handler is created and it deals with the
  final expanded token stream.  So, effectively there is no information
  about whether we are processing in a top-level or nested template
  context.  So, we instead use tsr.

Change-Id: I002f421fc78576e869cc8fbcdc386ef0abb09ca9
2012-09-05 19:48:08 -05:00
Translation updater bot 45162861c3 Localisation updates from http://translatewiki.net.
Change-Id: I1f891e3b063132ba8139eb8f43804ac35c64a8cd
2012-09-05 19:16:54 +00:00
Subramanya Sastry d3f0007f1b Updates to the references tag rt-ing to get rid of FIXMEs.
Change-Id: I8b832925ad476fb8043f9beb1e39e6efb27ea336
2012-09-04 20:53:33 -05:00
Subramanya Sastry 23f3e0f1aa RT references extension tag.
Change-Id: Ibd1be584e17814a84154549b7bc353465734b847
2012-09-04 20:07:26 -05:00
Subramanya Sastry ca04fdc293 Experimental ref-tag support (for demoing purposes).
* Added template-wrapping information in cite-expansion with
  Object/Ext/Cite RDFa type.
* Added 'ref' tag to whitelisted tags (temporary workaround to
  let <ref name='blah' /> to RT correctly till we handle this
  properly).
* Added support for self-closing, but non-void tags.
* Deleted Object/Template/Content type attribute since it was
  not used.
* Renamed Object/Template/Attributes to ExpandedAttrs/Template
  to distinguish template attribute code paths from content
  code paths -- could possibly be renamed to something more
  suitable later on.

Results:
- With this experimental support, RT diffs on the en:Barack_Obama
  page are vastly reduced.

Change-Id: I018f03df102764d3e39442ae359b751056a38c2f
2012-09-04 18:51:29 -05:00
Translation updater bot 1c8e192c5f Localisation updates from http://translatewiki.net.
Change-Id: I795c7a905487e948264fe8c521706b2818080e80
2012-09-02 20:32:26 +00:00
IAlex aceed48f9e Merge "Maintenance for Cite extension." 2012-09-01 09:25:22 +00:00
Translation updater bot 9d5b2d2dce Localisation updates from http://translatewiki.net.
Change-Id: I9fe6fe1f047f9becb0a90a3c6625afdd5663121e
2012-08-30 19:39:00 +00:00
Siebrand Mazeland 52ca5a1a5a Maintenance for Cite extension.
* Update deprecated calls.
* Remove superfluous newlines.
* Add @todo where uncertain.

Change-Id: Ifc79b199fa551c23fafa190664688c8320059338
2012-08-30 10:41:27 +02:00
Translation updater bot ae23c3e448 Localisation updates from http://translatewiki.net.
Change-Id: Id54a6dfbc91dab7a95a7e15a4ae3caf5e2ae2493
2012-08-29 19:21:15 +00:00
Tim Starling f5ba49d3e6 Fix Cite/CategoryTree parser test
Apparently the initial space in the class name and the double-escaping
of the JSON were both fixed at some point in the past. I haven't tracked
it down, but the change looks beneficial on the face of it.

Change-Id: Ibb30789093bfec8b4e6399e3a97629c6b876a616
2012-08-28 16:40:38 +10:00
Subramanya Sastry f733af93c4 Code cleanup.
* Moved tokensToString and KVtoHash from parser.environment
  to Util -- got rid of excessive warnings from tokensToString.
* Replaced used of Util.lookupKV(blah).v with Util.lookup(blah)

Change-Id: Ic48d5d0c79045b9789dc61a2b14df3fc2acf7aa5
2012-08-24 15:29:53 -05:00
Translation updater bot 6acd4d212f Localisation updates from http://translatewiki.net.
Change-Id: I27fd61c850baf8a96844338c5c933a2710d5b2a1
2012-08-24 19:37:11 +00:00
Siebrand fd39213887 Merge "Follow-up I47412b67: pass an array of query parameters to Linker::link()" 2012-08-21 19:06:19 +00:00
Subramanya Sastry 2d15258803 Fixed template meta-wrapping to handle nesting and attributes.
* Nested parser functions are no longer meta-wrapped similar to
  nested templates.
* HTML attributes which derive all or part of their key/value
  from a template are not template-wrapped, but are marked to
  be tracked via different rdfa meta attributes.  The actual
  tracking and addition of new meta attrs. is yet to be
  implemented.
* Parser pipeline construction updated to use an options object
  rather than individual option args -- used to support the two
  features above.
* With this fix, we can now distinguish between the following
  scenarios:

  Templates:
  - {{echo|[[Foo|bar]]}} -- regular wrapping of the entire link
  - [[{{echo|Foo}}|bar]] -- no wrapping, but href marked for tracking
  - [[Foo|{{echo|bar}}]] -- link text is wrapped.

  Parser functions:
  - {{uc:foo}} -- regular wrapping.
  - {{uc:{{lc:{{uc:foo}}}}}} -- only the top-level parser function
    is wrapped, the nested lc and uc parser functions are not.

Change-Id: I512b8de9838ad42d9255ebcd73074b3898294cd8
2012-08-19 15:21:36 -05:00
Translation updater bot 91c4622aaa Localisation updates from http://translatewiki.net.
Change-Id: I9bdc4af5eb1fafb7b3fb16a23e91a6ef914ee00b
2012-08-19 14:43:28 +00:00
Translation updater bot 9ec55a0757 Localisation updates from http://translatewiki.net.
Change-Id: I04c11f3bddee100be01f5d7a0138efc582072404
2012-08-17 12:59:10 +00:00
Translation updater bot ebeff5867d Localisation updates from http://translatewiki.net.
Change-Id: I3661968d5cead1e6c85a3736e4c5dc73bb45710c
2012-08-16 20:20:26 +00:00
Translation updater bot 96dac587fc Localisation updates from http://translatewiki.net.
Change-Id: I1f17400774b5f4b227b9c9fe94998673296b6687
2012-08-15 19:47:24 +00:00