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

Improve texts if user group has no twitter account #1077

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

richardboehme
Copy link

Some texts assumed that every user group has a twitter account which might sometimes not be the case. For example the dresden.rb user group does not have a twitter account (at least not yet). This change removes the "requirement" and improves the site if no twitter account was given.

Some texts assumed that every user group has a twitter account which
might sometimes not be the case. For example the dresden.rb user group
does not have a twitter account (at least not yet). This change removes
the "requirement" and improves the site if no twitter account was given.
Comment on lines +1 to +4
== t('home.send_us_an_email', mail_to: mail_to(Whitelabel[:email], 'E-Mail', title: 'E-Mail'))
- if Whitelabel[:twitter]
==< t('home.or_message_on_twitter', twitter_link: link_to_twitter(Whitelabel[:twitter]))
| .
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMHO: this should be a helper method, instead of a partial. Performance of many small partials isn't great.

@@ -71,4 +71,5 @@
small
= I18n.tw("home.like_to_talk")
br
== t("home.send_us_an_email", mail_to: mail_to(Whitelabel[:email], "E-Mail", title: "E-Mail"), twitter_link: link_to_twitter(Whitelabel[:twitter]))
== contact_text
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like you already started to use a helper?

Copy link
Author

Choose a reason for hiding this comment

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

Oh yeah, that was a left over. I started using a helper but it felt more messy with things like HTML-Escaping and spaces between translations. I've pushed a commit that re-implements the helper. Let me know what you think. Maybe we could improve it by moving the links out of the translation or something.

@salzig
Copy link
Collaborator

salzig commented Oct 31, 2024

Thanks for the PR. Had the same thought when dresdenrb got added.

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.

2 participants