Ticket #5425: 5425.patch

File 5425.patch, 4.5 KB (added by WebSpellChecker.net, 14 years ago)
  • _source/lang/en.js

     
    657657        scayt :
    658658        {
    659659                title                   : 'Spell Check As You Type',
     660                opera_title             : 'Not supported by Opera',
    660661                enable                  : 'Enable SCAYT',
    661662                disable                 : 'Disable SCAYT',
    662663                about                   : 'About SCAYT',
     
    668669                ignoreAll               : 'Ignore All',
    669670                addWord                 : 'Add Word',
    670671                emptyDic                : 'Dictionary name should not be empty.',
     672               
    671673                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               
    672679                languagesTab    : 'Languages',
     680               
    673681                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               
    674689                aboutTab                : 'About'
    675690        },
    676691
  • _source/plugins/scayt/plugin.js

     
    1010
    1111(function()
    1212{
     13       
    1314        var commandName         = 'scaytcheck',
    1415                openPage                = '',
    1516                scayt_paused    = null,
     
    231232                {
    232233                        // SCAYT doesn't work with Opera.
    233234                        if ( CKEDITOR.env.opera )
    234                                 return;
     235                                return editor.fire( 'showScaytState' );
    235236                        if ( this.engineLoaded === true )
    236237                                return onEngineLoad.apply( editor );    // Add new instance.
    237238                        else if ( this.engineLoaded == -1 )                     // We are waiting.
     
    330331                        else if ( !editor.config.scayt_autoStartup && plugin.engineLoaded >= 0 )        // Load first time
    331332                        {
    332333                                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 
    341334                                plugin.loadEngine( editor );
    342335                        }
    343336                }
     
    358351                {
    359352                        var moreSuggestions = {};
    360353                        var mainSuggestions = {};
    361 
     354                       
    362355                        // Scayt command.
    363356                        var command = editor.addCommand( commandName, commandDefinition );
    364357
     
    444437                                editor.ui.add( 'Scayt', CKEDITOR.UI_MENUBUTTON,
    445438                                        {
    446439                                                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,
    448441                                                className : 'cke_button_scayt',
    449442                                                onRender: function()
    450443                                                {
     
    459452                                                        var isEnabled = plugin.isScaytEnabled( editor );
    460453
    461454                                                        editor.getMenuItem( 'scaytToggle' ).label = editor.lang.scayt[ isEnabled ? 'disable' : 'enable' ];
    462 
     455                                                       
    463456                                                        return {
    464457                                                                scaytToggle  : CKEDITOR.TRISTATE_OFF,
    465458                                                                scaytOptions : isEnabled && plugin.uiTabs[0] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
     
    602595                                                return mainSuggestions;
    603596                                        });
    604597                        }
    605 
    606                         // Start plugin
    607                         if ( editor.config.scayt_autoStartup )
    608                         {
    609                                 var showInitialState = function()
     598                       
     599                        var showInitialState = function()
    610600                                {
    611601                                        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)
    613607                                };
    614                                 editor.on( 'showScaytState', showInitialState );
     608                       
     609                        editor.on( 'showScaytState', showInitialState );
     610                        if (CKEDITOR.env.opera)
    615611                                editor.on( 'instanceReady', function()
     612                                        {
     613                                                showInitialState();
     614                                        });
     615                               
     616                        // Start plugin
     617                        if ( editor.config.scayt_autoStartup )
     618                        {
     619                                editor.on( 'instanceReady', function()
    616620                                {
    617621                                        plugin.loadEngine( editor );
    618622                                });
    619623                        }
     624                       
    620625
    621626                        // Prevent word marker line from displaying in elements path. (#3570)
    622627                        var elementsPathFilters;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy