Commit graph

57 commits

Author SHA1 Message Date
shandrenkoff
3102742206 Add langauge 'kjp' Eastern Pwo
This change adds the Eastern Pwo language with ISO 639-3 code 'kjp' with
'bo' (Tibetian) fallback. The default script is the Burmese script.

Bug: T203908
Change-Id: Ic69c5f1398bcd96674254b69f678f21b71feb475
2018-10-29 15:21:09 +00:00
C. Scott Ananian
21ead7a98d Ensure LanguageCode::bcp47() returns a valid BCP 47 language code
MediaWiki uses a number of nonstandard codes which do not validate
according to the IANA language subtag registry.  Some of them have
the wrong semantics entirely: MediaWiki's `sr-ec` variant maps to
BCP 47 `sr-EC` which is "Serbian as used in Ethiopia" (!).

Extend LanguageCode::bcp47() to map our nonstandard codes to valid
BCP 47 language codes.  Export the mapping so that it can be used
in JavaScript's corresponding mw.language.bcp47() implementation
as well, and return the standard BCP 47 codes in the siteinfo
API.

Thanks to TheDJ (I10b4473c7e53f027812bbccf26bb47aec15fddfd) and
Fomafix (I93efc190714ba76247d30ba49fc21ae872fc3555) for previous
attempts at this!

Also removed a fixme for the name of 'Twi', dating back to 2004
(f59c3be23b) -- checking
tw.wikipedia.org it certainly appears that the autonym of 'Twi'
is correctly 'Twi'.

Tracking bugs for invalid language codes are T125073 and T145535.
Discussion of zh-XX => zh-HanX-XX mapping is at T198419.

This is a replay of an earlier merged patch,
8380f0173e, which had to be reverted
because it caused regressions in the Babel extension (T199941).

Bug: T34483
Bug: T106367
Bug: T120847
Depends-On: I27a5b8e45b34c6b57c1b612b11548001c88cd483
Change-Id: Iebbc604af21d7f2af9c1f1ab2574cb5f309bf6ed
2018-10-11 01:53:54 -04:00
Fomafix
5632815976 Write Latin and other scripts with captial letter
Change-Id: I16c660e54191b63cd6eb3407cb00504665930c4e
2018-10-05 18:49:08 +02:00
jhsoby
109efd4c99 Fix autonym for Armenian
The Armenian autonym should not have a capital
initial, as names of languages are not proper
nouns in that language.

Bug: T202611
Change-Id: I17cd8706f5fee2f39255c3407b758103e4cb5455
2018-09-03 04:32:27 +00:00
MarcoAurelio
fa6d6eb9bf Add language support for Mon (mnw)
Bug: T201583
Change-Id: Ic03b910c3cfc2419ece783d04adb486570416ba3
2018-08-09 18:53:56 +00:00
jenkins-bot
3de7bf779d Merge "Change name of Santali to localized version" 2018-08-06 13:46:30 +00:00
MarcoAurelio
3d6a189e3a Add language support for Western Armenian (hyw)
* Language name: Western Armenian <https://www.ethnologue.com/language/hyw>.
 * Local version: արեւմտահայերէն
 * ISO639-3: hyw <https://iso639-3.sil.org/code/hyw>.
 * Fallback: Armenian (hy).

Bug: T201276
Change-Id: Ic76d7a9a1fa8541fd422a4287044de4daaa6665d
2018-08-06 12:38:14 +02:00
Martin Urbanec
8f85bbd7a9 Change name of Santali to localized version
Bug: T198400
Change-Id: Id2bbcfebf32903c4d8882e2b4f18f37a8a5c3366
2018-08-05 18:30:28 +02:00
Greg Grossmeier
b302b0cd1c Revert "Ensure LanguageCode::bcp47() returns a valid BCP 47 language code"
This reverts commit 8380f0173e.

Reason for revert: Caused T199941

Bug: T199941
Change-Id: I93af756a2d70d6bc91f828fe6ac19bf10ca8788f
2018-07-23 17:27:23 +00:00
C. Scott Ananian
8380f0173e Ensure LanguageCode::bcp47() returns a valid BCP 47 language code
MediaWiki uses a number of nonstandard codes which do not validate
according to the IANA language subtag registry.  Some of them have
the wrong semantics entirely: MediaWiki's `sr-ec` variant maps to
BCP 47 `sr-EC` which is "Serbian as used in Ethiopia" (!).

