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

Issue #3490982: Usernames in activity streams shouldn't be translatable #4226

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

navneet0693
Copy link
Collaborator

Problem (for internal)

The usernames of the people in the streams were getting translated when using an external translation tool like Google Translation. They shouldn't be translatable

The output in the stream is coming from message templates text ( https://github.com/goalgorilla/open_social/blob/main/modules/custom/activity_creator/src/ActivityFactory.php#L146 ) which is getting added on activity page in https://github.com/goalgorilla/open_social/blob/main/modules/custom/activity_creator/activity.page.inc#L38 which then gets added in https://git.drupalcode.org/project/socialbase/-/blob/2.6.x/templates/activity/activity.html.twig?ref_type=heads#L48

Solution (for internal)

We added “no translate” attribute with message output text.

Release notes (to customers)

We smashed a bug where our usernames in the activity streams were getting translated when using third party services like Google Translate

Issue tracker

https://www.drupal.org/project/social/issues/3490982

Theme issue tracker

N.A

How to test

  • Install a multilingual Open Social website
  • Create content in different language (other than English)
  • Use module that provides third party translators to convert them in different languages
  • This is tricky that which username or word it picks for translation, but observe the usernames in activity stream
  • Checkout to this branch
  • Run updates
  • Try translating again
  • You should observe that usernames will remain same.

Change Record

N.A

Translations

N.A

@navneet0693 navneet0693 added type: bug Fixes a bug in Open Social status: needs work This pull request needs more work before it's ready for review prio: medium team: support labels Dec 3, 2024
@navneet0693 navneet0693 added this to the 12.4.8 milestone Dec 3, 2024
@navneet0693 navneet0693 changed the title Issue #3490982: Usernames in activity streams shouldn'\''t be translatable Issue #3490982: Usernames in activity streams shouldn't be translatable Dec 3, 2024
@navneet0693 navneet0693 force-pushed the issue/3490982-usernames-translations branch 2 times, most recently from e84b4b0 to 1d8d556 Compare December 3, 2024 05:23
The usernames of the people in the streams were getting translated when using an external translation tool like Google Translation. They shouldn't be translatable

    The output in the stream is coming from message templates text ( https://github.com/goalgorilla/open_social/blob/main/modules/custom/activity_creator/src/ActivityFactory.php#L146  ) which is getting added on activity page in https://github.com/goalgorilla/open_social/blob/main/modules/custom/activity_creator/activity.page.inc#L38 which then gets added in https://git.drupalcode.org/project/socialbase/-/blob/2.6.x/templates/activity/activity.html.twig?ref_type=heads#L48
@navneet0693 navneet0693 force-pushed the issue/3490982-usernames-translations branch from 1d8d556 to f438dac Compare December 3, 2024 07:38
@navneet0693 navneet0693 added status: needs review This pull request is waiting for a requested review and removed status: needs work This pull request needs more work before it's ready for review labels Dec 3, 2024
@navneet0693 navneet0693 marked this pull request as ready for review December 3, 2024 09:58
@robertragas robertragas modified the milestones: 12.4.8, 12.4.9 Dec 3, 2024
@robertragas robertragas modified the milestones: 12.4.9, 12.4.10 Dec 16, 2024
@open-social-tugboat
Copy link

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: medium status: needs review This pull request is waiting for a requested review team: support type: bug Fixes a bug in Open Social
Development

Successfully merging this pull request may close these issues.

3 participants