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

lex_utils: needs update #8

Open
sagotch opened this issue Sep 3, 2021 · 4 comments
Open

lex_utils: needs update #8

sagotch opened this issue Sep 3, 2021 · 4 comments

Comments

@sagotch
Copy link
Contributor

sagotch commented Sep 3, 2021

I am pretty sure that https://github.com/geneweb/geneweb-contrib/blob/master/lex/lex_utils.ml#L148 need to be updated in order to make the script work.

  let repo_src = Filename.concat repo "src" in

We should be able to pass multiple directories to be looked up (recursively).

@hgouraud
Copy link
Collaborator

hgouraud commented Sep 3, 2021

Yes, it should be "lib" indeed. I had corrected it, but somehow it came back!!
But I believe it is of no consequence as the recursive search for .ml files is done in repo rather than repo_src (this, by the way, scans plugins .ml files as well, but also the _default files which is redundant!!).
What needs to be done is reading templates into plugins/xx/assets, and this might be done with:

  let repo_tpl_plugins = Filename.concat repo "plugins" in
  let msg_tpl = List.append  (get_msg_tpl repo_tpl) (get_msg_tpl repo_tpl_plugins) in

Passing a list of repo to get_msg_tpl and get_msg_src might be a better solution!
We may also need to be a bit more explicit about which source file contains which message missing in the lexicon
although git grep might be deemed sufficient!!

@sagotch
Copy link
Contributor Author

sagotch commented Sep 3, 2021

Yes, it should be "lib" indeed. I had corrected it, but somehow it came back!!

Probably my fault then, I had troubles rebasing the PR.

What needs to be done is reading templates into plugins/xx/assets, and this might be done with:

And lexicon coming with plugins as well.

@hgouraud
Copy link
Collaborator

hgouraud commented Sep 4, 2021

Could not get lex_utils.ml to work properly. (lack of line numbers in error messages does not help!!)
Restarted from old version and created lex_utils-2.ml which seems to work now (reads plugins lexicons).
Coding style can be improved!!

@sagotch
Copy link
Contributor Author

sagotch commented Sep 4, 2021

Could not get lex_utils.ml to work properly. (lack of line numbers in error messages does not help!!)

I need to work on this, missing location is definitively a problem.

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