Extend LanguageCode::bcp47() to map our nonstandard codes to valid
BCP 47 language codes.  Export the mapping so that it can be used
in JavaScript's corresponding mw.language.bcp47() implementation
as well.

Thanks to TheDJ (I10b4473c7e53f027812bbccf26bb47aec15fddfd) and
Fomafix (I93efc190714ba76247d30ba49fc21ae872fc3555) for previous
attempts at this!

Also removed a fixme for the name of 'Twi', dating back to 2004
(f59c3be23b) -- checking
tw.wikipedia.org it certainly appears that the autonym of 'Twi'
is correctly 'Twi'.

Tracking bugs for invalid language codes are T125073 and T145535.
Discussion of zh-XX => zh-HanX-XX mapping is at T198419.

Bug: T34483
Bug: T106367
Bug: T120847
Change-Id: I807dd55d49e9bd19443329231326a5b0d3e6c453
2018-07-13 14:56:18 -04:00
MarcoAurelio
bc9e865ab7 Add Manipuri/Meitei to Names.php
Bug: T198132
Change-Id: I43620c1f34eecda69c61ea0bb13a213e0e6a457d
2018-06-29 05:40:48 +00:00
Niklas Laxström
a19320bf90 Add the es-419 language code to support South American Spanish
This code is useful for targeting Spanish spoken in the Latin America
and the Caribbean region. There are no plans to make this available as
an interface language, hence I am not adding a language file with a
fallback to 'es'.

Bug: T112889
Change-Id: If7f0ed7a13f1cc86985ce5ce509dcf543cc1c0ff
2018-06-24 18:28:02 +00:00
Étienne Beaulé
ef7ff1c26d
Add langauge 'zgh' Standard Moroccan Amazigh
This change adds the Standard Moroccan Amazigh language with ISO
639-3 code 'zgh' with 'kab' (Kabyle) fallback. The default script is the
Neo-Tifinagh script.

Bug: T137491
Change-Id: Idd13f92d7ae05cd47267558c8ff4fa368b701e24
2018-06-11 10:24:08 -03: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
MarcoAurelio
6ebd5fd316 Add language support for Batak Mandailing (btm)
Bug: T195940
Change-Id: I488b5aea8d33c17ee801a59963ceced13c944ee4
2018-06-01 12:34:00 +02:00
MarcoAurelio
4f8cf894f9 Add support for Tachawit (Latin script) (shy-latn)
Bug: T194047
Change-Id: If02515754857c224579519b94fe6fea27e1bd08f
2018-05-21 08:39:15 +00:00
Fomafix
afe88c0078 Names.php: Remove U+200E after autonym of language 'lki'
The LEFT-TO-RIGHT MARK (U+200E) after the RTL autonym of the language
'lki' was inserted in 04fcd20c.

