-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
base: master
Are you sure you want to change the base?
Improve texts if user group has no twitter account #1077
Conversation
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.
== 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])) | ||
| . |
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.
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 |
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.
looks like you already started to use a helper?
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.
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.
Thanks for the PR. Had the same thought when dresdenrb got added. |
53e6c99
to
060f13e
Compare
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.