Commit graph

501 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
Umherirrender
7f28fe35b8 Sort magic words alises alphabetically in static language files
Use @phpcs-require-sorted-array from new codesniffer release 32.0.0

Similiar to special page alias in
I827d1f5010d000609324ec398beeb142d9bac299

Bug: T255826
Change-Id: I7b7cbf0c03714001609437af68fe16e06930cc33
2021-03-06 16:21:51 +01:00
Santhosh Thottingal
ce8d0e9599 Update formatNum implementation to match tr35 and latest CLDR
* Update digitGroupingPattern to match CLDR 31: New versions of CLDR has
  digit grouping pattern with decimal part. Update digitGroupingPattern
  values in Message classes with this improved pattern.
  Refer: http://unicode.org/reports/tr35/tr35-numbers.html

* Refer the following chart for the decimal patterns.
  http://www.unicode.org/cldr/charts/31/by_type/numbers.number_formatting_patterns.html

* Uses PHP NumberFormatter class for the commafy implementation, which
  is available in PHP 7.

* Some tests need to update to match the TR 35 spec

* The formatNum public method in Language.php is the preferred way to
  use this feature. It does separator transformation and digit transformation
  wherever applicable.

* Renamed the second param name for formatNum from noCommafy to noSeparators

* commafy method is deprecated and formatNum is preferred. Practically,
  we are not just adding comma, but seperators according to the language.
  Replaced some tests based on commafy methods with tests based on formatNum.

Note: The corresponding js implementation is not changed in this commit.
It would probably be a good idea to use globalize.js, which is also based
on the CLDR patterns.

Note: This patch preserves the existing off-by-one error in
$minimumGroupingDigits; T262500 will eventually fix this.

Bug: T167088
Co-Authored-By: C. Scott Ananian <cscott@cscott.net>
Change-Id: Ic721b9a91e78e4ef07040339d1006b7a90a910c0
2020-10-21 10:08:04 -04:00
Bartosz Dziewoński
0313128b10 Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals
In cases where we're operating on text data (and not binary data),
use e.g. "\u{00A0}" to refer directly to the Unicode character
'NO-BREAK SPACE' instead of "\xc2\xa0" to specify the bytes C2h A0h
(which correspond to the UTF-8 encoding of that character). This
makes it easier to look up those mysterious sequences, as not all
are as recognizable as the no-break space.

This is not enforced by PHP, but I think we should write those in
uppercase and zero-padded to at least four characters, like the
Unicode standard does.

Note that not all "\xNN" escapes can be automatically replaced:
* We can't use Unicode escapes for binary data that is not UTF-8
  (e.g. in code converting from legacy encodings or testing the
  handling of invalid UTF-8 byte sequences).
* '\xNN' escapes in regular expressions in single-quoted strings
  are actually handled by PCRE and have to be dealt with carefully
  (those regexps should probably be changed to use the /u modifier).
* "\xNN" referring to ASCII characters ("\x7F" and lower) should
  probably be left as-is.

The replacements in this commit were done semi-manually by piping
the existing "\xNN" escapes through the following terrible Ruby
script I devised:

  chars = eval('"' + ARGV[0] + '"').force_encoding('utf-8')
  puts chars.split('').map{|char|
    '\\u{' + char.ord.to_s(16).upcase.rjust(4, '0') + '}'
  }.join('')

