-
Notifications
You must be signed in to change notification settings - Fork 61
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
frontend: use common enum constants for sharing descriptions #3030
Conversation
I must be honest and admit that, while C&P always hurts, I'm not in favor of doing this change "on our own". Isn't there some flask plugin that would help us to do this a standard way? |
"are full-featured <strong>pyp2rpm</strong> with cross " | ||
"distribution support, and <strong>pyp2spec</strong> that is " | ||
"being actively developed and considered to be the future." | ||
info="{{ common_descriptions.SPEC_GENERATOR.description }}" |
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.
Here we are losing formatting.
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.
Also note there are some form field metdata arguments we could perhaps use:
copr/frontend/coprs_frontend/coprs/forms.py
Lines 581 to 584 in 0b7d458
label="Create repositories manually", | |
description="""Repository meta data is normally refreshed | |
after each build. If you want to do this manually, turn | |
this option on.""", |
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.
Here we are losing formatting.
that's true... perhaps this one is worth not unifying
<div class="form-group"> | ||
<label class="col-sm-2 control-label" for="textInput-markup"> | ||
Auto-rebuild | ||
</label> | ||
<div class="col-sm-10"> | ||
<input type="checkbox" name="webhook_rebuild" {% if form.webhook_rebuild.data == True %}checked="checked"{% endif %}/> | ||
Auto-rebuild the package? (i.e. every commit or new tag) | ||
{{ common_descriptions.SPEC_GENERATOR.description }} |
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.
Only part of the message is moved here.
I think we should do some research first. Would gettext/babel help us? |
Also note that we c&p the messages into |
I agree, that's why the PR is not complete - as I continued converting the descriptions the more I disliked that solution
I am going to look at it - sounds promising in some ways
That would be also very nice to unify somehow... but I guess this would mean to create the descriptions in copr-common |
(this is follow-up from #2807 containing its commit to prevent the PR to become huge; not done yet, I just began the transition and I'll finish it once #2807 is merged)
TODO:
Fixes #3029