Index: trunk/extensions/Translate/api/ApiAggregateGroups.php |
— | — | @@ -173,7 +173,7 @@ |
174 | 174 | public static function getAllPages() { |
175 | 175 | $groups = MessageGroups::getAllGroups(); |
176 | 176 | $pages = array(); |
177 | | - foreach ( $groups as $group ) { |
| 177 | + foreach ( $groups as $group ) { |
178 | 178 | if ( $group instanceof WikiPageMessageGroup ) { |
179 | 179 | $pages[$group->getId()] = $group->getTitle()->getPrefixedText(); |
180 | 180 | } |
Index: trunk/extensions/Translate/resources/ext.translate.special.aggregategroups.js |
— | — | @@ -93,11 +93,11 @@ |
94 | 94 | } |
95 | 95 | |
96 | 96 | /* |
97 | | - * Replace some special characters like space, comma, brackets etc to _ in a string. Also convert it to lowercase. |
| 97 | + * Replace some special characters like space, dots, comma, brackets etc to _ in a string. Also convert it to lowercase. |
98 | 98 | */ |
99 | 99 | function createId( s ){ |
100 | 100 | if ( s !== undefined ) { |
101 | | - return s.toLowerCase().replace( /[\x00-\x1f\x23\x2c\x3c\x3e\x5b\x5d\x7b\x7c\x7d\x7f\s]+/g, '_' ); |
| 101 | + return 'ag-' + s.toLowerCase().replace( /[\x00-\x1f\x23\x2c\x2e\x3c\x3e\x5b\x5d\x7b\x7c\x7d\x7f\s]+/g, '_' ); |
102 | 102 | } |
103 | 103 | } |
104 | 104 | |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | $div.data( 'id', aggregateGroupId ); |
131 | 131 | if ( $select.length > 0 ){ |
132 | 132 | var $groupSelector = $( '<select>' ).attr('id', 'mw-tpa-groupselect-' + aggregateGroupId ); |
133 | | - $.each(data.aggregategroups.groups, function( key, value) { |
| 133 | + $.each( data.aggregategroups.groups, function( key, value ) { |
134 | 134 | $groupSelector.append( $( '<option>', { value : key } ).text( value ) ); |
135 | 135 | } ); |
136 | 136 | var $addButton = $( $( 'input.tp-aggregate-add-button' )[0]).clone(); |