Skip to content

Commit 7bcc338

Browse files
committed
Unify multilingual attribute definitions using environment variables.
1 parent 37d32ad commit 7bcc338

File tree

8 files changed

+15
-29
lines changed

8 files changed

+15
-29
lines changed

src/excel-cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const mssql = require('mssql');
44
const yargs = require('yargs');
55

66
// 언어 설정
7-
const LANGUAGE = process.env.LANGUAGE || 'kr';
7+
const LANGUAGE = process.env.LANGUAGE || 'en';
88

99
// 다국어 메시지
1010
const messages = {

src/excel-generator.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ const ExcelJS = require('exceljs');
22
const excelStyleHelper = require('./excel-style-helper');
33
const FileUtils = require('./file-utils');
44

5-
// 언어 설정 (명령줄 인수에서 가져오기)
6-
const args = process.argv.slice(2);
7-
const langArg = args.find(arg => arg.startsWith('--lang='));
8-
const LANGUAGE = langArg ? langArg.split('=')[1] : 'en';
5+
// 언어 설정 (환경 변수 사용, 기본값 영어)
6+
const LANGUAGE = process.env.LANGUAGE || 'en';
97

108
// 다국어 메시지
119
const messages = {

src/excel-style-helper.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77

88
const path = require('path');
99

10-
// 언어 설정 (명령줄 인수에서 가져오기)
11-
const args = process.argv.slice(2);
12-
const langArg = args.find(arg => arg.startsWith('--lang='));
13-
const LANGUAGE = langArg ? langArg.split('=')[1] : 'en';
10+
// 언어 설정 (환경 변수 사용, 기본값 영어)
11+
const LANGUAGE = process.env.LANGUAGE || 'en';
1412

1513
// 다국어 메시지
1614
const messages = {

src/file-utils.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ const path = require('path');
44
// pkg 실행 파일 경로 처리
55
const APP_ROOT = process.pkg ? path.dirname(process.execPath) : process.cwd();
66

7-
// 언어 설정 (명령줄 인수에서 가져오기)
8-
const args = process.argv.slice(2);
9-
const langArg = args.find(arg => arg.startsWith('--lang='));
10-
const LANGUAGE = langArg ? langArg.split('=')[1] : 'en';
7+
// 언어 설정 (환경 변수 사용, 기본값 영어)
8+
const LANGUAGE = process.env.LANGUAGE || 'en';
119

1210
// 다국어 메시지
1311
const messages = {

src/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ const QueryParser = require('./query-parser');
77
const ExcelGenerator = require('./excel-generator');
88
const MSSQLHelper = require('./mssql-helper');
99

10-
// 언어 설정 (명령줄 인수에서 가져오기)
11-
const args = process.argv.slice(2);
12-
const langArg = args.find(arg => arg.startsWith('--lang='));
13-
const LANGUAGE = langArg ? langArg.split('=')[1] : 'en';
10+
// 언어 설정 (환경 변수 사용, 기본값 영어)
11+
const LANGUAGE = process.env.LANGUAGE || 'en';
1412

1513
// 다국어 메시지
1614
const messages = {

src/query-parser.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ const xml2js = require('xml2js');
33
const JSON5 = require('json5');
44
const FileUtils = require('./file-utils');
55

6-
// 언어 설정 (명령줄 인수에서 가져오기)
7-
const args = process.argv.slice(2);
8-
const langArg = args.find(arg => arg.startsWith('--lang='));
9-
const LANGUAGE = langArg ? langArg.split('=')[1] : 'en';
6+
// 언어 설정 (환경 변수 사용, 기본값 영어)
7+
const LANGUAGE = process.env.LANGUAGE || 'en';
108

119
// 다국어 메시지
1210
const messages = {

src/style-manager.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ const fs = require('fs');
22
const path = require('path');
33
const xml2js = require('xml2js');
44

5-
// 언어 설정 (명령줄 인수에서 가져오기)
6-
const args = process.argv.slice(2);
7-
const langArg = args.find(arg => arg.startsWith('--lang='));
8-
const LANGUAGE = langArg ? langArg.split('=')[1] : 'en';
5+
// 언어 설정 (환경 변수 사용, 기본값 영어)
6+
const LANGUAGE = process.env.LANGUAGE || 'en';
97

108
// 다국어 메시지
119
const messages = {

src/variable-processor.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
const MSSQLHelper = require('./mssql-helper');
22

3-
// 언어 설정 (명령줄 인수에서 가져오기)
4-
const args = process.argv.slice(2);
5-
const langArg = args.find(arg => arg.startsWith('--lang='));
6-
const LANGUAGE = langArg ? langArg.split('=')[1] : 'en';
3+
// 언어 설정 (환경 변수 사용, 기본값 영어)
4+
const LANGUAGE = process.env.LANGUAGE || 'en';
75

86
// 다국어 메시지
97
const messages = {

0 commit comments

Comments
 (0)