Index: trunk/extensions/WikiTweet/WikiTweet.i18n.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | 'wikitweet-tweets-tagged' => 'Tweets tagged', |
32 | 32 | 'wikitweet-back-timeline' => 'Back to the timeline', |
33 | 33 | 'wikitweet-tweets-from-room' => 'Tweets from room', |
34 | | - 'wikitweet-timeago' => '%time% ago', // Do not translate the string "%time%", it is a keyword |
| 34 | + 'wikitweet-timeago' => '$1 ago', |
35 | 35 | 'wikitweet-hour' => 'hour', |
36 | 36 | 'wikitweet-hours' => 'hours', |
37 | 37 | 'wikitweet-minute' => 'minute', |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | 'wikitweet-tweets-tagged' => 'Tweets taggés', |
103 | 103 | 'wikitweet-back-timeline' => 'Retour au flux', |
104 | 104 | 'wikitweet-tweets-from-room' => 'Tweets de la room', |
105 | | - 'wikitweet-timeago' => 'Il y a %time%', |
| 105 | + 'wikitweet-timeago' => 'Il y a $1', |
106 | 106 | 'wikitweet-hour' => 'heure', |
107 | 107 | 'wikitweet-hours' => 'heures', |
108 | 108 | 'wikitweet-minute' => 'minute', |
Index: trunk/extensions/WikiTweet/WikiTweet.functions.php |
— | — | @@ -113,24 +113,24 @@ |
114 | 114 | |
115 | 115 | if ($l__nber_hours !=0 && $l__nber_minutes != 0 ) |
116 | 116 | { |
117 | | - $result = str_replace( "%time%" , "$l__nber_hours $hours $l__nber_minutes $minutes" , wfMsg( 'wikitweet-timeago' ) ); // "%time% ago" |
| 117 | + $result = wfMsgExt( 'wikitweet-timeago', 'parse', "$l__nber_hours $hours $l__nber_minutes $minutes" ); |
118 | 118 | } |
119 | 119 | elseif (($l__nber_hours != 0 && $l__nber_minutes == 0 ) || ($l__nber_hours >= 5 ) ) |
120 | 120 | { |
121 | | - $result = str_replace( "%time%" , "$l__nber_hours $hours" , wfMsg( 'wikitweet-timeago' ) ); // "%time% ago" |
| 121 | + $result = wfMsgExt( 'wikitweet-timeago', 'parse', "$l__nber_hours $hours" ); |
122 | 122 | } |
123 | 123 | elseif (($l__nber_minutes >= 5) || ($l__nber_minutes != 0 && $l__nber_seconds == 0 ) ) |
124 | 124 | { |
125 | | - $result = str_replace( "%time%" , "$l__nber_minutes $minutes" , wfMsg( 'wikitweet-timeago' ) ); // "%time% ago" |
| 125 | + $result = wfMsgExt( 'wikitweet-timeago', 'parse', "$l__nber_minutes $minutes" ); |
126 | 126 | } |
127 | 127 | elseif ($l__nber_minutes != 0 && $l__nber_seconds != 0 ) |
128 | 128 | { |
129 | | - $result = str_replace( "%time%" , "$l__nber_minutes $minutes $l__nber_seconds $seconds" , wfMsg( 'wikitweet-timeago' ) ); // "%time% ago" |
| 129 | + $result = wfMsgExt( 'wikitweet-timeago', 'parse', "$l__nber_minutes $minutes $l__nber_seconds $seconds" ); |
130 | 130 | } |
131 | 131 | elseif ($l__nber_seconds !=0 ) |
132 | 132 | { |
133 | | - $result = str_replace( "%time%" , "$l__nber_seconds $seconds" , wfMsg( 'wikitweet-timeago' ) ); // "%time% ago" |
| 133 | + $result = wfMsgExt( 'wikitweet-timeago', 'parse', "$l__nber_seconds $seconds" ); |
134 | 134 | } |
135 | | - return $result ; // a string |
| 135 | + return $result ; |
136 | 136 | } |
137 | 137 | } |