Skip to content
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

Packaging window shows incorrect labels and help #516

Closed
kieranjol opened this issue Apr 12, 2022 · 13 comments
Closed

Packaging window shows incorrect labels and help #516

kieranjol opened this issue Apr 12, 2022 · 13 comments

Comments

@kieranjol
Copy link

kieranjol commented Apr 12, 2022

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 as JobPackageOp_bagItProfileId_label and the contextual help that appears when you hover over the question mark says JobPackageOp_bagItProfileId_help. I would imagine from en-US.json that this is the correct help text: "Choose the BagIt profile to which your bag should conform."
  • Serialization is displaying as Bag It Serialization and the contextual help says JobPackageOp_bagItSerialization_help when en-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.

Screenshot 2022-04-12 at 17 33 28

@diamondap
Copy link
Member

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.

@kieranjol
Copy link
Author

kieranjol commented Apr 12, 2022

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!

@diamondap
Copy link
Member

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

@kieranjol
Copy link
Author

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"
)

@diamondap
Copy link
Member

This should be fixed, but wait for next release to test.

@kieranjol
Copy link
Author

Brilliant! I know you said to wait, but I ran git pull && ./node_modules/.bin/electron-builder and I can see the fixes, but there's an extra blank field there now. Perhaps this is a build issue on my end but thought I'd flag.
Screenshot 2022-04-13 at 15 21 19

@kieranjol
Copy link
Author

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)

@diamondap diamondap reopened this Apr 13, 2022
@diamondap
Copy link
Member

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.

@kieranjol
Copy link
Author

kieranjol commented Apr 13, 2022

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!

@diamondap
Copy link
Member

No problem. Glad it's working. I'll let you know when a new build is out.

@kieranjol
Copy link
Author

Thank you!

@diamondap
Copy link
Member

Fix is now available in version 2.0.19

Mac OSX v2.0.19
Windows v2.0.19
Linux v2.0.19

@kieranjol
Copy link
Author

Tested this in macOS and all works well, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants