src/preferences/PreferencesBase.js
function (oldContext, newContext) {
            var changes = [],
                data    = this.data;

            _.each(this._layers, function (layer) {
                if (data[layer.key] && oldContext[layer.key] !== newContext[layer.key]) {
                    var changesInLayer = layer.contextChanged(data[layer.key],
                                                              oldContext,
                                                              newContext);
                    if (changesInLayer) {
                        changes.push(changesInLayer);
                    }
                }
            });
            return _.union.apply(null, changes);
        }
function (oldContext, newContext) {
            var changes = [],
                data    = this.data;

            _.each(this._layers, function (layer) {
                if (data[layer.key] && oldContext[layer.key] !== newContext[layer.key]) {
                    var changesInLayer = layer.contextChanged(data[layer.key],
                                                              oldContext,
                                                              newContext);
                    if (changesInLayer) {
                        changes.push(changesInLayer);
                    }
                }
            });
            return _.union.apply(null, changes);
        }
function ( oldContext , newContext ) { var changes = [ ] , data = this . data ; _ . each ( this . _layers , function ( layer ) { if ( data [ layer . key ] && oldContext [ layer . key ] !== newContext [ layer . key ] ) { var changesInLayer = layer . contextChanged ( data [ layer . key ] , oldContext , newContext ) ; if ( changesInLayer ) { changes . push ( changesInLayer ) ; } } } ) ; return _ . union . apply ( null , changes ) ; }
Determines if there are likely to be any changes based on the change
of context.

@param {{path: string, language: string}} oldContext Old context
@param {{path: string, language: string}} newContext New context
@return {Array.<string>} List of changed IDs
Determines if there are likely to be any changes based on the change of context .