Index: trunk/extensions/CodeBrowse/CodeBrowseRepoListView.php |
— | — | @@ -2,7 +2,9 @@ |
3 | 3 | |
4 | 4 | class CodeBrowseRepoListView extends CodeBrowseView { |
5 | 5 | function getContent() { |
6 | | - return self::reallyGetContent(); |
| 6 | + global $wgOut; |
| 7 | + return $wgOut->parse( self::reallyGetContent() ); |
| 8 | + |
7 | 9 | } |
8 | 10 | static function reallyGetContent() { |
9 | 11 | $repos = CodeRepository::getRepoList(); |
Index: trunk/extensions/CodeBrowse/CodeBrowse.i18n.php |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$messages = array(); |
| 5 | + |
| 6 | +$messages['en'] = array( |
| 7 | + 'code-log' => 'log', // Might want to move this to CodeReview |
| 8 | + |
| 9 | + 'codebrowse' => 'CodeBrowse', |
| 10 | + 'codebrowse-not-found' => 'Could not find file $1.', |
| 11 | + 'codebrowse-dir-listing' => 'Directory index of $1', |
| 12 | + 'codebrowse-name' => 'Name', |
| 13 | + 'codebrowse-revision' => 'Revision', |
| 14 | + 'codebrowse-lastchange' => 'Last modified date', |
| 15 | + 'codebrowse-size' => 'Size', |
| 16 | +); |
| 17 | + |
| 18 | + |
\ No newline at end of file |
Property changes on: trunk/extensions/CodeBrowse/CodeBrowse.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 19 | + native |
Index: trunk/extensions/CodeBrowse/CodeBrowse.php |
— | — | @@ -16,3 +16,4 @@ |
17 | 17 | $wgAutoloadClasses['SpecialCodeBrowse'] = $dir.'/SpecialCodeBrowse.php'; |
18 | 18 | $wgSpecialPages['CodeBrowse'] = 'SpecialCodeBrowse'; |
19 | 19 | |
| 20 | +$wgExtensionMessagesFiles['CodeBrowse'] = $dir . '/CodeBrowse.i18n.php'; |
Index: trunk/extensions/CodeBrowse/SpecialCodeBrowse.php |
— | — | @@ -5,6 +5,8 @@ |
6 | 6 | parent::__construct( 'CodeBrowse', 'codebrowse' ); |
7 | 7 | } |
8 | 8 | function execute( $par = '' ) { |
| 9 | + wfLoadExtensionMessages( 'CodeBrowse' ); |
| 10 | + |
9 | 11 | $this->setHeaders(); |
10 | 12 | |
11 | 13 | global $wgRequest; |
Index: trunk/extensions/CodeBrowse/CodeBrowseItemView.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | $contents = $this->svn->getDirList( $this->mBasePath ); |
18 | 18 | |
19 | 19 | if ( !is_array( $contents ) ) |
20 | | - return ''; // FIXME |
| 20 | + return wfMsgHtml( 'codebrowse-not-found', $this->mPath ); // FIXME |
21 | 21 | if ( count( $contents ) == 1 && $contents[0]['type'] == 'file' ) { |
22 | 22 | return $this->showFile(); |
23 | 23 | } else { |
— | — | @@ -61,9 +61,14 @@ |
62 | 62 | function contentLine( $item ) { |
63 | 63 | global $wgUser, $wgLang; |
64 | 64 | $sk = $wgUser->getSkin(); |
| 65 | + |
| 66 | + $name = $item['name']; |
| 67 | + if ( $item['type'] == 'dir' && substr( $name, -1 ) != '/' ) |
| 68 | + $name .= '/'; |
| 69 | + |
65 | 70 | return |
66 | 71 | "\t<tr><td>".$sk->link( SpecialPage::getTitleFor( 'CodeBrowse' ), |
67 | | - $item['name'], array(), array( 'path' => $this->mPath.$item['name'] ) |
| 72 | + $name, array(), array( 'path' => $this->mPath.$name ) |
68 | 73 | ). |
69 | 74 | "</td><td>".$item['created_rev']. |
70 | 75 | "</td><td>".$sk->link( SpecialPage::getTitleFor( |