Commit graph

1067 commits

Author SHA1 Message Date
C. Scott Ananian
450fe7fcd8 Make {{#language}} consistent with {{#dir}} and {{#bcp47}}
Add the same no-arg options for language code that
{{#dir}} and {{#bcp47}} have, for consistency:
* `{{#language}}` will return the name of the *target language*
  (for articles, the content language; for messages, the user language)

The default value for the "in language" argument should be the autonym.
This was working previously but only via a baroque code flow path for
invalid language codes.  Make this a bit clearer and add tests.

Since non-autonym language code translations are added via the
[[Extension:CLDR]] in production, hook LanguageGetTranslatedLanguageNames
in the ParserTestRunner to ensure that we can test this.

Followup-To: Ice1c671c5b3cc077d2bb80ea5dc25c5eabbfeb36
Followup-To: I19c3e91a924e080f37dc95a0d4e61493583b533e
Change-Id: Ibf6e7f194cc056eadb48a5ad8e6d01a761d9351c
2024-07-30 20:27:17 +00:00
James D. Forrester
fe1fbb3a5c build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Depends-On: I5349d3378b5acd04f0d7c60072a9b1e3dd8f2052
Change-Id: I3b7fd4c460418e72ed0c36febef75f41bad0afb1
2024-03-01 15:58:13 -05:00
Tim Starling
7efc7f7518 Copy the Renameuser extension into core
Copy the Renameuser extension into core, with minimal code changes. The
hook handlers are inlined into Article, SpecialLog and
SpecialContributions.

Bug: T27482
Change-Id: I314021f4138773df6aaf2753b33ab8283cd16974
2023-03-03 09:39:39 -05:00
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
Umherirrender
673477a4b4 Sort special page alises alphabetically
Use @phpcs-require-sorted-array from new codesniffer release 32.0.0

Bug: T255826
Change-Id: I827d1f5010d000609324ec398beeb142d9bac299
2020-10-30 09:59:17 +01:00
Martin Urbanec
77457271ff MessagesCs.php: Update Czech book sources
* STK was renamed to NTK long time ago - use techlib.cz
* Update protocol to HTTPS for the national library

Change-Id: I42aa04bc1fa97d60bc547b5ed5550fe31ce0fa00
2020-10-03 16:02:08 +02:00
Martin Urbanec
bd488a612a Translate several special pages into Czech
Change-Id: I5e1e597af8ec62d536f0b041b568e961b96981c3
2019-04-19 20:58:01 +02:00
Martin Urbanec
a1f90c1b6d [i18n] Update Czech translations of special pages
Change-Id: I0c17dd0972623ba75b4f7e4b2fced59add402bbb
2019-04-05 06:46:05 +00:00
Jakub Vrana
9f14c02e20 Remove duplicate keys from arrays
Found by PHPStan.

Change-Id: Ie0e0cfa33b3caa4a13f4dfb04c772c8a0284435a
2018-11-26 19:22:08 +01: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
Matěj Suchánek
932fe1c3c7 Translate some magic words to Czech
Change-Id: I1baf05fcc849307bb14a381a5c7fb41a29411c0e
2018-02-05 11:12:11 +00:00
Matěj Suchánek
2f36cfa296 Add more Czech special page aliases
"Mé"/"Moje" are synonyms, as well as "Má"/"Moje".
Today, it caught me by surprise that one of them became a redlink.

Change-Id: I8a477cbcf0512964a814ee76841671c95d8410ac
2017-02-22 15:28:41 +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
Federico Leva
b321f48d80 Set Czech (cs) and Slovak (sk) as reciprocal fallbacks
The two languages are mutually intelligible at a very high degree and
most speakers can be considered bilinguals or passive bilinguals.

Consulted resources:
* Eurostat special eurobarometer 386 (2012).
  http://ec.europa.eu/public_opinion/archives/ebs/ebs_386_en.pdf
* Mira Nábělková
** http://doai.io/10.1515/IJSL.2007.004: «These differences do not prevent the users of Slovak and
   Czech from understanding discourse in the other language [...]. While contact with Czech texts
   in the Slovak environment is obvious, it does not appear to be so in the opposite case.»
** High degree of passive bilingualism even in recent generations who don't feel it much.
   https://repozytorium.amu.edu.pl/bitstream/10593/9168/1/02_Viera_K0VA%C4%860VA_Czech_Slovak_intercultural_265_280.pdf
* Discussions with several translators.
** https://translatewiki.net/wiki/Thread:Portal_talk:Cs/Fallback_to_sk
** https://translatewiki.net/wiki/Thread:Portal_talk:Sk/Fallback_to_cs

Change-Id: Id85b281a3ef2f2ae00ee0aba827e94e4f5a1f924
2016-08-15 12:15:36 +02:00
Martin Urbanec
5eda03c6fc Unification of Czech terminology in Special:Listgrants
The title of Special:Listgrants was "Svolení" in Czech
and the name of the special page was "Seznam grantů".
None of this has the exact meaning as the original title/name.
The Czech word "Grant" (another form of "grantů")
usualy means a financial gift from somebody limited by its purpose.

The Czech word "Svolení" has similar meaning as "agreement" in English.

"Skupina oprávnění" can be translated as "Group of permissions".

I've changed related pages in translatewiki.net to update
the description, displayed title and the title of the first
column in table which is generated by this special page.

It has been suggested by Dvorapa at my talk page in cswiki, see
https://cs.wikipedia.org/?oldid=13980091#Granty.3F_Svolen.C3.AD.3F
(in Czech).

Change-Id: Ic3148fc689de32bcba6344ad1f98491c5f540973
2016-08-02 08:48:28 +00:00
matejsuchanek
606a4526dd Add Czech aliases to most special pages
Change-Id: Ie3ea6eb24ca26fc59009bc52676d504a8252533a
2016-05-10 13:45:45 +02:00
Martin Urbanec
3f87056217 Changed translation of ChangePassword and PasswordReset
"Resetovat heslo" is translation of PasswordReset, not of ChangePassword. 

Change-Id: Iee5a25b0c46e24e6da82fa378bbda170141f8e9e
2016-05-06 12:39:47 +00:00
Martin Urbanec
f7b9dafa80 Set an alias for TrackingCategories page in Czech
Change-Id: I0c97cf6ce6aa342a50b667b06dc2e78175d9fbc1
2016-04-22 07:24:02 +02:00
jenkins-bot
ccafa8bdb6 Merge "Rename Special:ListGroupRights in Czech" 2016-04-02 16:05:32 +00:00
eranroz
9e60ff49ba Add prefered magic words first
When there are multiple aliases, the first alias MUST be the
preferred alias in that language, so that wikitext code
generators can generate the desired syntax.

The other aliases SHOULD be sorted by the following convention:
- Local first, English last
- Most common first, least common last

Bug: T116020
Change-Id: Ia670512e0cb375335873e7f9a08b638bbe039e45
2016-04-02 10:26:47 +02:00
matejsuchanek
ab0e7838ed Rename Special:ListGroupRights in Czech
The previous translation was inaccurate and meant "List of user
rights" which is not what the page is about.

Also I added some aliases to other special pages.

Change-Id: I4ef06d781bcb1aa0bc7b6d27c27cfde98390a367
2016-03-20 15:15:21 +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
Mark A. Hershberger
97e9cdd2ef Remove references to Popularpages alias
The bit being removed here causes a NOTICE with HitCounters.

Change-Id: I318eb641d4ed4b50dea0a172cf7970045b3a49e7
2015-07-25 15:45:44 -04:00
umherirrender
2b021dc48a Fixed spacing
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif

Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
2014-07-19 23:12:10 +02: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
4835603d8e Localisation updates from https://translatewiki.net.
Change-Id: I54a8e52634c1e36fadd7a84f236747765fc98684
2014-03-31 20:11:50 +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
3b31d37694 Localisation updates from https://translatewiki.net.
Change-Id: I083069e8633deaa49055a255e05692dcb1072193
2014-03-25 20:49:35 +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
347582bf5a Localisation updates from https://translatewiki.net.
Change-Id: Idf379fd907b86b191bf863d4dded00e5d9c94f35
2014-03-20 20:31:14 +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
9a51184037 Localisation updates from https://translatewiki.net.
Change-Id: Id6221ab7d0d906278a9163513ca63b74c9d41645
2014-03-18 20:38:58 +00:00
Translation updater bot
a047acedae Localisation updates from https://translatewiki.net.
Change-Id: I91e14444039b2b1345602a8c3291794ab3beafd1
2014-03-17 21:11:15 +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
96c0f2ad6c Localisation updates from https://translatewiki.net.
Change-Id: I87ed70aa87a61057fa81f0eae63363af85fd71a0
2014-03-11 20:43:01 +00:00
Translation updater bot
78c3af541b Localisation updates from https://translatewiki.net.
Change-Id: Ia03f6dcf21ee8e589758e039566adb661893804f
2014-03-10 21:21:57 +00:00
Translation updater bot
7ae73c1ff5 Localisation updates from https://translatewiki.net.
Change-Id: Idcbfe9491adcb996ea88dc2bc9040e9640b6d4fc
2014-03-05 21:03:58 +00:00
Translation updater bot
5a44ef0bca Localisation updates from https://translatewiki.net.
Change-Id: I2dd97b0dda0af44be6ad3979d5934554a4d7e31c
2014-03-02 20:32:03 +00:00
Translation updater bot
f4c666cd00 Localisation updates from https://translatewiki.net.
Change-Id: I2535a33defbc75fdb860acac3c98a8511e064a0a
2014-02-24 20:53:27 +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
6146a7d310 Localisation updates from https://translatewiki.net.
Change-Id: Id88aa24093b40a87b6beee70d81124179f95f006
2014-02-19 20:03:32 +00:00
Translation updater bot
157bda9268 Localisation updates from https://translatewiki.net.
Change-Id: I276bff053ef2bfea3180abe56bc2e26b5fcbe89b
2014-02-14 20:11:54 +00:00
Translation updater bot
988c92e651 Localisation updates from https://translatewiki.net.
Change-Id: I97bdb2a6d7351a1f60ad83d71e3ea18f38c40e54
2014-02-10 20:42:35 +00:00
Translation updater bot
6a0d82e575 Localisation updates from https://translatewiki.net.
Change-Id: I57623a929ef7cce482f476d6e2aa557d4a6f5c89
2014-02-06 20:45:45 +00:00
Translation updater bot
4b779de39e Localisation updates from https://translatewiki.net.
Change-Id: Ie265f224e4d0e521670d892447842c60d7f57e61
2014-02-05 21:36:48 +00:00
Translation updater bot
21e75c4edc Localisation updates from https://translatewiki.net.
Change-Id: If319ada434046084f15742666d6b01504d028faa
2014-02-03 21:17:34 +00:00