Commit graph

3841 commits

Author SHA1 Message Date
jenkins-bot 2f7ba9997d Merge "Rollback all, then redo all, when fixing out-of-order tags; not one-by-one" 2016-02-02 20:36:50 +00:00
Bartosz Dziewoński e116699480 Rollback all, then redo all, when fixing out-of-order tags; not one-by-one
Imagine the following wikitext:

  <ref name=r/>
  <references>
  <ref name=r>A</ref>
  <ref name=r>B</ref>
  </references>

This is simple. Cite would see these as the following operations, in
order:

1. Use only:       <ref name=r/>
2. References block
3. Define only:    <ref name=r>A</ref>
4. Define only:    <ref name=r>B</ref>

<ref name=r> is defined twice with different content and we get an
error message.

Now, imagine the following wikitext:

  <ref name=r/>
  {{#tag:references|
  <ref name=r>A</ref>
  <ref name=r>B</ref>
  }}

Cite would see these as the following operations, in order:
1. Use only:       <ref name=r/>
2. Use and define: <ref name=r>A</ref>
3. Use and define: <ref name=r>B</ref>
4. References block

When the 'references' block appears, Cite notices that the tag has
parsed content, and deduces that it was called with #tag. We need to
undo the last operations to update internal bookkeeping, as the last
two 'ref' tags do not actually represent ref usages, as we assumed,
but only definitions.

5. Undo:          <ref name=r> reused
6. Define only:   <ref name=r>B</ref>
7. Undo:          <ref name=r> defined
(Right now, it appears to Cite that <ref name=r> was never defined!)
8. Define only: <ref name=r>A</ref>

Thus we get no errors, although we should.

This patch changes the order of the rollback operations:

5. Undo:          <ref name=r> reused
6. Undo:          <ref name=r> defined
7. Define only:   <ref name=r>A</ref>
8. Define only:   <ref name=r>B</ref>

Aha! <ref name=r> is defined twice with different content! We get an
error correctly.

Bug: T124227
Change-Id: I61766c4104856323987cca9a5e4ff85a76b3618b
2016-02-02 21:21:30 +01:00
Translation updater bot 9ff9da3b45 Localisation updates from https://translatewiki.net.
Change-Id: I9c1d78c8a99234aecc0f8ae935659bdb7efdd8d8
2016-01-29 22:40:21 +01:00
Translation updater bot 56ce70cf71 Localisation updates from https://translatewiki.net.
Change-Id: Ia7b63e33dfc0d48bc1fd0ac0fea9a331b211cb3e
2016-01-27 21:39:04 +01:00
Translation updater bot c509bfa9ac Localisation updates from https://translatewiki.net.
Change-Id: I42a3bdf5b6adc5cd6ca002aec859f5e2521a6518
2016-01-25 22:28:39 +01:00
Translation updater bot 7b70ded3e0 Localisation updates from https://translatewiki.net.
Change-Id: If244499b6fc7824b0a6c14e65be0d5be72641898
2016-01-24 21:19:23 +01:00
Translation updater bot e6a6162fb9 Localisation updates from https://translatewiki.net.
Change-Id: I3f24b447054f73f1ab7505af66343d9501113eba
2016-01-23 22:24:25 +01:00
Translation updater bot 9b65d63af6 Localisation updates from https://translatewiki.net.
Change-Id: I853eae9b1b1145bb0732e46f04d5a18ff7723d30
2016-01-21 21:54:23 +01:00
Translation updater bot f42e769174 Localisation updates from https://translatewiki.net.
Change-Id: I021f89a195bf6e0a6da78f0354a27e72dcb3fd4d
2016-01-20 21:05:43 +01:00
PiRSquared17 739962b6d1 Add reference list to section preview if missing
For a section preview with missing <references/> tag,
add reference lists for each group.

Bug: T7984
Change-Id: I2ca1b62fc068b20b7df4b0af2e3e79535e656259
2016-01-20 04:25:46 +00:00
Translation updater bot 48d325a7c4 Localisation updates from https://translatewiki.net.
Change-Id: Idb4031f7d422d9daed6602d4d9577c7af13a74dc
2016-01-14 22:22:11 +01:00
Translation updater bot c8b55e8773 Localisation updates from https://translatewiki.net.
Change-Id: I486ffd06e8ea8c91f0b057e6a2a2a80533203a17
2016-01-11 22:49:42 +01:00
Translation updater bot e26565feba Localisation updates from https://translatewiki.net.
Change-Id: I97d9987a2f447749ff8abef5aad606e41cd5b550
2016-01-08 22:16:58 +01:00
Kunal Mehta 55080cb5ed Display Cite errors in the user language
To make debugging easier when something goes wrong, display Cite errors
in the user language. This will fragment the parser cache, but since
these errors should be rate to not make this a problem.

