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

Fix Missing Translation Issue #1444

Conversation

chahmedejaz
Copy link
Contributor

Resolves #1423
Issue

  • We are using the wrong translation path for the page title

Fix

  • This PR updates the correct translation path

Screenshot
image

@github-actions github-actions bot added the bugfix Pull Requests that fix a bug label Nov 5, 2023
Copy link
Member

@pixeldesu pixeldesu left a comment

Choose a reason for hiding this comment

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

Thank you for your (first) contribution!

This generally fixes the problem, but you are solving the symptom rather than the cause in this case.

In case you didn't know, writing t(".title") resolves to the title locale of the current view, so it unfolds to the full path moderation.questions.show.title.

With that in mind, and no other Moderation::QuestionsController action actually existing, it is safe to rename the locale in https://github.com/Retrospring/retrospring/blob/main/config/locales/views.en.yml#L679 to match the file name here (just show) so we can keep using the shorthand .title instead of writing out the full locale path!

@chahmedejaz chahmedejaz force-pushed the bugfix/1423-questions-missing-transaltions branch from 6db6bff to 6d555c5 Compare November 6, 2023 12:59
@chahmedejaz
Copy link
Contributor Author

Thank you for your (first) contribution!

This generally fixes the problem, but you are solving the symptom rather than the cause in this case.

In case you didn't know, writing t(".title") resolves to the title locale of the current view, so it unfolds to the full path moderation.questions.show.title.

With that in mind, and no other Moderation::QuestionsController action actually existing, it is safe to rename the locale in https://github.com/Retrospring/retrospring/blob/main/config/locales/views.en.yml#L679 to match the file name here (just show) so we can keep using the shorthand .title instead of writing out the full locale path!

Hey @pixeldesu - Thanks for letting me know. I didn't know that 😅
I've updated as suggested. Please review. Thanks.

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fa0aa59) 95.41% compared to head (6d555c5) 95.41%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1444   +/-   ##
=======================================
  Coverage   95.41%   95.41%           
=======================================
  Files         174      174           
  Lines        2702     2702           
=======================================
  Hits         2578     2578           
  Misses        124      124           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pixeldesu pixeldesu left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@pixeldesu pixeldesu merged commit 4314010 into Retrospring:main Nov 6, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull Requests that fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Title on "View all questions from this user" page is not translated
2 participants