Change-Id: Idc3dee3a7fb5ebfaef395754d8859b18f1f8769a
2018-06-04 16:20:13 +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
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
9ff59d43e9 Localisation updates from https://translatewiki.net.
Change-Id: Ica6fa7fc2d685a655e07b24cd54c7ec42d10f214
2014-03-27 20:29:00 +00:00
Translation updater bot
8f2e73f9b3 Localisation updates from https://translatewiki.net.
Change-Id: I31ee0d1685cdf6b315cb5336b30e548c76d67a95
2014-03-26 20:37:55 +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
ed3e9d73ed Localisation updates from https://translatewiki.net.
Change-Id: If3a8ff71e98aab98c39991147c715ec388ef91aa
2014-03-19 20:44:32 +00:00
Translation updater bot
c9c8d2de86 Localisation updates from https://translatewiki.net.
Change-Id: If66ddc1478b986417b08bd6d84cf441ea7f4526c
2014-03-15 20:07:15 +00:00
Translation updater bot
775ccf3813 Localisation updates from https://translatewiki.net.
Change-Id: I1d75011f4c5f78746fb1b05ef05858ac6a35eec4
2014-03-09 20:20:06 +00:00
Translation updater bot
7c3d803937 Localisation updates from https://translatewiki.net.
Change-Id: I71e13fdbb541c2fccbe303849a3c78f0c1260bd2
2014-02-21 22:06:21 +00:00
Translation updater bot
f2a16ab59c Localisation updates from https://translatewiki.net.
Change-Id: I9ed903822cabaf2a845d01f1a68ee34ac444d980
2014-02-01 19:37:45 +00:00
Translation updater bot
a0cbba1d18 Localisation updates from https://translatewiki.net.
Change-Id: I8187963fdb3b2cb88ee7afc1cc3b32cf8672e20b
2014-01-26 15:54:15 +00:00
Translation updater bot
cf96f84742 Localisation updates from https://translatewiki.net.
Change-Id: Idf89d2bff84d9c4e74be06a2532222891b0fb30e
2014-01-24 20:00:37 +00:00
Translation updater bot
e40079c3f8 Localisation updates from https://translatewiki.net.
Change-Id: Iaee33fbd265807b18879b6f9873d1d4344dfb878
2014-01-08 20:34:03 +00:00
Translation updater bot
441a2a34bc Localisation updates from https://translatewiki.net.
Change-Id: I0b92294dfb157ec75e1b116395de0181f9da707b
2014-01-07 20:34:54 +00:00
Translation updater bot
3f198951cb Localisation updates from https://translatewiki.net.
Change-Id: Ie4cf8986d2fc3bdf1d485958c7171b0b86cefee2
2014-01-05 20:08:28 +00:00
Translation updater bot
f2636aea33 Localisation updates from https://translatewiki.net.
Change-Id: Ie022679c51c951e3779c6d090b66c7876adef33c
2013-12-28 19:17:26 +00:00
Translation updater bot
ac4354bdaa Localisation updates from https://translatewiki.net.
Change-Id: I81f2c786041718b678dbd9fba411e24d0c4d4cf7
2013-12-14 20:42:14 +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
Translation updater bot
4484261325 Localisation updates from http://translatewiki.net.
Change-Id: I0eb353cd0cadf0bed7cd17d4c3eb2c7e108f6aa6
2013-11-20 21:03:52 +00:00
Translation updater bot
5223f5cdc4 Localisation updates from http://translatewiki.net.
Change-Id: I2ffb4e1f59ad5619ad15b7556c826ff2e206a1be
2013-11-19 20:14:44 +00:00
Translation updater bot
09519accc3 Localisation updates from http://translatewiki.net.
Change-Id: I5a74c20de10a3203ff81d453de6c739a8a476081
2013-11-18 06:37:41 +00:00
Translation updater bot
5642da0d38 Localisation updates from http://translatewiki.net.
Change-Id: I46ce170fbf18fdde0307af661a817aa1d3850d61
2013-11-12 20:33:52 +00:00
Translation updater bot
4542a353f8 Localisation updates from http://translatewiki.net.
Change-Id: I8fc70b7ddf362aa60d577ba71694c0ad0e561b33
2013-11-11 20:15:47 +00:00
Translation updater bot
e9e58907be Localisation updates from http://translatewiki.net.
Change-Id: Idb35f8a3a0c17b3d2ae2709de03cad2aac6ec177
2013-11-09 18:48:48 +00:00
Translation updater bot
cf6380a214 Localisation updates from http://translatewiki.net.
Change-Id: I876a124154e85c153d855ef2df596d28554b4bad
2013-11-03 19:55:40 +00:00
Translation updater bot
0900b6c3ce Localisation updates from http://translatewiki.net.
Change-Id: I38ceb5df39b41324a4c7cb323774b827cae5cf02
2013-11-02 19:49:49 +00:00
Translation updater bot
a78bddbee1 Localisation updates from http://translatewiki.net.
Change-Id: I922e660fafc7a952129beebeaed001712f5c2bc1
2013-10-21 19:42:49 +00:00
Translation updater bot
64f427eb88 Localisation updates from http://translatewiki.net.
Change-Id: Ib6cdd80506e78608d9d8af15088020528fdec256
2013-10-07 21:16:52 +00:00
Translation updater bot
bb1d43e7ba Localisation updates from http://translatewiki.net.
Change-Id: I3be3f9075e1d3deabe21db9fffd22698f4f250ff
2013-09-29 19:10:48 +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
e946df9c12 Localisation updates from http://translatewiki.net.
Change-Id: I28a9c6aa85e73c4ff4a409768c85117c25a55314
2013-08-22 19:46:27 +00:00
Translation updater bot
17bc2a1927 Localisation updates from http://translatewiki.net.
Change-Id: I332982e76aa7f846c42e81fbd30141d85326f8b8
2013-08-20 19:39:41 +00:00
Translation updater bot
e49190fd3e Localisation updates from http://translatewiki.net.
Change-Id: Iad6b538be6d172d232b8e593ff98faf3d5707abe
2013-08-18 19:39:15 +00:00
Translation updater bot
7e4658fe71 Localisation updates from http://translatewiki.net.
Change-Id: I9a8b8769d0077d4d406c27910b8f94d9f3a2ceeb
2013-08-02 21:40:25 +00:00
Translation updater bot
3ac4f416ce Localisation updates from http://translatewiki.net.
Change-Id: Ic83e47bec279a98ef3be15f5c697f07dda78c4d0
2013-07-14 19:15:22 +00:00
Translation updater bot
c16977b359 Localisation updates from http://translatewiki.net.
Change-Id: I1a47d9aee7f6b86cdd51f1ad0ecad9cd92d2ac4f
2013-07-09 20:23:48 +00:00
Translation updater bot
73cb0b10ed Localisation updates from http://translatewiki.net.
Change-Id: Idfa4331722672da932fe8a124bc9618de0e31fea
2013-07-01 19:39:13 +00:00