Bug: T33216
Change-Id: I0f116f6da4b8f07b34f7d122458b6e23f542d468
2016-01-06 12:48:33 -08:00
Kunal Mehta d233a8811e build: Updating development dependencies
* jakub-onderka/php-parallel-lint: 0.9 → 0.9.2

Change-Id: I1d0187333bdb72adec7ab3f434090660e3837c6f
2016-01-05 10:32:19 -08:00
Kunal Mehta f523d48edd build: Updating development dependencies
* mediawiki/mediawiki-codesniffer: 0.5.0 → 0.5.1

Change-Id: I698cedf81bfbd282176b765b170f969d4a5b956c
2016-01-03 18:46:02 -08:00
Translation updater bot e33f6c31dc Localisation updates from https://translatewiki.net.
Change-Id: Ic4a9eed8a484b2974eeb3843beee8a20922a1f1c
2016-01-03 21:40:22 +01:00
Translation updater bot 1cd2513c85 Localisation updates from https://translatewiki.net.
Change-Id: I4e6ca2e9857fda215568b47af465f00f8243947c
2016-01-01 20:00:39 +01:00
Kunal Mehta 24382d883d build: Updating development dependencies
* grunt-jsonlint: 1.0.6 → 1.0.7

Change-Id: Iaa61655d6b6904c022c4de854da24460f4fdc951
2015-12-29 11:15:53 -08:00
Translation updater bot 7ff085b937 Localisation updates from https://translatewiki.net.
Change-Id: I8ad7427e386f12543e2bf2a7fae20a0d957d6b16
2015-12-28 21:00:46 +01:00
Translation updater bot 97eefc3254 Localisation updates from https://translatewiki.net.
Change-Id: I9fb8c2f46bc6d6de31ef9df9ffce282e3591a937
2015-12-23 22:03:52 +01:00
Translation updater bot a5479589e3 Localisation updates from https://translatewiki.net.
Change-Id: I3258f90649fb2119f9b193999f36b234fd3824ce
2015-12-22 22:08:27 +01:00
Translation updater bot 70582e7cec Localisation updates from https://translatewiki.net.
Change-Id: Iff079ce7ffc98fc2c0fef85ebd9e6f4fe3476050
2015-12-21 22:03:15 +01:00
Paladox 6564ed9fb7 Update packages
Update grunt-banana-checker to 0.4.0

Update grunt-jsonlint to 1.0.6

Update grunt-jscs to 2.5.0

Also support looking into sub folders for jshint and jscs.

Also fix some js code so

Replace

} ) ( mw, jQuery );

with

}( mediaWiki, jQuery ) );

Also remove a blank message that should not be there in gu.json

Also remove two blank messages in tl.json.

Change-Id: Ib8390de6fd6adfc4a9ad22c48c7872aac332d4ae
2015-12-19 09:52:30 +00:00
Translation updater bot f88d5ab33a Localisation updates from https://translatewiki.net.
Change-Id: I6c968d661c41b2e630d16f340c8b7899c6eaeaad
2015-12-18 23:34:46 +01:00
Paladox 669d19c916 Add php code sniffer
Change-Id: Icd5e488f6d7009e1ed7a901298cd35c70c683f13
2015-12-16 13:11:00 +00:00
Translation updater bot 6823b51f2d Localisation updates from https://translatewiki.net.
Change-Id: I7c8f4cb1bac71ea27113ef526fca0fee6486f311
2015-12-15 22:21:57 +01:00
Translation updater bot b074551c9a Localisation updates from https://translatewiki.net.
Change-Id: Ifc7d79cfab720e83db54c631c3d2b07eed8f0a24
2015-12-13 22:15:41 +01:00
Translation updater bot 43173ffb9f Localisation updates from https://translatewiki.net.
Change-Id: I7ef7c68f8b35f4f0c14bc6190af207194eca49f8
2015-12-11 23:47:45 +01:00
Translation updater bot 9255f3e5f9 Localisation updates from https://translatewiki.net.
Change-Id: I64f61be0e0b785836d006fb8fa48fda294cff6f9
2015-12-08 22:21:49 +01:00
Translation updater bot cf7da6f25d Localisation updates from https://translatewiki.net.
Change-Id: I6780e284910b2223aa9d8bc3748d4138dfcbe6a7
2015-12-05 23:09:31 +01:00
Translation updater bot 371499e319 Localisation updates from https://translatewiki.net.
Change-Id: I6212044eaf5c4fde82655be3b457c561cd6e73fc
2015-12-03 23:13:28 +01:00
Translation updater bot d352c6dffa Localisation updates from https://translatewiki.net.
Change-Id: Iff6647eb929ba80e80f461726051adaa4bc177ae
2015-11-30 21:32:51 +01:00
Translation updater bot a7fdf6b674 Localisation updates from https://translatewiki.net.
Change-Id: I9379d3e46bba4170eb3304d2fddb70a1ea8d888d
2015-11-26 21:58:48 +01:00
Translation updater bot a6362e2974 Localisation updates from https://translatewiki.net.
Change-Id: Ic166e269574e2b9008a08c66b382ab7b1e2421fe
2015-11-24 23:06:56 +01:00
Antoine Musso 21d85fcf66 composer test entry point
Just run php lint for now.

