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

Internationalize hardcoded text for videos pages #14960

Merged

Conversation

VictorPS
Copy link
Contributor

@VictorPS VictorPS commented Oct 5, 2021

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Related to this issue: #14888
Moving texts from the views inside the app/views/videos directory into translations.
I also did some refactoring because the "loading..." translation was being used on another view as well.
I am open to suggestions on this PR especially on the French translations since I don't know much French 😄.

QA Instructions, Screenshots, Recordings

videos#index:

Screenshot from 2021-10-05 20-25-21

videos#new:

Screenshot from 2021-10-05 20-23-21

[optional] What gif best describes this PR or how it makes you feel?

elmo fire

@VictorPS VictorPS requested a review from a team as a code owner October 5, 2021 19:33
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Oct 5, 2021
@CLAassistant
Copy link

CLAassistant commented Oct 5, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2021

Thank you for opening this PR! We appreciate you!

For all pull requests coming from third-party forks we will need to
review the PR before we can process it through our CI pipelines.

A Forem Team member will review this contribution and get back to
you as soon as possible!

@@ -1,4 +1,4 @@
<div class="sublist"></div>
<div class="loading" id="loading-articles">
<%= t("dashboard.loading") %>
<%= t("core.loading") %>
Copy link
Contributor

Choose a reason for hiding this comment

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

This file has already been tokenized

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, do you have any suggestions for the fix?
Should I revert this file back and keep the other changes or is there anything else I can improve?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can keep the other changes, of course, just remove the ones in this file.

@rhymes rhymes changed the title Internationalize hardcoded text 14888 Internationalize hardcoded text for videos pages Oct 6, 2021
Copy link
Contributor

@rhymes rhymes 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 @VictorPS!

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 6, 2021
@rhymes
Copy link
Contributor

rhymes commented Oct 6, 2021

@VictorPS you should sign the CLA agreement here above and merge main in to fix the broken test. Thank you!

@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 6, 2021
@VictorPS
Copy link
Contributor Author

VictorPS commented Oct 6, 2021

Done @rhymes. Thank you!

@rhymes rhymes requested a review from msarit October 7, 2021 10:21
@rhymes
Copy link
Contributor

rhymes commented Oct 7, 2021

@VictorPS there's a failing test that needs addressing, can you run bundle exec rspec spec/i18n_spec.rb and see what's missing? Thank you!

@VictorPS
Copy link
Contributor Author

VictorPS commented Oct 7, 2021

I think I fixed the specs, and it seems like rubocop autofixes changed some other files when I commited as well.

@VictorPS
Copy link
Contributor Author

VictorPS commented Oct 7, 2021

Oh nevermind, I have to fix something.

@VictorPS
Copy link
Contributor Author

VictorPS commented Oct 7, 2021

It should be fine now 👍

@maestromac maestromac removed the request for review from a team October 7, 2021 20:03
@@ -11,7 +11,7 @@
</style>
<center style="margin-top:200px">
<%= stylesheet_link_tag "s3_direct_upload", media: "all" %>
<h1>🎥 Upload Video File 🙌</h1>
<h1><%= t(".title") %></h1>
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I don't think we have established a practice for this yet, I think I'd prefer the full vides.new.title until then.

Suggested change
<h1><%= t(".title") %></h1>
<h1><%= t("videos.new.title") %></h1>

<p>
<strong>Video is beta:</strong> <%= t("contact_prompts.if_any_questions_html") %>
</p>
<p><%= t(".beta_info_html") %> <%= t("contact_prompts.if_any_questions_html") %></p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above:

Suggested change
<p><%= t(".beta_info_html") %> <%= t("contact_prompts.if_any_questions_html") %></p>
<p><%= t("videos.new.beta_info_html") %> <%= t("contact_prompts.if_any_questions_html") %></p>

@VictorPS
Copy link
Contributor Author

VictorPS commented Oct 8, 2021

@citizen428 I just fixed the issues you pointed out.
Give me a shout if there's anything else that needs fixing.

@rhymes rhymes requested a review from citizen428 October 8, 2021 11:56
@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 12, 2021
@citizen428 citizen428 merged commit 39a62c4 into forem:main Oct 12, 2021
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants