Commit graph

1860 commits

Author SHA1 Message Date
Translation updater bot 7bc5923ef7 Localisation updates from https://translatewiki.net.
Change-Id: I28f984a1bb4e64932dde6dfe786bde66def1e851
2022-07-05 07:14:20 +02:00
Translation updater bot 5862932774 Localisation updates from https://translatewiki.net.
Change-Id: I228da749af7e98cf0fad95a8532f97a776c7a523
2022-06-29 07:09:00 +02:00
Translation updater bot c96111cd90 Localisation updates from https://translatewiki.net.
Change-Id: I3acd15dae1ece4694f4376f26d9164172566ea07
2022-06-22 07:10:52 +02:00
Translation updater bot f3c226430a Localisation updates from https://translatewiki.net.
Change-Id: I27f6f89400408e5a35d209c70a2026c551747567
2022-06-15 07:30:01 +02:00
Translation updater bot 1ad2b98e5e Localisation updates from https://translatewiki.net.
Change-Id: Ic372895d6069d48f20330df7c8a99701d7be751f
2022-06-08 07:13:12 +02:00
Translation updater bot 771ea18447 Localisation updates from https://translatewiki.net.
Change-Id: Ic23fe67b32610a47a44040db92690fe98d696e57
2022-06-01 07:02:17 +02:00
Translation updater bot cd10baec7a Localisation updates from https://translatewiki.net.
Change-Id: Ie1b2b125333101c97e5cead133cb41a2a3d3df77
2022-05-25 07:15:16 +02:00
Translation updater bot 79d4cce40f Localisation updates from https://translatewiki.net.
Change-Id: Id8f5a7d5a0887d2ab3d3c2198b3eb8341476998b
2022-05-18 07:15:08 +02:00
Translation updater bot 33abea9c7d Localisation updates from https://translatewiki.net.
Change-Id: Ic7af5e3c9286b9d008e64bd37a6cc43ed08ec330
2022-05-11 07:19:27 +02:00
Translation updater bot 50692c92dd Localisation updates from https://translatewiki.net.
Change-Id: I55107546185253cb49ec12700ba2142863e9267c
2022-05-04 06:50:55 +02:00
Translation updater bot 9a64e829cc Localisation updates from https://translatewiki.net.
Change-Id: If86c623cc3b3a8accff4563f4fc1bcff652720a3
2022-04-27 07:14:33 +02:00
Translation updater bot e28712c68d Localisation updates from https://translatewiki.net.
Change-Id: Ibce07f4187420bcb8bb1857ac692abd2661f36de
2022-04-20 06:59:08 +02:00
Translation updater bot 04b1d91ec6 Localisation updates from https://translatewiki.net.
Change-Id: I0ad80a84f10f8bdb21a4b5060914874f2ea4aca5
2022-04-13 06:55:12 +02:00
Translation updater bot e79d9cdd09 Localisation updates from https://translatewiki.net.
Change-Id: Ic9372fdf1608b8f4794203b45c69d5bf1359b0ca
2022-04-06 06:51:20 +02:00
Translation updater bot b023427d09 Localisation updates from https://translatewiki.net.
Change-Id: I561cea7daf7765ecc067af463fb10f72cfd762cf
2022-03-30 06:49:38 +02:00
Translation updater bot e5ace5c14b Localisation updates from https://translatewiki.net.
Change-Id: Ie69eea801cb0edb4887a59158ee41f0008a7e407
2022-03-23 07:01:08 +01:00
Translation updater bot 4f5a7eadc2 Localisation updates from https://translatewiki.net.
Change-Id: I55c1da2814ed0d484d3541e4c80711d647264334
2022-03-16 06:54:59 +01:00
Translation updater bot bc22062667 Localisation updates from https://translatewiki.net.
Change-Id: Ic887b775eb608305dbae11ab25871ef04c521072
2022-03-09 06:54:28 +01:00
Translation updater bot dfad58c334 Localisation updates from https://translatewiki.net.
Change-Id: I16cab2d4df93a2719e1f6e1a942223073a7e1ccb
2022-03-02 06:48:22 +01:00
Translation updater bot 53e6c3e5ca Localisation updates from https://translatewiki.net.
Change-Id: Ia365621f2a8f4a10c68d444129a52f7c43a7b081
2022-02-23 06:51:51 +01:00
Translation updater bot dd4da61717 Localisation updates from https://translatewiki.net.
Change-Id: I0a002c620937bf17073e67c80510036ee9b68f22
2022-02-16 06:58:19 +01:00
Translation updater bot 1f5c706d28 Localisation updates from https://translatewiki.net.
Change-Id: I3ce598203879ddbab974a5583af86c16cda77ffd
2022-02-09 06:56:48 +01:00
Translation updater bot f54e5f5a77 Localisation updates from https://translatewiki.net.
Change-Id: Ic8c9ab238cc2b4e9ad49bf2adc090f613190e26b
2022-02-02 06:51:05 +01:00
Translation updater bot 1809f58a3d Localisation updates from https://translatewiki.net.
Change-Id: I348e9c54cd6d913fa4708b831b32341c571e1d7f
2022-01-26 06:52:41 +01:00
Translation updater bot 918688c081 Localisation updates from https://translatewiki.net.
Change-Id: I21f40d8067f9fcc1d6890949fe468dc90529fef3
2022-01-19 06:45:52 +01:00
Translation updater bot 7d92a027e4 Localisation updates from https://translatewiki.net.
Change-Id: I0c96935a88235181ba6de5dab4d3fc6662cbc6e9
2022-01-12 06:46:31 +01:00
Translation updater bot 601ffabd96 Localisation updates from https://translatewiki.net.
Change-Id: I8d39201c59aaedab51fb44ba0a3628bf7b6c48af
2022-01-05 06:44:02 +01:00
Translation updater bot 4bf6a6a5b1 Localisation updates from https://translatewiki.net.
Change-Id: Ic8bc1eb9b9dafbd896f3fdf9187db41b2ffa41ab
2021-12-29 06:46:46 +01:00
Translation updater bot b36e6a2ca4 Localisation updates from https://translatewiki.net.
Change-Id: Ic5de124c7350c2792ba9c44f10889d74c751ecce
2021-12-22 06:47:04 +01:00
Translation updater bot 872882d0cb Localisation updates from https://translatewiki.net.
Change-Id: I1c4601ad037a36fccac3238aba05c2fde5345eec
2021-12-15 06:52:49 +01:00
Translation updater bot fefe41e2ee Localisation updates from https://translatewiki.net.
Change-Id: Ia831823f58acf00b866dcc150269f2b9f632934b
2021-12-08 06:47:55 +01:00
Translation updater bot fec014d4cb Localisation updates from https://translatewiki.net.
Change-Id: If1e670cec7a9b87543474056d34c092accbee79d
2021-11-24 14:34:44 +01:00
Translation updater bot 98a267d3ac Localisation updates from https://translatewiki.net.
Change-Id: I2991a7fb6954ee206e1e8b327f61033068cd1f2a
2021-11-16 13:16:22 +01:00
Translation updater bot 0d2bc7ca17 Localisation updates from https://translatewiki.net.
Change-Id: Icf05d17f79ea9cfaa17fccec25b424c989131b62
2021-09-13 08:28:40 +02:00
Translation updater bot a934ecc3b1 Localisation updates from https://translatewiki.net.
Change-Id: I9ba1b2f7a1d80538502d0ccbf22584c3d0c00ff6
2021-09-10 08:14:57 +02:00
Translation updater bot 4d8242f429 Localisation updates from https://translatewiki.net.
Change-Id: I3981778e72e2ae315f8765cbd294ec9395519269
2021-09-09 08:16:53 +02:00
Translation updater bot 79c7f568f5 Localisation updates from https://translatewiki.net.
Change-Id: I56b56c165580f4ddf7960b94fa39c55d9cd043ca
2021-09-08 08:09:47 +02:00
Translation updater bot 8fe4c04aed Localisation updates from https://translatewiki.net.
Change-Id: I776ede58099f8264e0c61a46bf1bd6446709eace
2021-09-07 08:10:08 +02:00
Translation updater bot 9c8af59d2c Localisation updates from https://translatewiki.net.
Change-Id: I0e6ec717baff0495aabe9f9c3a0f5125ae68335a
2021-09-06 08:19:58 +02:00
jenkins-bot 199cf1edf8 Merge "Add a static analyzer for the filter language" 2021-09-03 19:51:58 +00:00
Translation updater bot c93662e240 Localisation updates from https://translatewiki.net.
Change-Id: Ia0a0f86728aa0431624d9d01c92db9ef0434c427
2021-09-02 08:25:21 +02:00
Translation updater bot fcfd5fbdf6 Localisation updates from https://translatewiki.net.
Change-Id: I20ea2a972c577c87b471ab68a7e503d658b88c23
2021-09-01 08:15:40 +02:00
Translation updater bot 4b01397324 Localisation updates from https://translatewiki.net.
Change-Id: I566cec67a166c1891b4b34d233260e414c1f9503
2021-08-31 08:15:08 +02:00
Sorawee Porncharoenwase 320e3d696f Add a static analyzer for the filter language
This commit adds a class AFPSyntaxChecker which can statically analyze
a filter code to detect the following errors:

