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

feat: Optional field 'external link' in bill form. #479

Merged
merged 3 commits into from
Oct 6, 2019
Merged

feat: Optional field 'external link' in bill form. #479

merged 3 commits into from
Oct 6, 2019

Conversation

LeoMouyna
Copy link
Contributor

An optional field has been added to the bill form to add a link to a real bill. A new action button allow user to see this bill. Breaking change with Bill model update for database, a migration is needed.

See issue #429.

@@ -146,6 +146,8 @@ class BillForm(FlaskForm):
what = StringField(_("What?"), validators=[DataRequired()])
payer = SelectField(_("Payer"), validators=[DataRequired()], coerce=int)
amount = CalculatorStringField(_("Amount paid"), validators=[DataRequired()])
external_link = URLField(_("External link"), validators=[Optional(
)], description="A link to an external document, related to this bill")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description should probably be translatable too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can easily add a _("A link to an external document, related to this bill") but I don't know how to generate correctly the translation even after a make update-translation with some changes in messages.po. Am I missing something ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make update-translations will update the strings, and then the translation process is done via Weblate (http://hosted.weblate.org/). This is currently undocumented, so you didn't have any way to know, sorry.

@almet
Copy link
Member

almet commented Sep 30, 2019

Thanks! We're almost there :-)

@@ -134,6 +134,9 @@ <h3 class="modal-title">{{ _('Add a bill') }}</h3>
<td class="bill-actions">
<a class="edit" href="{{ url_for(".edit_bill", bill_id=bill.id) }}" title="{{ _("edit") }}">{{ _('edit') }}</a>
<a class="delete" href="{{ url_for(".delete_bill", bill_id=bill.id) }}" title="{{ _("delete") }}">{{ _('delete') }}</a>
{% if bill.external_link %}
<a class="see" href="{{ bill.external_link }}" ref="noopener" target="_blank" title="{{ _("see") }}">{{ _('see') }} </a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we replace "See" by "See attached document"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no preference tell me what's the best in your opinion :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An optional field has been added to the bill form to add a link to a real bill. A new action button allow user to see this bill. Breaking change with Bill model update for database, a migration is needed.

See issue #429.
@almet
Copy link
Member

almet commented Oct 6, 2019

Hmm, actually, for the "see attached document", I believe it would be better to stay with "see". It's less explicit, but due to where this is placed, we probably want to keep it short.

So… Let's merge!

@almet almet merged commit 4b01276 into spiral-project:master Oct 6, 2019
Jojo144 pushed a commit to Jojo144/ihatemoney that referenced this pull request Mar 21, 2020
…-link-bill-form

feat: Optional field 'external link' in bill form.
@zorun zorun added this to the v5 milestone Jul 17, 2020
TomRoussel pushed a commit to TomRoussel/ihatemoney that referenced this pull request Mar 2, 2024
…-link-bill-form

feat: Optional field 'external link' in bill form.
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

Successfully merging this pull request may close these issues.

3 participants