Packaging window shows incorrect labels and help
Closed this issue · 13 comments
I've noticed two issues in the packaging window in Dart 2.0.18 on Windows and Mac, where it seems that the correct labels and help text are not being sourced from en-US.json.
BagIt Profile
is displaying asJobPackageOp_bagItProfileId_label
and the contextual help that appears when you hover over the question mark saysJobPackageOp_bagItProfileId_help
. I would imagine fromen-US.json
that this is the correct help text:"Choose the BagIt profile to which your bag should conform."
Serialization
is displaying asBag It Serialization
and the contextual help saysJobPackageOp_bagItSerialization_help
whenen-US.json
suggests that it should say"How should this bag be serialized or compressed?"
- I'm assuming that BagIt Profile and Serialization are the correct labels based on https://github.com/APTrust/dart/blob/master/locales/en-US.json#L302 and https://github.com/APTrust/dart/blob/master/locales/en-US.json#L174
I tried my best to fix this but I've no idea how javascript and electron works. I thought I could just fix the typos in ./ui/templates/job/packaging.html
but I'm guessing that the issue is coded a bit deeper.
Thanks for reporting this. A quick check shows this is working in the dev version. The problem may have occurred in one of the build steps, or in an incorrect runtime setting. I'll look into it.
Thank you! I should say that I cloned the master branch and built on mac with ./node_modules/.bin/electron-builder and still saw the same issue. Would love to see the fix if only to learn more!
Which OS are you using? Mac, Windows, or Linux? And do you know your system's locale setting? On Mac, you can get it with this command in a terminal:
defaults read .GlobalPreferences AppleLanguages
I used Mac 12.3 to test and build, but I also tested this out on Windows as well and saw the same behaviour when using the latest compiled release.
% defaults read .GlobalPreferences AppleLanguages
(
"en-IE"
)
This should be fixed, but wait for next release to test.
dart % ./node_modules/.bin/electron-builder
• electron-builder version=22.14.13 os=21.4.0
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist/builder-effective-config.yaml
• skipped dependencies rebuild reason=npmRebuild is set to false
• packaging platform=darwin arch=x64 electron=11.5.0 appOutDir=dist/mac
• skipped macOS application code signing reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities= 0 identities found
Valid identities only
0 valid identities found
• building target=DMG arch=x64 file=dist/DART-2.0.18.dmg
⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT failedTask=build stackTrace=Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
at /Users/kieranjol/dart/node_modules/builder-util/src/util.ts:133:18
at exithandler (node:child_process:406:5)
at ChildProcess.errorhandler (node:child_process:418:5)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I have no idea where that extra field is coming from. It doesn't exist in the template. Does that extra blank field appear if you run the app from the source directory using npm start
?
As for the build error, that's a bug in electron-builder, which assumes you have a local python2 installation. Python 2 is no longer included in MacOS 12 / Monterey. I'm really surprised no one has complained about this yet. For now, you have to manually install python 2 for electron-build to work.
Ok, so I've resolved the issue, it was a result of my stupidity. I'd been experimenting with the code and forgot to ditch my changes when pulling down the latest commit. Once I built on a clean version of the repo, it works perfectly. I apologise for wasting your time on this bit!
No problem. Glad it's working. I'll let you know when a new build is out.
Thank you!
Fix is now available in version 2.0.19
Tested this in macOS and all works well, thank you!