The LRM causes wrong parentheses on mixed bidi sequences on Google
Chrome:
<span dir="rtl">({{#language:lki}}) Foo</span>

Change-Id: I9db84938e2b2142a3cb61955dfcbda790e6bbc5f
2018-05-16 20:16:10 +02:00
Fomafix
7e974c8c42 Names.php: Add missing LTR markers after closing parentheses
Currently some language autonyms with parentheses have misaligned
parentheses on RTL environment on some browser. To reproduce open
index.php?title=Special:Preferences&uselang=en-rtl
Google Chrome is affected. Mozilla Firefox is not affected.

This changes fixes this problem like at the other autonyms with
parentheses.

Change-Id: Ie01116821b067017434681ea995e97ada8ff0a6d
2018-05-09 06:49:41 +02:00
jenkins-bot
0db03df62e Merge "Change language name of ko-kp to 조선말" 2018-05-09 04:36:45 +00:00
MarcoAurelio
c3154a5c84 Add Ambonese Malay (abs) to Names.php
Bug: T193566
Change-Id: I2c3b3812f5f2e4bb66c48da2b442194003eabb67
2018-05-04 08:24:16 +00:00
Yongmin Hong
0c8f186798 Change language name of ko-kp to 조선말
Ref T190324 for more information. 조선말 is more common name than
the current "한국어 (조선)".

Bug: T190324
Change-Id: Ie94e60887afe05a92d240ad91faaa9aa7b9b6ea5
Signed-off-by: Yongmin Hong <revi@pobox.com>
2018-04-21 03:48:40 +09:00
Ghybu
aa75b50ee5 Modify {{#language:ku}}: Kurdî should be written lower-case instead
Bug: T190205
Change-Id: Ieacc885a99d825403c65a2caa36f9011125ad9ce
2018-03-24 15:14:02 +00:00
jenkins-bot
8269ed4dfd Merge "Add support for 'hu-formal'" 2018-03-07 10:55:43 +00:00
jenkins-bot
e81a7da6c0 Merge "Fix English name for lb" 2018-02-21 11:42:23 +00:00
Niklas Laxström
74a97f2716 Fix English name for lb
This version has been in MediaWiki longer than my email history,
since 2005 at least. This spelling is not present in
https://en.wikipedia.org/wiki/Luxembourgish

Change-Id: Ibda7e6428a2c79b9f7d88892ef1c16e9921ae934
2018-02-21 12:12:20 +01:00
Fomafix
289e4204ac Add support for 'hu-formal'
Hungarian formal address. First exported on Ic6f9b78a.

Bug: T187824
Change-Id: I1f8e4122605d5c881b0690be98d9382b4406e1ce
2018-02-20 20:08:23 +01:00
MarcoAurelio
3fbb631ee4 Add support for 'es-formal'
Spanish formal address. First exported on Id132ebc6.

Bug: T187750
Change-Id: Ia97b750bde01ceee7db0ea826e4f87bb9a2f0a93
2018-02-19 21:24:28 +00:00
MarcoAurelio
5e797dd186 Add support for Kumyk (kum)
Bug: T186647
Change-Id: I704e493d743d54071fc6f5341ea04e8a48ebaad7
2018-02-07 11:44:52 +01:00
MarcoAurelio
887745d4db Add support from Guianan Creole (gcr)
Bug: T186635
Change-Id: I13334bb83562fc943fd69ef1f0fc3cd85aceffe1
2018-02-06 21:57:48 +00:00
MarcoAurelio
c50edb31e8 Add Siberian Tatar (sty) language
Bug: T186359
Change-Id: Iecfdda0bcfbcc491565b6de36046791a3e5c540a
2018-02-03 00:45:07 +00:00
Jayprakash12345
2f70fe4256 Add Nyungar (nys) to Names.php & release note
Bug: T182305
Change-Id: Ie6a5881a6b20cecf8f73707dbb3c58f1190a3323
2018-01-05 18:36:25 +00:00
zoranzoki21
f0828ff475 Removed Toki Pona localization files
Bug: T132899
Bug: T178730
Change-Id: I4c61b3ef42cdc24fee74587965240ca08242867e
2017-10-24 21:27:47 +00:00
jhsoby
7239853038 Updating native language name for Northern Sami
Bug: T156589
Change-Id: Iec69f8654d6eabb7b644726fd63f00edb01dc1e9
2017-10-17 14:58:41 +02:00
Amire80
661e2a838b Add Atayal (tay) language
Bug: T173383
Change-Id: Id0607ca4a748f88476fefd081864b1282e9bcb8d
2017-08-25 21:46:20 +02:00
jenkins-bot
d5a7166771 Merge "Rename autonym for 'no' from 'norsk bokmål' to 'norsk'" 2017-08-10 19:21:27 +00:00
Amire80
0d0a419609 Add Saraiki (skr) to Names.php
Bug: T171347
Change-Id: I145485b3d94ab2154a7dadbda166b16207f7c21c
2017-07-23 14:20:48 +03:00
Amir Sarabadani
fa7cfe087b Rename ckb to Kurdish
Bug: T116761
Change-Id: If5abc7c859c3fbf13e3ebf1be98693ee6fc04d9a
2017-07-09 16:40:14 +00:00
Bartosz Dziewoński
c5b1097290 Hide Pig Latin language entirely if $wgUsePigLatinVariant is false
Previously, even if $wgUsePigLatinVariant was false, the language
would show up on Special:Preferences (and some other places) as
'en-x-piglatin - Igpay Atinlay'.

Follow-up to d8375bee24.

Change-Id: I08faacabca87c04299c7b535be8df1770e0a37ac
2017-06-16 20:43:28 +02:00
Liangent
d8375bee24 New language variant 'en-x-piglatin' for easier variant testing
Guarded by the $wgUsePigLatinVariant variable, off by default.

Pig Latin is a language game where words in English are altered
according to the following rules:

* Words starting with a vowel have a '-way' suffix appended.
* Words starting with a consonant have the initial consonants (or 'qu'
  group) moved to the end and an '-ay' suffix appended.

https://en.wikipedia.org/wiki/Pig_Latin

* Added 'en-x-piglatin' as a language name.
* Added 'en' to LanguageConverter::$languagesWithVariants.
* Added LanguageEn class and its corresponding EnConverter which
  provides one-way translation from English to Pig Latin.
* Some minor internal changes in code that assumed that English
  doesn't have a language class or converter.

Bug: T45547
Depends-On: I1d9691c784032669979f8109c9a5f65cbf4122c9
Change-Id: I7fa2d85d6364958c5138366e8b4504a2697a8731
2017-06-12 16:59:57 -04:00
Sébastien Santoro
03e306dd3b Add kbp language code
Bug: T160915
Change-Id: I1de0c2eb0228697544f2e3bfedf76bc37ac3f679
2017-05-25 17:27:50 +02:00
Amire80
fea73e1b0e Add Dinka (din) to Names.php and languages/messages/
Bug: T163600
Change-Id: I2bf03c97680c17cddf48d05adee88581640268ec
2017-04-24 16:11:53 +00:00
Fomafix
0d82d15447 Rename autonym for 'no' from 'norsk bokmål' to 'norsk'
* 'no' is the language code for the macro language Norwegian with the
  autonym 'norsk'.
* 'nb' is the language code for the language Norwegian Bokmål with the
  autonym 'norsk bokmål'.
* 'nn' is the language code for the language Norwegian Nynorsk with the
  autonym 'norsk nynorsk'.

'no' falls back to 'nb'.

Change-Id: Ieff4ff4ecdce20ce65a818612af90815121d70d3
2017-04-15 11:51:40 +02:00
Sébastien Santoro
b2943825cf Add support for Atikamekw
Language code: atj

Bug: T137376
Change-Id: Ieb9b6bcd09aedbf520b384a6572f96d7db1eca18
2017-03-26 20:34:13 +00:00
James D. Forrester
3526417586 languages: Replace implicit Bugzilla bug numbers with Phab ones
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.

Change-Id: Id2f9d229d17b8eee66b2ca4e3927f3f66ac62988
2017-02-28 00:33:38 +00:00
MarcoAurelio
d2887f448d Gorontalo (gor) to Names.php and RELEASE-NOTES-1.28
Bug: T136083
Change-Id: Ib3e46962de9cc7abc2052cfdf06e95f898e36142
2016-11-14 12:48:13 +01:00
MarcoAurelio
3e92538e15 Karelian (krl) to Names.php and RELEASE-NOTES-1.28
* Added Karelian (krl) to Names.php.
* Added mention to RELEASE-NOTES-1.28
* Created MessagesKrl.php and $fallback = 'fi';

Bug: T137415
Change-Id: Iee2d03d042c8b514ee2575450a37158b26c732a3
2016-11-12 10:16:01 +00:00
Amire80
f3e3db8945 Fix the name of the Livvi-Karelian to fully Latin alphabet
The letter "k" was for some reason written in the Cyrillic alphabet.
Everywhere else in the Wp/olo incubator it is written with the Latin
letter "k", so this must be a mistake.

Change-Id: I51eb44b4cdb6014aafb7e6b4e5a725434b86e877
2016-10-10 15:13:38 +03:00
Niklas Laxström
1a7bde454e Add Shan (shn)
Bug: T135867
Change-Id: I6cd17284b82f6cab0b1fe12557005f0ac541f1e9
2016-07-14 09:37:32 +02:00
Sébastien Santoro
cb38eee898 Add support for Balinese
Language code: ban

Bug: T137411
Change-Id: Ief8ef036cc0abae2c1c060784784e3b5453edce6
Signed-off-by: Raimond Spekking <raimond.spekking@gmail.com>
2016-06-09 14:04:56 +00:00
Fomafix
735b00b2b3 Names.php: Replace remaining tabs and double spaces
Follow-up to a3552004
Change-Id: I6a76de73fcfc21516fab7415057260e27e924696
2016-04-22 17:32:02 +00:00