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

command line does not work on mac os #175

Open
h9j6k opened this issue Oct 20, 2024 · 3 comments
Open

command line does not work on mac os #175

h9j6k opened this issue Oct 20, 2024 · 3 comments

Comments

@h9j6k
Copy link

h9j6k commented Oct 20, 2024

Hello,

Thanks for your great work!

On a mac machine, command line usage produces an error as below

/path/to/translateLocally.app/Contents/MacOS/translateLocally -i text.de.srt -m de-en
Hint: Files might not be accessible by translateLocally because it is running inside Apple's sandbox. Try piping the file into translateLocally:

  translateLocally -m de-en < "text.de.srt"

"Couldn't open input file:text.de.srt"

How to bypass the sandbox write/read restriction?

Thanks.

@XapaJIaMnu
Copy link
Owner

@jelmervdl is this something we can do anything about?

@jelmervdl
Copy link
Collaborator

jelmervdl commented Oct 20, 2024

Nope, that's why the error message is there.

@h9j6k does the piping option mentioned there work for you? I.e. translateLocally -m de-en < "text.de.srt".

It should work pretty much the same, but it's technically the terminal reading the file, not translateLocally.

@h9j6k
Copy link
Author

h9j6k commented Oct 22, 2024

Thank you guys!

I am now having to apply a workaround in my bash script to change read/write paths in whatever translocally args need to

BERGAMOT_CONTAINER=~/Library/Containers/com.translatelocally.translateLocally/Data/Documents/

First copy all input files from working directory to the above, then copy all output files back.

This directory is where TransLocally.app currently as is without restriction removal can read and write.

Maybe further read/write privilege can be enabled by devs in the future?

https://developer.apple.com/documentation/xcode/configuring-the-macos-app-sandbox#Enable-managed-file-access

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

3 participants