dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Localisation updates from https://translatewiki.net.
[lhc/web/wiklou.git]
/
languages
/
Language.php
diff --git
a/languages/Language.php
b/languages/Language.php
index
190f2bf
..
0a6ccd3
100644
(file)
--- a/
languages/Language.php
+++ b/
languages/Language.php
@@
-942,14
+942,14
@@
class Language {
* @param string $key
* @return string
*/
* @param string $key
* @return string
*/
- function getMonthAbbreviation( $key ) {
+
public
function getMonthAbbreviation( $key ) {
return $this->getMessageFromDB( self::$mMonthAbbrevMsgs[$key - 1] );
}
/**
* @return array
*/
return $this->getMessageFromDB( self::$mMonthAbbrevMsgs[$key - 1] );
}
/**
* @return array
*/
- function getMonthAbbreviationsArray() {
+
public
function getMonthAbbreviationsArray() {
$monthNames = [ '' ];
for ( $i = 1; $i < 13; $i++ ) {
$monthNames[] = $this->getMonthAbbreviation( $i );
$monthNames = [ '' ];
for ( $i = 1; $i < 13; $i++ ) {
$monthNames[] = $this->getMonthAbbreviation( $i );
@@
-961,7
+961,7
@@
class Language {
* @param string $key
* @return string
*/
* @param string $key
* @return string
*/
- function getWeekdayName( $key ) {
+
public
function getWeekdayName( $key ) {
return $this->getMessageFromDB( self::$mWeekdayMsgs[$key - 1] );
}
return $this->getMessageFromDB( self::$mWeekdayMsgs[$key - 1] );
}
@@
-1089,7
+1089,7
@@
class Language {
* @throws MWException
* @return string
*/
* @throws MWException
* @return string
*/
- function sprintfDate( $format, $ts, DateTimeZone $zone = null, &$ttl = null ) {
+
public
function sprintfDate( $format, $ts, DateTimeZone $zone = null, &$ttl = null ) {
$s = '';
$raw = false;
$roman = false;
$s = '';
$raw = false;
$roman = false;
@@
-2067,7
+2067,7
@@
class Language {
* get user timecorrection setting)
* @return int
*/
* get user timecorrection setting)
* @return int
*/
- function userAdjust( $ts, $tz = false ) {
+
public
function userAdjust( $ts, $tz = false ) {
global $wgUser, $wgLocalTZoffset;
if ( $tz === false ) {
global $wgUser, $wgLocalTZoffset;
if ( $tz === false ) {
@@
-2214,7
+2214,7
@@
class Language {
* validateTimeZone() in Special:Preferences
* @return string
*/
* validateTimeZone() in Special:Preferences
* @return string
*/
- function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
+
public
function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
$ts = wfTimestamp( TS_MW, $ts );
if ( $adj ) {
$ts = $this->userAdjust( $ts, $timecorrection );
$ts = wfTimestamp( TS_MW, $ts );
if ( $adj ) {
$ts = $this->userAdjust( $ts, $timecorrection );
@@
-2233,7
+2233,7
@@
class Language {
* validateTimeZone() in Special:Preferences
* @return string
*/
* validateTimeZone() in Special:Preferences
* @return string
*/
- function time( $ts, $adj = false, $format = true, $timecorrection = false ) {
+
public
function time( $ts, $adj = false, $format = true, $timecorrection = false ) {
$ts = wfTimestamp( TS_MW, $ts );
if ( $adj ) {
$ts = $this->userAdjust( $ts, $timecorrection );
$ts = wfTimestamp( TS_MW, $ts );
if ( $adj ) {
$ts = $this->userAdjust( $ts, $timecorrection );
@@
-2253,7
+2253,7
@@
class Language {
* validateTimeZone() in Special:Preferences
* @return string
*/
* validateTimeZone() in Special:Preferences
* @return string
*/
- function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
+
public
function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
$ts = wfTimestamp( TS_MW, $ts );
if ( $adj ) {
$ts = $this->userAdjust( $ts, $timecorrection );
$ts = wfTimestamp( TS_MW, $ts );
if ( $adj ) {
$ts = $this->userAdjust( $ts, $timecorrection );
@@
-2559,7
+2559,7
@@
class Language {
* @param string $key
* @return array|null
*/
* @param string $key
* @return array|null
*/
- function getMessage( $key ) {
+
public
function getMessage( $key ) {
return self::$dataCache->getSubitem( $this->mCode, 'messages', $key );
}
return self::$dataCache->getSubitem( $this->mCode, 'messages', $key );
}
@@
-2576,7
+2576,7
@@
class Language {
* @param string $string
* @return string
*/
* @param string $string
* @return string
*/
- function iconv( $in, $out, $string ) {
+
public
function iconv( $in, $out, $string ) {
# This is a wrapper for iconv in all languages except esperanto,
# which does some nasty x-conversions beforehand
# This is a wrapper for iconv in all languages except esperanto,
# which does some nasty x-conversions beforehand
@@
-2623,7
+2623,7
@@
class Language {
*
* @return string
*/
*
* @return string
*/
- function ucfirst( $str ) {
+
public
function ucfirst( $str ) {
$o = ord( $str );
if ( $o < 96 ) { // if already uppercase...
return $str;
$o = ord( $str );
if ( $o < 96 ) { // if already uppercase...
return $str;
@@
-2643,7
+2643,7
@@
class Language {
*
* @return string
*/
*
* @return string
*/
- function uc( $str, $first = false ) {
+
public
function uc( $str, $first = false ) {
if ( $first ) {
if ( $this->isMultibyte( $str ) ) {
return mb_strtoupper( mb_substr( $str, 0, 1 ) ) . mb_substr( $str, 1 );
if ( $first ) {
if ( $this->isMultibyte( $str ) ) {
return mb_strtoupper( mb_substr( $str, 0, 1 ) ) . mb_substr( $str, 1 );
@@
-4190,6
+4190,17
@@
class Language {
return $lang;
}
return $lang;
}
+ /**
+ * Compare with an other language object
+ *
+ * @since 1.28
+ * @param Language $lang
+ * @return boolean
+ */
+ public function equals( Language $lang ) {
+ return $lang->getCode() === $this->mCode;
+ }
+
/**
* Get the internal language code for this language object
*
/**
* Get the internal language code for this language object
*