Index: trunk/extensions/HTMLets/HTMLets.i18n.php |
— | — | @@ -10,6 +10,8 @@ |
11 | 11 | |
12 | 12 | $messages['en'] = array( |
13 | 13 | 'htmlets-desc' => 'Lets you inline HTML snippets from files using the <code><htmlet></code> tag', |
| 14 | + 'htmlets-filenotfound' => 'Cannot find HTML file $1', |
| 15 | + 'htmlets-loadfailed' => 'Failed to load html file $1', |
14 | 16 | ); |
15 | 17 | |
16 | 18 | /** Message documentation (Message documentation) |
Index: trunk/extensions/HTMLets/HTMLets.php |
— | — | @@ -89,11 +89,11 @@ |
90 | 90 | $f = "$dir/$name"; |
91 | 91 | |
92 | 92 | if ( !preg_match('!^\w+://!', $dir ) && !file_exists( $f ) ) { |
93 | | - $output = '<div class="error">Can\'t find html file ' . htmlspecialchars( $name ) . '</div>'; |
| 93 | + $output = Html::rawElement( 'div', array( 'class' => 'error' ), wfMsgForContent( 'htmlets-filenotfound', htmlspecialchars( $name ) ) ); |
94 | 94 | } else { |
95 | 95 | $output = file_get_contents( $f ); |
96 | 96 | if ( $output === false ) { |
97 | | - $output = '<div class="error">Failed to load html file ' . htmlspecialchars( $name ) . '</div>'; |
| 97 | + $output = Html::rawElement( 'div', array( 'class' => 'error' ), wfMsgForContent( 'htmlets-loadfailed', htmlspecialchars( $name ) ) ); |
98 | 98 | } |
99 | 99 | } |
100 | 100 | |