Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.js |
— | — | @@ -149,14 +149,16 @@ |
150 | 150 | }, |
151 | 151 | /** |
152 | 152 | * Provides a way to extract a property of an object in a certain language, falling back on the property keyed as |
153 | | - * 'default'. If such key doesn't exist, the object itself is considered the actual value, which should ideally |
154 | | - * be the case so that you may use a string or object of any number of strings keyed by language with a default. |
| 153 | + * 'default' or 'default-rtl'. If such key doesn't exist, the object itself is considered the actual value, which |
| 154 | + * should ideally be the case so that you may use a string or object of any number of strings keyed by language |
| 155 | + * with a default. |
155 | 156 | * |
156 | 157 | * @param object Object to extract property from |
157 | 158 | * @param lang Language code, defaults to wgUserLanguage |
158 | 159 | */ |
159 | 160 | 'autoLang': function( object, lang ) { |
160 | | - return object[lang || wgUserLanguage] || object['default'] || object; |
| 161 | + var defaultKey = $( 'body' ).hasClass( 'rtl' ) ? 'default-rtl' : 'default'; |
| 162 | + return object[lang || wgUserLanguage] || object[defaultKey] || object['default'] || object; |
161 | 163 | }, |
162 | 164 | /** |
163 | 165 | * Provides a way to extract the path of an icon in a certain language, automatically appending a version number for |
Index: trunk/extensions/WikiEditor/modules/images/toolbar/button-sprite.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Index: trunk/extensions/WikiEditor/modules/images/toolbar/format-olist-rtl.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/extensions/WikiEditor/modules/images/toolbar/format-olist-rtl.png |
___________________________________________________________________ |
Added: svn:mime-type |
164 | 166 | + image/png |
Index: trunk/extensions/WikiEditor/modules/images/toolbar/format-ulist-rtl.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/extensions/WikiEditor/modules/images/toolbar/format-ulist-rtl.png |
___________________________________________________________________ |
Added: svn:mime-type |
165 | 167 | + image/png |
Index: trunk/extensions/WikiEditor/modules/images/toolbar/insert-redirect-rtl.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/extensions/WikiEditor/modules/images/toolbar/insert-redirect-rtl.png |
___________________________________________________________________ |
Added: svn:mime-type |
166 | 168 | + image/png |
Index: trunk/extensions/WikiEditor/modules/images/toolbar/format-indent-rtl.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/extensions/WikiEditor/modules/images/toolbar/format-indent-rtl.png |
___________________________________________________________________ |
Added: svn:mime-type |
167 | 169 | + image/png |
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.config.js |
— | — | @@ -261,8 +261,14 @@ |
262 | 262 | 'ulist': { |
263 | 263 | 'labelMsg': 'wikieditor-toolbar-tool-ulist', |
264 | 264 | 'type': 'button', |
265 | | - 'icon': 'format-ulist.png', |
266 | | - 'offset': [2, -1366], |
| 265 | + 'icon': { |
| 266 | + 'default': 'format-ulist.png', |
| 267 | + 'default-rtl': 'format-ulist-rtl.png' |
| 268 | + }, |
| 269 | + 'offset': { |
| 270 | + 'default': [2, -1366], |
| 271 | + 'default-rtl': [-70, -286] |
| 272 | + }, |
267 | 273 | 'action': { |
268 | 274 | 'type': 'encapsulate', |
269 | 275 | 'options': { |
— | — | @@ -277,8 +283,14 @@ |
278 | 284 | 'olist': { |
279 | 285 | 'labelMsg': 'wikieditor-toolbar-tool-olist', |
280 | 286 | 'type': 'button', |
281 | | - 'icon': 'format-olist.png', |
282 | | - 'offset': [2, -1078], |
| 287 | + 'icon': { |
| 288 | + 'default': 'format-olist.png', |
| 289 | + 'default-rtl': 'format-olist-rtl.png' |
| 290 | + }, |
| 291 | + 'offset': { |
| 292 | + 'default': [2, -1078], |
| 293 | + 'default-rtl': [-70, -358] |
| 294 | + }, |
283 | 295 | 'action': { |
284 | 296 | 'type': 'encapsulate', |
285 | 297 | 'options': { |
— | — | @@ -293,8 +305,14 @@ |
294 | 306 | 'indent': { |
295 | 307 | 'labelMsg': 'wikieditor-toolbar-tool-indent', |
296 | 308 | 'type': 'button', |
297 | | - 'icon': 'format-indent.png', |
298 | | - 'offset': [2, -646], |
| 309 | + 'icon': { |
| 310 | + 'default': 'format-indent.png', |
| 311 | + 'default-rtl': 'format-indent-rtl.png' |
| 312 | + }, |
| 313 | + 'offset': { |
| 314 | + 'default': [2, -646], |
| 315 | + 'default-rtl': [-70, -430] |
| 316 | + }, |
299 | 317 | 'action': { |
300 | 318 | 'type': 'encapsulate', |
301 | 319 | 'options': { |
— | — | @@ -433,8 +451,14 @@ |
434 | 452 | 'redirect': { |
435 | 453 | 'labelMsg': 'wikieditor-toolbar-tool-redirect', |
436 | 454 | 'type': 'button', |
437 | | - 'icon': 'insert-redirect.png', |
438 | | - 'offset': [-70, -142], |
| 455 | + 'icon': { |
| 456 | + 'default': 'insert-redirect.png', |
| 457 | + 'default-rtl': 'insert-redirect-rtl.png' |
| 458 | + }, |
| 459 | + 'offset': { |
| 460 | + 'default': [-70, -142], |
| 461 | + 'default-rtl': [-70, -502], |
| 462 | + }, |
439 | 463 | 'action': { |
440 | 464 | 'type': 'encapsulate', |
441 | 465 | 'options': { |