- unbound variables (which comes in two modes: conservative and liberal,
  default to conservative)
- unused variables (disabled by default for compatibilty)
- assignment on built-in identifiers
- function application's arity mismatch
- function application's invalid function name
- non-string literal in the first argument of set / set_var

The existing parser and evaluator are modified as follows:

- The new (caching) evaluator no longer needs to perform variable
  hoisting at runtime.
  - Note that for array assignment, this changes the semantics.
- The new parser is more lenient, reducing parsing errors.
  The static analyzer will catch these errors instead, allowing us
  to give a much better error message and reduces the complexity of
  the parser.
  * The parser now allows function name to be any identifier.
  * The parser now allows arity mismatch to occur.
  * The parser now allows the first argument of set to be any expression.

Concretely, obvious changes that users will see are:

1. a := [1]; false & (a[] := 2); a[0] === 1

   would evaluate to true, while it used to evaluate to the undefined value
   due to hoisting

2. f(1)

   will now error with 'f is not a valid function' as opposed to
   'Unexpected "T_BRACE"'

3. length

   will now error with 'Illegal use of built-in identifier "length"'
   as opposed to 'Expected a ('

Appendix: conservative and liberal mode

The conservative mode is completely compatible with the current evaluator.
That is,

false & (a := 1); a

will not deem `a` as unbound, though this is actually undesirable because
`a` would then be bound to the troublesome undefined value.

