-
Notifications
You must be signed in to change notification settings - Fork 168
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
Update generate_template function and add UI for incomplete file #636
Conversation
…nto features/draft
I'm working on unit tests, but I have no idea how I could add draft mode inside the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So besides the two comments, when I go to the review app, I don't see the UI addition. Shouldn't I see it here?
web/thesaurus_template_generators.py
Outdated
@@ -3,7 +3,7 @@ | |||
from web.models import MetaInfo | |||
|
|||
|
|||
def generate_language_template(language_id, structure_id, version=None): | |||
def generate_language_template(language_id, structure_id, version=None, draft=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this get removed as I think we decided against "draft mode"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to remove it, sorry for that.
web/thesaurus_template_generators.py
Outdated
if draft: | ||
meta['draft'] = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for removing this
OK, I know what's happened: the method "is_incomplete" checks if the code fields are empty in the template inside the thesaurus folder. But in the case of some files, these entries (with "Unknown") are not present and thus, no condition is done there (so, the result will be False, instead of True). |
I'm going to go ahead and close this because there's some merge conflicts and I haven't seen activity since November. If you want to keep working on it, you're welcome to! You can reopen this or make a new pull request to keep working on it. Thanks for the work you've put into it so far! |
I'll check on my side to fix the merge conflicts ! |
What GitHub issue does this PR apply to?
Resolves #635
What changed and why?
New command
generate_missing_templates
which generates all missing thesaurus.New function in the
Language
model namedis_incomplete
.(If editing Django app) Please add screenshots
Checklist
Any additional comments or things to be aware of while reviewing?