Change-Id: I2bbe7543588c25669e4d4a3958b66f3f79240ea5
2015-11-23 22:15:36 +01:00
Bartosz Dziewoński 9aa7961c60 Detect duplicate <ref> definitions inside <references> too
For some reason there's an entirely separate function generating the
ref in this case.

This changes the behavior (in addition to adding the error message):
now the contents of the first <ref> with the same name inside
<references> are displayed, not the last. (This was already the case
for <ref>s outside <references>.)

Bug: T116377
Change-Id: I81b64ccd8a2e58f3b25938a63b8ad5967fe2a2c0
2015-11-21 11:25:29 +00:00
Translation updater bot 831d2d6367 Localisation updates from https://translatewiki.net.
Change-Id: I58c6d69af6c38015746caa1b40ad2899758303dc
2015-11-19 21:34:13 +01:00
James D. Forrester 549e95ee5f build: Test JS code with jshint and jscs via npm
Change-Id: I4d20af87b900d10c20f1a2c3fff09dc3425d2e55
2015-11-18 16:54:55 -08:00
Translation updater bot bd9f58c00b Localisation updates from https://translatewiki.net.
Change-Id: Ie1c68009703072a9d3d0c630a3e71267c033b3d5
2015-11-18 21:56:54 +01:00
Translation updater bot fc32dd14d2 Localisation updates from https://translatewiki.net.
Change-Id: Ideec6c64315a20af1f09c1e38694084402753361
2015-11-15 22:15:17 +01:00
Translation updater bot 3900b16d05 Localisation updates from https://translatewiki.net.
Change-Id: Ic74792ced7d4ede545ea1024be42b38984b01395
2015-11-14 22:15:36 +01:00
Translation updater bot b4dc6349eb Localisation updates from https://translatewiki.net.
Change-Id: Ib3fc6772602d51afa6d50864de11b45ae1bd519e
2015-11-13 21:32:16 +01:00
Translation updater bot 2ff7b6f56b Localisation updates from https://translatewiki.net.
Change-Id: If3d529691c0d9a882fe61eda6e3d907f839d77d9
2015-11-02 22:35:33 +01:00
Translation updater bot c57956e815 Localisation updates from https://translatewiki.net.
Change-Id: I37f9d4d31e6db28a85b4bc60a8075e827ff5e25e
2015-11-01 21:39:12 +01:00
Translation updater bot 2dcf8fe5a0 Localisation updates from https://translatewiki.net.
Change-Id: I1c7a8e5c540d41f0cfa6b4f678eb0d0eac4ef31c
2015-10-31 21:04:58 +01:00
jenkins-bot 02363beb7c Merge "Add isset() check before accessing $this->mRefs[$group]" 2015-10-31 12:02:13 +00:00
Translation updater bot 232d97aefc Localisation updates from https://translatewiki.net.
Change-Id: I85f45b1611a0cfc064647cfb3b4c093aee61b6f9
2015-10-30 21:47:19 +01:00
Timo Tijhof c12ca466f3 Add isset() check before accessing $this->mRefs[$group]
Follows-up c00cf4a which wrongly assumed the reason for empty()
to be about array count but the real reason was existence.

All other code in Cite extension already uses isset() so this
makes it match the rest.

Bug: T117084
Change-Id: Ic9b0d74ae6ceda5acba187c2fab18c8f5dc9526b
2015-10-29 21:57:40 +00:00
Translation updater bot b1996582ad Localisation updates from https://translatewiki.net.
Change-Id: I6a8f76ecabdcb4a05dfc790236c1122a37b8b1ef
2015-10-28 21:53:06 +01:00