The liberal mode rejects the above pattern by deeming `a` as unbound.
However, it also rejects

true & (a := 1); a

even though (a := 1) is always executed. Since there are several filters
in Wikimedia projects that rely on this behavior, we default the mode
to conservative for now.

Note that even the liberal mode doesn't really respect lexical scope
appeared in some other programming languages (see also T234690).
For instance:

(if true then (a := 1) else (a := 2) end); a

would be accepted by the liberal checker, even though under lexical scope,
`a` would be unbound. However, it is unlikely that lexical scope
will be suitable for the filter language, as most filters in
Wikimedia projects that have user-defined variable do violate lexical scope.

Bug: T260903
Bug: T238709
Bug: T237610
Bug: T234690
Bug: T231536
Change-Id: Ic6d030503e554933f8d220c6f87b680505918ae2
2021-08-31 03:28:24 +02:00
Translation updater bot 32d5fd0218 Localisation updates from https://translatewiki.net.
Change-Id: Ifcff6e49b0690ebd9dca0a897d49f83f20dbb6a1
2021-08-30 08:19:21 +02:00
Translation updater bot 691e47a4a6 Localisation updates from https://translatewiki.net.
Change-Id: I1111bf7a2410c9fef6f3d4b1db6ba2bd759bd705
2021-08-26 08:35:01 +02:00
Translation updater bot aafbd68667 Localisation updates from https://translatewiki.net.
Change-Id: I24e6daae9e8909c7f0935ba53f02e2901388ce06
2021-08-24 10:16:42 +02:00
Translation updater bot 5c3fbcfb83 Localisation updates from https://translatewiki.net.
Change-Id: I7c4e7977b632f8989b559c28f02d6bc81b7c0e14
2021-08-23 09:03:19 +02:00
Translation updater bot 052240a5a5 Localisation updates from https://translatewiki.net.
Change-Id: I60b9c7326f8d326d932f1ebe3ccc0e51396d727d
2021-08-20 08:23:36 +02:00
Amir Aharoni e03467102c Remove two unused messages
It looks like they were removed in 2008:
6c7b701cc2

Change-Id: I5d91d846523307d8a3adb104503d255d8c726ed8
2021-08-19 22:29:53 +03:00