| 
									
										
										
										
											2018-09-14 02:10:51 +10:00
										 |  |  | const { app } = require('electron'); | 
					
						
							| 
									
										
										
										
											2018-02-08 09:26:37 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-29 01:18:47 +09:00
										 |  |  | const locale = process.argv[2].substr(11); | 
					
						
							| 
									
										
										
										
											2020-11-18 11:13:01 +09:00
										 |  |  | if (locale.length !== 0) { | 
					
						
							|  |  |  |   app.commandLine.appendSwitch('lang', locale); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-10-29 01:18:47 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 16:43:22 -06:00
										 |  |  | app.whenReady().then(() => { | 
					
						
							| 
									
										
										
										
											2020-11-18 11:13:01 +09:00
										 |  |  |   if (process.argv[3] === '--print-env') { | 
					
						
							|  |  |  |     process.stdout.write(String(process.env.LC_ALL)); | 
					
						
							|  |  |  |   } else { | 
					
						
							| 
									
										
										
										
											2022-11-09 07:50:43 -08:00
										 |  |  |     process.stdout.write(`${app.getLocale()}|${app.getSystemLocale()}|${JSON.stringify(app.getPreferredSystemLanguages())}`); | 
					
						
							| 
									
										
										
										
											2020-11-18 11:13:01 +09:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2018-02-08 09:26:37 -05:00
										 |  |  |   process.stdout.end(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 18:57:02 +09:00
										 |  |  |   app.quit(); | 
					
						
							| 
									
										
										
										
											2018-02-08 09:26:37 -05:00
										 |  |  | }); |