-
Notifications
You must be signed in to change notification settings - Fork 34
(devtool) installer text adjustment #441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 27 commits
74cb4cc
e1e2f0b
6466d0d
0fd51f4
e14b66d
7ffc718
7977523
4afd3ff
901681f
974fa1a
9f0ca64
d2a1292
946c325
1f94e67
4b9c3cc
271b46b
418e603
f580259
23450e7
7e6c150
5c2126f
2a5c137
7d4808c
375aa01
5d3b374
842087d
5d43eee
87fdc04
9e96eab
8295e6d
910d5ff
edf1072
01f3e7a
182e39c
836ace7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -260,7 +260,24 @@ const installTrans = () => { | |
} | ||
translations = data as { [key: string]: string }; | ||
if (win != null) { | ||
win.setTitle(translations['PAGES.HOME.TITLE'] || '') | ||
interface PackageJson { | ||
version: string; | ||
} | ||
let packageJson: PackageJson = {} as PackageJson; | ||
let version = ''; | ||
let WinTitle = translations['PAGES.HOME.TITLE']; | ||
let WinTitle_err = ''; | ||
fs.readFile(path.join(__dirname, 'package.json'), 'utf8', (err, data) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. package.json is an internal src file, it won't be available in the release artifact. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I asked AI about this and they said it's feasible. I suggested trying compiling it, but I didn't compile it locally........... |
||
if (err) { | ||
console.warn('Error reading package.json:', err); | ||
} else { | ||
packageJson = JSON.parse(data); | ||
version = packageJson.version; | ||
WinTitle = '${WinTitle} v${version}'; | ||
WinTitle_err = 'v${version}'; | ||
} | ||
}); | ||
win.setTitle(WinTitle || WinTitle_err) | ||
} | ||
}); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"PAGES": { | ||
"CURRENT_LANGUAGE": { | ||
"TIPS": "this English json" | ||
}, | ||
"HOME": { | ||
"TITLE": "AMAI Installer", | ||
"CHOOSE_GAME_VERSION": "Choose Game Version", | ||
|
@@ -9,8 +12,8 @@ | |
"INCLUDE_COMMANDER": "Install Commander", | ||
"INCLUDE_COMMANDER_VSAI": "Vs Vanilla AI", | ||
"INCLUDE_COMMANDER_OFF": "No Commander", | ||
"OPTIMISE": "Use Optimised Scripts", | ||
"FORCELANG": "Override Default AI Language" | ||
"OPTIMISE": "Reduce System Load", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should make an onhover tooltip rather than change the message here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, no one may have read it, but I rely entirely on AI to consult a little bit on HTML adjustments, and the changes may not be as good as those made by professional engineers |
||
"FORCELANG": "Overwrite AI Chat Language" | ||
}, | ||
"APP": { | ||
"INSTALLING": "Installing into {{path}}", | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is dangerous, as uninstalling all the time could break maps that never installed the commander but do have a custom blizzard.j.
This needs to be an option or new menu options to run the uninstalls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few buttons, it may be necessary to readjust the layout