Ticket #5425: 5425.patch
File 5425.patch, 4.5 KB (added by , 15 years ago) |
---|
-
_source/lang/en.js
657 657 scayt : 658 658 { 659 659 title : 'Spell Check As You Type', 660 opera_title : 'Not supported by Opera', 660 661 enable : 'Enable SCAYT', 661 662 disable : 'Disable SCAYT', 662 663 about : 'About SCAYT', … … 668 669 ignoreAll : 'Ignore All', 669 670 addWord : 'Add Word', 670 671 emptyDic : 'Dictionary name should not be empty.', 672 671 673 optionsTab : 'Options', 674 allCaps : 'Ignore All-Caps Words', 675 ignoreDomainNames : 'Ignore Domain Names', 676 mixedCase : 'Ignore Words with Mixed Case', 677 mixedWithDigits : 'Ignore Words with Numbers', 678 672 679 languagesTab : 'Languages', 680 673 681 dictionariesTab : 'Dictionaries', 682 dic_field_name : 'Dictionary name', 683 dic_create : 'Create', 684 dic_restore : 'Restore', 685 dic_delete : 'Delete', 686 dic_rename : 'Rename', 687 dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type it\'s name and click the Restore button.', 688 674 689 aboutTab : 'About' 675 690 }, 676 691 -
_source/plugins/scayt/plugin.js
10 10 11 11 (function() 12 12 { 13 13 14 var commandName = 'scaytcheck', 14 15 openPage = '', 15 16 scayt_paused = null, … … 231 232 { 232 233 // SCAYT doesn't work with Opera. 233 234 if ( CKEDITOR.env.opera ) 234 return ;235 return editor.fire( 'showScaytState' ); 235 236 if ( this.engineLoaded === true ) 236 237 return onEngineLoad.apply( editor ); // Add new instance. 237 238 else if ( this.engineLoaded == -1 ) // We are waiting. … … 330 331 else if ( !editor.config.scayt_autoStartup && plugin.engineLoaded >= 0 ) // Load first time 331 332 { 332 333 this.setState( CKEDITOR.TRISTATE_DISABLED ); 333 334 editor.on( 'showScaytState', function()335 {336 this.removeListener();337 this.setState( plugin.isScaytEnabled( editor ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );338 },339 this);340 341 334 plugin.loadEngine( editor ); 342 335 } 343 336 } … … 358 351 { 359 352 var moreSuggestions = {}; 360 353 var mainSuggestions = {}; 361 354 362 355 // Scayt command. 363 356 var command = editor.addCommand( commandName, commandDefinition ); 364 357 … … 444 437 editor.ui.add( 'Scayt', CKEDITOR.UI_MENUBUTTON, 445 438 { 446 439 label : editor.lang.scayt.title, 447 title : editor.lang.scayt.title,440 title : CKEDITOR.env.opera ? editor.lang.scayt.opera_title : editor.lang.scayt.title, 448 441 className : 'cke_button_scayt', 449 442 onRender: function() 450 443 { … … 459 452 var isEnabled = plugin.isScaytEnabled( editor ); 460 453 461 454 editor.getMenuItem( 'scaytToggle' ).label = editor.lang.scayt[ isEnabled ? 'disable' : 'enable' ]; 462 455 463 456 return { 464 457 scaytToggle : CKEDITOR.TRISTATE_OFF, 465 458 scaytOptions : isEnabled && plugin.uiTabs[0] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, … … 602 595 return mainSuggestions; 603 596 }); 604 597 } 605 606 // Start plugin 607 if ( editor.config.scayt_autoStartup ) 608 { 609 var showInitialState = function() 598 599 var showInitialState = function() 610 600 { 611 601 editor.removeListener( 'showScaytState', showInitialState ); 612 command.setState( plugin.isScaytEnabled( editor ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF ); 602 603 if (!CKEDITOR.env.opera) 604 command.setState(plugin.isScaytEnabled(editor) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF); 605 else 606 command.setState(CKEDITOR.TRISTATE_DISABLED) 613 607 }; 614 editor.on( 'showScaytState', showInitialState ); 608 609 editor.on( 'showScaytState', showInitialState ); 610 if (CKEDITOR.env.opera) 615 611 editor.on( 'instanceReady', function() 612 { 613 showInitialState(); 614 }); 615 616 // Start plugin 617 if ( editor.config.scayt_autoStartup ) 618 { 619 editor.on( 'instanceReady', function() 616 620 { 617 621 plugin.loadEngine( editor ); 618 622 }); 619 623 } 624 620 625 621 626 // Prevent word marker line from displaying in elements path. (#3570) 622 627 var elementsPathFilters;