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

No known languages found for specification English. #5

Closed
meydominic opened this issue Apr 26, 2021 · 6 comments
Closed

No known languages found for specification English. #5

meydominic opened this issue Apr 26, 2021 · 6 comments

Comments

@meydominic
Copy link

Hey,
I am trying to build one of our projects but it fails with the following exception:

  ⨯ No known languages found for specification English.  stackTrace=
                                                           NoSuchLanguageError: No known languages found for specification English.
                                                               at Function.bySpec (/Users/dmey/workspace/drive/node_modules/dmg-license/lib/Language.js:35:19)
                                                               at Object.indexByLanguage (/Users/dmey/workspace/drive/node_modules/dmg-license/lib/Language.js:81:41)
                                                               at labelCache (/Users/dmey/workspace/drive/node_modules/dmg-license/lib/assembleLicenses.js:92:35)
                                                               at Object.assembleLicenses [as default] (/Users/dmey/workspace/drive/node_modules/dmg-license/lib/assembleLicenses.js:117:23)
                                                               at dmgLicensePlist (/Users/dmey/workspace/drive/node_modules/dmg-license/lib/index.js:27:78)
                                                               at dmgLicense (/Users/dmey/workspace/drive/node_modules/dmg-license/lib/index.js:21:62)
                                                               at dmgLicenseFromJSON (/Users/dmey/workspace/drive/node_modules/dmg-license/lib/index.js:37:18)
                                                               at addLicenseToDmg (/Users/dmey/workspace/drive/node_modules/dmg-builder/src/dmgLicense.ts:57:9)

The exact same configuration is working on my workmates device.

What is the exact problem in this case?

Thanks and best regards,
Dominic

@argv-minus-one
Copy link
Owner

argv-minus-one commented Apr 26, 2021

Instead of English, you need to use an IETF language tag like en-US or a numeric Classic Mac OS language code like 0. There's a list of which language tags and codes are supported.

Please reopen this issue if you're still having trouble.

@meydominic
Copy link
Author

Hey,
thanks for your help, but I don't know, where to set this tag or something else. I forgot to mention, that we're using electron-builder to build our applications. electron-builder has dmg-license as dependency.

In the documentation of electron-builder is the following part:

To add license to DMG, create file license_LANG_CODE.txt in the build resources. Multiple license files in different languages are supported — use lang postfix (e.g. _de, _ru)). For example, create files license_de.txt and license_en.txt in the build resources. If OS language is german, license_de.txt will be displayed. See map of language code to name.

You can also change the default button labels of the DMG by passing a json file named licenseButtons_LANG_CODE.json. The german file would be named: licenseButtons_de.json. The contain file should have the following format:

https://www.electron.build/configuration/dmg

@argv-minus-one
Copy link
Owner

Oh, I see. I've never used electron-builder, but if they're using dmg-license, then their documentation appears to be incorrect.

Try naming your license file something like license_en-us.txt (plain text, US English) or license_de-de.rtf (RTF, German). Does that work?

@meydominic
Copy link
Author

They switched to dmg-license some weeks ago and didn't update their documentation I think.

I'll test your recommendation and report back in a few minutes, thanks.

@meydominic
Copy link
Author

updated the issue on electron-builder repository: electron-userland/electron-builder#5834

@argv-minus-one
Copy link
Owner

Looks like everything's working now, so I'll go ahead and close this. Glad I could help!

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