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

Split relationships page strings #12502

Merged
merged 1 commit into from
Dec 1, 2019
Merged

Split relationships page strings #12502

merged 1 commit into from
Dec 1, 2019

Conversation

brawaru
Copy link
Contributor

@brawaru brawaru commented Nov 30, 2019

Before this moment relationships managing page was using strings from other context — from counters. But in order for translators to be able to translate it relatively to the page (as a tab there), it must use separate strings.

English Russian
Screenshot_20191130_131252 Screenshot_20191130_131316
Strings shown normally (kinda) Strings irrelevantly “pluralized”

I've split the strings for "Following" and "Followers" and put them to "relationships" keyset in localization file. This should solve this issue.

Fixes #10863

Before this moment relationships managing page was using strings from
other context - from counters, but in order for translators to be able
to translate it relatively to the page, it must use separate strings.

I've split the strings for "Following" and "Followers" and put them to
"relationships" keyset in localization file. This should solve this
issue.

Fixes #10863
@@ -8,8 +8,8 @@
.filter-subset
%strong= t 'relationships.relationship'
%ul
%li= filter_link_to t('accounts.following', count: current_account.following_count), relationship: nil
%li= filter_link_to t('accounts.followers', count: current_account.followers_count), relationship: 'followed_by'
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could just access accounts.followers.other directly? Just thinking about reducing translation overhead

Copy link
Contributor Author

@brawaru brawaru Dec 1, 2019

Choose a reason for hiding this comment

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

Unfortunately no, they are similar in English, but may differ in other languages (they do in Russian actually). So I think it's the best solution for us to have separate strings based on context, that's what issue #10863 was exactly in the first place.


Also, accounts.following seems to be incorrect, because in original context it is used as plural, but in translation file it is a string:

https://github.com/tootsuite/mastodon/blob/01b1c377b1fea841b9823a3134e8f41ccc4b0f29/app/views/accounts/_header.html.haml#L23-L24

https://github.com/tootsuite/mastodon/blob/91284734af5923509d73c335f364db346303ef61/config/locales/en.yml#L56-L59

Want me to fix that in this or another PR?

@Gargron Gargron merged commit c8d82ef into mastodon:master Dec 1, 2019
@brawaru brawaru deleted the fix/relationships_fix_strings branch April 2, 2020 22:19
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.

Create separate strings for "Follows and followers" section
2 participants