@@ -52,8 +52,8 @@ export class RecorderApp {
5252 private _actions : actions . ActionInContext [ ] = [ ] ;
5353 private _userSources : Source [ ] = [ ] ;
5454 private _recorderSources : Source [ ] = [ ] ;
55- private _primaryLanguage : string ;
56- private _selectedLanguageId : string ;
55+ private _primaryGeneratorId : string ;
56+ private _selectedGeneratorId : string ;
5757
5858 private constructor ( recorder : Recorder , params : RecorderAppParams , page : Page , wsEndpointForTest : string | undefined ) {
5959 this . _page = page ;
@@ -70,8 +70,8 @@ export class RecorderApp {
7070 } ;
7171
7272 this . _throttledOutputFile = params . outputFile ? new ThrottledFile ( params . outputFile ) : null ;
73- this . _primaryLanguage = process . env . TEST_INSPECTOR_LANGUAGE || params . language || determinePrimaryLanguage ( params . sdkLanguage ) ;
74- this . _selectedLanguageId = this . _primaryLanguage ;
73+ this . _primaryGeneratorId = process . env . TEST_INSPECTOR_LANGUAGE || params . language || determinePrimaryGeneratorId ( params . sdkLanguage ) ;
74+ this . _selectedGeneratorId = this . _primaryGeneratorId ;
7575 }
7676
7777 private async _init ( inspectedContext : BrowserContext ) {
@@ -133,7 +133,7 @@ export class RecorderApp {
133133 const source = [ ...this . _recorderSources , ...this . _userSources ] . find ( s => s . id === data . params . fileId ) ;
134134 if ( source ) {
135135 if ( source . isRecorded )
136- this . _selectedLanguageId = source . id ;
136+ this . _selectedGeneratorId = source . id ;
137137 this . _recorder . setLanguage ( source . language ) ;
138138 }
139139 return ;
@@ -358,9 +358,9 @@ export class RecorderApp {
358358 } ;
359359 source . revealLine = text . split ( '\n' ) . length - 1 ;
360360 recorderSources . push ( source ) ;
361- if ( languageGenerator . id === this . _primaryLanguage )
361+ if ( languageGenerator . id === this . _primaryGeneratorId )
362362 this . _throttledOutputFile ?. setContent ( source . text ) ;
363- if ( reveal === 'reveal' && source . id === this . _selectedLanguageId )
363+ if ( reveal === 'reveal' && source . id === this . _selectedGeneratorId )
364364 revealSourceId = source . id ;
365365 }
366366
@@ -370,8 +370,8 @@ export class RecorderApp {
370370 }
371371}
372372
373- // For example, if the SDK language is 'javascript', we return 'playwright-test' as the primary language .
374- function determinePrimaryLanguage ( sdkLanguage : Language ) : string {
373+ // For example, if the SDK language is 'javascript', this returns 'playwright-test'.
374+ function determinePrimaryGeneratorId ( sdkLanguage : Language ) : string {
375375 for ( const language of languageSet ( ) ) {
376376 if ( language . highlighter === sdkLanguage )
377377 return language . id ;
0 commit comments