Commit graph

188 commits

Author SHA1 Message Date
Stang
aa3fac56b4 Remove twn-related comment from languages/messages/* files
Bug: T304802
Change-Id: Iccacf6288d758e526c95df69861385a4ac2d0f55
2022-11-13 22:46:44 -05:00
Timo Tijhof
939700e8ff language: Continue doc Languages subgroup for msg files and subclasses
Follows-up I301f471f86ba2.

For ease of navigation, move Converter subclasses to a group called
"Languages", which for documentation purposes is a subgroup of
"Language". The next commit does the same for Messages* files,
and Language subclasses (done separately for ease of review).

Change-Id: If1cef9aa15f536ebaedd4477ad7453426e7f3b85
2022-06-29 00:13:45 +00:00
Fomafix
ce6f7faadd Remove trailing empty lines in PHP
Performed using
find . -name \*.php -exec sed -i -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' {} \;

Change-Id: I5d0627f94c73690cf3a8a453539c22c760c2aa60
2017-01-16 22:06:43 +01:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Yuri Astrakhan
ac5f821ad1 Replaced spaces with underscores in NS_ consts
* All $namespaceNames and similar messages
that reference NS_* constants seem to use '_' for spaces,
except a few cases. I suspect its a mistake, thus replacing.

Regexes used:
 ([^'"\n]*['"][^'"\n]*(['"][^'"\n]*['"])*[^'"\n]*[^A-Za-z0-9]NS_)
contains a space in front, replaced with _\1

[^A-Za-z0-9]NS_([^'"\n]*['"][^'"\n]*['"])*[^'"\n]*['"][^'"\n]*
contains a space at the very end, replaced with \1_

Change-Id: Ibbc201678ee91db2b5bf3de597c1598b86558d77
2015-05-23 19:48:31 +00:00
Niklas Laxström
b382478944 Cleanup message file documentation
* Interface strings are now elsewhere
* MessagesQQQ no longer exists
* Prefer https for translatewiki.net

Change-Id: I76652ea94cca80441cd5d978029e4707ee41c4fd
2014-06-05 14:06:25 +00:00
Siebrand Mazeland
0dd91d5396 Migrate translations for core to JSON format
Largest patch set in the history of MediaWiki!

Change-Id: I918cfdc46c099017ca3622d1bcbbdd30c4fd00f6
2014-04-01 21:25:43 +00:00
Translation updater bot
e14f84ab9c Localisation updates from https://translatewiki.net.
Change-Id: I18970accbce3b383e4ad89df2b5cd0d638861e26
2014-03-21 20:46:11 +00:00
Translation updater bot
28b4dd5ff5 Localisation updates from https://translatewiki.net.
Change-Id: I1cdc5f6df47189ab35d141ed89a4c84cfac7fe18
2014-02-25 21:05:45 +00:00
Translation updater bot
6e08c06c77 Localisation updates from https://translatewiki.net.
Change-Id: I8d9a05eb6ce4136d424c4f2ce7cdc65e8c09b0f6
2014-01-03 20:35:25 +00:00
Translation updater bot
2325216443 Localisation updates from https://translatewiki.net.
Change-Id: I9b0a5f6786c86abea3e0b1ffed52291eb88447e3
2014-01-01 19:50:22 +00:00
Translation updater bot
4dd6a41af7 Localisation updates from https://translatewiki.net.
Change-Id: I78257c1482d2a8a5a36693082c3228a63d0f4b8f
2013-12-10 20:48:26 +00:00
Translation updater bot
9ffcc282ab Localisation updates from https://translatewiki.net.
Change-Id: Id4b89fcef61ccf1e329710f6beff9398669fdadb
2013-12-08 20:26:31 +00:00
Translation updater bot
4767a49bf9 Localisation updates from https://translatewiki.net.
Change-Id: Id32d5c87533081016e6a00312703f450782a1d6d
2013-12-07 10:46:45 +00:00
Translation updater bot
5531631535 Localisation updates from https://translatewiki.net.
Change-Id: I91af046a42d410457d6ccb6ce44657a29d184434
2013-12-05 21:22:40 +00:00
Translation updater bot
f3eacb22b9 Localisation updates from https://translatewiki.net.
Change-Id: Ic4c5e76d04630a9da5bde0590db09b55d30132ec
2013-12-04 20:29:19 +00:00
Translation updater bot
e7e842ad37 Localisation updates from https://translatewiki.net.
Change-Id: Iac7415ec17a0a30026e8c542f5ddd98d67b35d59
2013-11-24 20:26:31 +00:00
Brad Jorsch
db9c4cb3cf Remove linkprefix message, add $linkPrefixCharset
The existing "linkprefix" message is unlikely to be accurately
customized by message translators (as shown by the fact that, of the 10
distinct customizations prior to Iaa7eaa44 (which made them even more
complicated), 3 were broken or entirely ineffective, 1 was half
ineffective, and 2 more seem to have included the Latin-1 Supplement by
accident) or by local wiki admins. So, like linktrail before it, let's
move it out of the system messages and into a separate language
variable.

At the same time, let's make it a simple character set (like
$wgLegalTitleChars) rather than a complicated regular expression. The
complicated regex now lives in the parser.

This also adjusts the output of the API's action=query&meta=siteinfo and
adds an accessor parallel to the linkTrail accessor to Language.

Note the following changes that are not simply extracting the existing
charset from the linkprefix message for $linkPrefixCharset:
* The En message matched all non-ASCII UTF-8 characters by matching the
  component bytes (\\x80-\\xff). The new character set is equivalent.
* Various languages were identical to En and so have no $linkPrefixCharset
  set. These are: Ary Az Ce Ga Id Ka Kiu Km Ltg Mk Ms Ne Nn Ro Roa_tara Sc Si
  Sr_ec Sr_el Tl Tt_cyrl Tt_latn Ug_arab War
* Cu, Uk, and Udm are changed to match any number of „ or « in the prefix.
* Cv tried to include "«" that was redundant to the range \\x80-\\xff
  (see En comment). This was removed.
* Diq was entirely bogus, and so was removed.
* Gu included many additional UTF-8 characters that are redundant to the
  range \\x80-\\xff (see En comment). These were removed, and the
  resulting character set is equivalent to En.
* Mt has been broken since it was introduced in r37242. The charset used is
  equivalent to the broken regex.

Bug: 56031
Change-Id: I3369851b33113fc118a1bace38f3ac310cdd9725
2013-10-29 19:06:15 -04:00
Translation updater bot
ab65effabe Localisation updates from http://translatewiki.net.
Change-Id: I7d7dfd1a1e1a395c639b30489bacceedfbfc6330
2013-10-24 20:56:36 +00:00
Brad Jorsch
c800638273 Improve linkprefix regular expressions
The regular expression in the linkprefix message is run against the
entire page up to each wikilink, and is expected to capture one group
having everything except the prefix and another having only the prefix.
For long pages this winds up being a lot of text, so inefficient regular
expressions are going to cause problems.

The current regex is this:

  /^(.*?)([a-zA-Z\\x80-\\xff]+)$/sD

This is not efficient: it will scan through the string trying to match
against every run of one or more letters/non-ASCII characters,
backtracking at every one except possibly the last. The only reason this
hasn't been a huge problem everywhere is because only a few languages
have this feature enabled.

This change replaces this with this regex:

  /^((?>.*(?<![a-zA-Z\\x80-\\xff])))(.+)$/sD

This is rather more efficient: it will grab the whole string (which is
actually fast even for huge strings), then back off character by
character until it finds one that isn't a letter/non-ASCII.

Note that the above could be simplified somewhat:

  /^((?>.*[^a-zA-Z\\x80-\\xff]|))(.+)$/sD

The performance improvement here is minor, and Gujarati, Church Slavic,
Udmurt, and Ukrainian would still need the other style for their current
implementations.

For Gujarati, we also use another regex trick: a look-behind assertion
in PCRE must be fixed length, so something like (?<!a|bb) won't work.
But that regex fragment is equivalent to (?<!a)(?<!bb) which is allowed,
so we use that instead.

Bug: 52865
Change-Id: Iaa7eaa446b3f045a9ce970affcb2a889f44bdefd
2013-10-24 09:44:33 +00:00
Translation updater bot
d4018551b0 Localisation updates from http://translatewiki.net.
Change-Id: I4f52889299ffc8ae8d49634fd8b36d73c66d8b5a
2013-09-07 19:47:58 +00:00
Translation updater bot
5f7a37f271 Localisation updates from http://translatewiki.net.
Change-Id: I5e7da5913a10c7f75cdf223f2166cc7873134949
2013-09-04 19:50:47 +00:00
Translation updater bot
6ce5c4ece9 Localisation updates from http://translatewiki.net.
Change-Id: I345c7a9f6390d1f3d39d677d624e60bb4da4c17f
2013-08-16 19:21:57 +00:00
Translation updater bot
ffa9b0a3d7 Localisation updates from http://translatewiki.net.
Change-Id: Ibef6bc2f72261b59cc28c0e7aebf1c2bc575fa87
2013-08-11 19:02:44 +00:00
Translation updater bot
6a7f812143 Localisation updates from http://translatewiki.net.
Change-Id: I58a2089e69b39aba80162197b47b655b9dbac39b
2013-08-10 19:25:21 +00:00
Translation updater bot
55582fc211 Localisation updates from http://translatewiki.net.
Change-Id: I4e865f40a8c69fdc7520bd3a89ec61ca9af57337
2013-06-18 19:46:42 +00:00
Translation updater bot
cc7b23822a Localisation updates from http://translatewiki.net.
Change-Id: I599770c4c8b53d0d46c74f1426168a5c3d963a81
2013-06-12 19:14:13 +00:00
Translation updater bot
3154b26868 Localisation updates from http://translatewiki.net.
Change-Id: Ic862c638ed6ce33d3fe4dad9743c88136d832433
2013-05-20 12:08:40 +00:00
Translation updater bot
b8df7ed2d8 Localisation updates from http://translatewiki.net.
Change-Id: Ia14126efb5937b32606d7abb2334a6537eae8544
2013-01-11 20:13:24 +00:00
Translation updater bot
34b3630699 Localisation updates from http://translatewiki.net.
Change-Id: If3901d13b72f526be319d8626e3d101767eccdbc
2013-01-08 20:13:16 +00:00
Translation updater bot
ae268cdc38 Localisation updates from http://translatewiki.net.
Change-Id: Ie29068d717b09723f85975886e4478b145862d63
2012-12-25 19:46:58 +00:00
Translation updater bot
ed19c2bdd4 Localisation updates from http://translatewiki.net.
Change-Id: Iecaef86923bb32e102dd69ec12651824565bc3ed
2012-12-16 20:36:18 +00:00
Translation updater bot
abdda85097 Localisation updates from http://translatewiki.net.
Change-Id: Ib22bb939459977f160056d83697434b5a456474b
2012-12-02 20:21:23 +00:00
Siebrand Mazeland
9be697fa4e Update parts order in message files
Update the order of parts in messages files. Not done for all files. Order set as:
fallback, encoding, namespace related, special pages, magic words, other (no fixed
ordering after magic words).

Change-Id: Ide5ec747ba62a8c2bca8040a14d0aeea8e6c79b9
2012-10-31 22:51:46 +01:00
Translation updater bot
67f448c364 Localisation updates from http://translatewiki.net.
Change-Id: Ie33d83a4d96477c2ed53bba8ee01bc760b980351
2012-10-28 21:04:20 +00:00
Translation updater bot
805e298fe8 Localisation updates from http://translatewiki.net.
Change-Id: I399631991fc191d215aeb64eee167ce1d66f8a5e
2012-05-11 22:11:54 +00:00
Translation updater bot
370c7f3e09 Localisation updates from http://translatewiki.net.
Change-Id: I731ab96929dac09112de978b4ed387b044893d36
2012-05-06 18:31:11 +00:00
Translation updater bot
3bc64a9fbb Translation updates from translatewiki.net
Change-Id: If0be46f5e28febeffec3dd80a04751ad70995edf
2012-04-03 21:11:13 +00:00
Raimond Spekking
66770c7425 Localisation updates for core and extension messages from translatewiki.net 2012-02-19 20:47:51 +00:00
Siebrand Mazeland
3455c8fbb6 Localisation updates from http://translatewiki.net. 2012-02-17 16:09:12 +00:00
Raimond Spekking
229f511070 Localisation updates for core and extension messages from translatewiki.net 2012-01-25 20:38:04 +00:00
Raimond Spekking
1e2e6c4a92 Localisation updates for core and extension messages from translatewiki.net 2012-01-16 21:47:30 +00:00
Tim Starling
659f18cc4a * Fix for r107559: set $namespaceGenderAliases to an empty array in all languages with fallback=ru but with overridden namespaceNames, so that user namespaces don't get converted to Russian.
* Fix duplicated array keys from r107648.
2012-01-02 22:54:57 +00:00
Siebrand Mazeland
4418c3c235 Follow-up r107187, r107188: rebuild MessagesXx.php. 2011-12-24 00:13:11 +00:00
Siebrand Mazeland
f75da93926 Follow-up r104051: Rebuild message files. 2011-11-23 18:46:12 +00:00
Raimond Spekking
2cb4b24315 Localisation updates for core and extension messages from translatewiki.net 2011-11-08 20:32:28 +00:00
Raimond Spekking
988dbbc7a7 Localisation updates for core and extension messages from translatewiki.net 2011-11-05 21:03:17 +00:00
Raimond Spekking
c88bb4a251 Localisation updates for core and extension messages from translatewiki.net 2011-11-04 22:41:52 +00:00
Raimond Spekking
547f9806fd Localisation updates for core and extension messages from translatewiki.net 2011-09-14 20:46:49 +00:00
Raimond Spekking
acfb8a3fdb Localisation updates for core and extension messages from translatewiki.net 2011-09-12 21:47:32 +00:00