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

Error during "make" process in sbt console #127

Closed
Pafzedog opened this issue Apr 8, 2020 · 10 comments
Closed

Error during "make" process in sbt console #127

Pafzedog opened this issue Apr 8, 2020 · 10 comments

Comments

@Pafzedog
Copy link

Pafzedog commented Apr 8, 2020

Hello,

I was trying to translate the webapp and I'm facing this error during make process :

[error] stack trace is suppressed; run last webapp / Compile / managedResources for the full output
[error] (webapp / Compile / managedResources) java.io.IOException: Cannot run program "elm" (in directory "/home/pafzedog/sharry-master/modules/webapp"): error=2, Aucun fichier ou dossier de ce type

What I did is :

  • Download zip of repository and extract it
  • Installing sbt with last release (1.3.9)
  • Translate some text in several View.elm files
  • open terminal at "Sharry-master" folder end run "sbt"
  • run make or make-deb in sbt shell

Can you help me with this error and tell me if this is this way I can translate a bit the UI ?

@eikek
Copy link
Owner

eikek commented Apr 8, 2020

Hello,

thank you for your interest and making me aware of this documentation bug.

You need to install Elm, too. I'm sorry, I missed this in the docs! You can check via elm --help if it is installed. This program is executed from within sbt. And yes, this is a good way to start translating. If you like to contribute your work via a pull request, I'd suggest to git clone the repository instead of downloading the source zip. But it works very well using the zip file otherwise.

Once make succeeds, you can type reStart in the sbt shell which will start the server. Then you can go to http://localhost:9090 and see the app. After this type ~ compile in the sbt shell. If you cange a source file now, they get recompiled automatically. You already found the correct files to look at. The view related code is in files Page/*/View.elm and in Comp/*.elm files in their view function. Once you finished, you can run make-zip or make-deb to create a final package that can be installed.

Translation would be awesome! Unfortunately, the webapp is not really prepared – it contains all strings hardcoded :(. If you are interested in contributing your work and make integrating it easier, maybe you can add the translation to some extra file? I can guide you if you want.

@Pafzedog
Copy link
Author

Pafzedog commented Apr 9, 2020

Hello,

Thanks for the quick and detailled reply :)
With "Elm" installed, I was able to test the translated UI on localhost, I missed some elements but I think you pointed me to their path above.
I would be glad to contibute to your work but I'm not develloper and have no idea how to separate tranlation files of the core code so if you can guide me and give me some advices, I'll tell you if this is in my scopes (and obviously if I have enough free time)

@eikek
Copy link
Owner

eikek commented Apr 9, 2020

Hi, that is great, thank you for your willingness to try it. I can prepare something and try to guide you. I think there will be some need to modify source code, but it should be very simple. But don't worry, if you find it too cumbersome or tedious or whatever, simply stop or ask or both :-). Of course, freetime is very precious, there is no time constraint whatsoever of course. I'll also need some time to prepare something. I'll get back to you.

@Pafzedog
Copy link
Author

Hi @eikek .
I'm over with translation :)
Result is very great !
just one more thing :

  • How can I disable Elm debugger during make process ?

I found this line in file build.sbt :

val elmSettings = Seq(
  elmCompileMode := ElmCompileMode.Debug,

Should I replace ElmCompileMode.Debug with ElmCompileMode.Production ?

and should I have to redo full "make" or just "make-deb" ?

@eikek
Copy link
Owner

eikek commented Apr 10, 2020

Hi @Pafzedog ,
that's great to hear! Unfortunately, I'm not done with preparing things. I hoped I could externalize all the strings so you would have an easier time translating :) I started something at the feature/translation branch, but it's going to take a few more days I guess. But that's no problem, I can later move your strings into these files.

Regarding elm debug settings: That is the right place to change the default value. But: if you run make then it will use production setting instead of debug. When running ~ compile it will use the default, which is debug. So usually it's enough to just run make at the end (or make-zip etc) to have a final package, where production settings are applied. You can also just change the current value at the sbt shell with set webapp/elmCompileMode := ElmCompileMode.Production – and then compile will also use this value.

@Pafzedog
Copy link
Author

hi @eikek ,
no problem, no hurry with this.
I wanted to make a try and voilà ...
When you think I can start (with your explanations/advices), I will be happy to fill or create translation files with my strings.
for the record, I think I won't be free of time during two next weeks because I'm in hollydays with my childs.
Regarding the compilation, you're right, I didn't know the default debug option of ~ compile and I launched directly the make-deb at the end.
Would you be open I suggest some light features I think it's missing ?
Thanks again for this really awesome app :)

@eikek
Copy link
Owner

eikek commented Apr 10, 2020

Hi @Pafzedog ,
thanks for your dedication and the kind words :). I'm writing here, once I think I'm done with some guidance.

Sure, I'm open for feature requests. You can create issues for them or just write me a mail (the address can be found when running git log).

Have a great time with your kids!

eikek added a commit that referenced this issue Apr 13, 2020
- Fixes front-page links to the documentation

- Mention to install elm to build the app.

- Add information about buffering to nginx reverse proxy. Thanks to
  @hoedlmoser.

Issues: #130, #131, #127
@eikek
Copy link
Owner

eikek commented Apr 14, 2020

Hi @Pafzedog ,

hope you are having a good time! I created a wiki page with some guidance on translation. It looks a bit large, I hope not too scary :-) https://github.com/eikek/sharry/wiki/Translation

@eikek
Copy link
Owner

eikek commented May 3, 2020

Hi @Pafzedog , hope you don't mind if I close this issue. The initial topic was the documentation problem and then I hijacked it for translation stuff :-) If you feel like it, just open another issue regarding translation (or anything else you have in mind), I'm glad to assist. Thank you!

@eikek eikek closed this as completed May 3, 2020
@Pafzedog
Copy link
Author

Pafzedog commented May 5, 2020

Hi @eikek , no problem.
I'm just starting to translate, you've done a very good work with your documentation :)

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

No branches or pull requests

2 participants