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

views/podcasts, views/podcast_episodes i18n #15020

Merged
merged 16 commits into from Oct 25, 2021

Conversation

yheuhtozr
Copy link
Contributor

@yheuhtozr yheuhtozr commented Oct 12, 2021

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

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

Description

Extracts strings for i18n from app/views/podcasts and related. Attached fr locales for testing purposes. Existing translations up to #15002 reflected (hopefully).

Related Tickets & Documents

Relates to #14888

QA Instructions, Screenshots, Recordings

UI accessibility concerns?

Added/updated tests?

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

[Forem core team only] How will this change be communicated?

Will this PR introduce a change that impacts Forem members or creators, the
development process, or any of our internal teams? If so, please note how you
will share this change with the people who need to know about it.

  • I've updated the Developer Docs or
    Storybook (for Crayons components)
  • This PR changes the Forem platform and our documentation needs to be
    updated. I have filled out the
    Changes Requested
    issue template so Community Success can help update the Admin Docs
    appropriately.
  • I've updated the README or added inline documentation
  • I've added an entry to
    CHANGELOG.md
  • I will share this change in a Changelog
    or in a forem.dev post
  • I will share this change internally with the appropriate teams
  • I'm not sure how best to communicate this change and need help
  • This change does not need to be communicated, and this is why not: this is ongoing work related to a large, ongoing initiative.

[optional] Are there any post deployment tasks we need to perform?

N/A

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

alt_text

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Oct 12, 2021
@github-actions
Copy link
Contributor

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!

@benhalpern benhalpern mentioned this pull request Oct 12, 2021
16 tasks
@juliannatetreault
Copy link
Contributor

juliannatetreault commented Oct 14, 2021

Hey @yheuhtozr! 👋 Can you please update your branch with the latest code from the repository’s main branch? i18n files weren’t being loaded properly and we have merged a fix for this. Thanks so much in advance and please do not hesitate to reach out if you need help!

Copy link
Contributor

@citizen428 citizen428 left a comment

Choose a reason for hiding this comment

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

I think this is looking good, just need to resolve the merge conflicts.

@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 19, 2021
@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 19, 2021
@yheuhtozr
Copy link
Contributor Author

@citizen428 Conflicts "resolved" but GitHub still shows some because of this. Please check the latest change and re-resolve conflicts if you are going to merge this PR.

unsupported: Your browser does not support the audio element.
featured_shows: Featured shows
latest_episodes: Latest episodes
suggest_a_podcast: Suggest a podcast
Copy link
Contributor Author

@yheuhtozr yheuhtozr Oct 19, 2021

Choose a reason for hiding this comment

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

These lines are transferred from core.podcasts. Duplication with views.podcasts.form.heading above is intentional, as this is a button text (instruction to user) and the other is a heading (page title).

@citizen428
Copy link
Contributor

citizen428 commented Oct 21, 2021

@yheuhtozr i18n-tasks missing is not happy with this PR, can you please have a look? This is also why the I18n spec fails (you can run that via bundle exec rspec spec/i18n_spec.rb):

image

@yheuhtozr
Copy link
Contributor Author

@citizen428 Fixed the keys and the spec files that required now gone keys.

@citizen428 citizen428 requested review from aitchiss and removed request for rhymes October 25, 2021 08:27
Copy link
Contributor

@aitchiss aitchiss left a comment

Choose a reason for hiding this comment

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

I just have one (hopefully small) suggestion - let me know what you think.

Other than that it looks like there are a couple of small conflicts to resolve and then we should be good to go 🚀

one: '1 error while creating a podcast:'
other: "%{count} errors while creating a podcast:"
owner: I am the owner of this podcast
return: "< return to podcasts"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the < should be part of the actual string here, as we're not using it as "text" as such. Same with the close button "X". These are being used like icons/images (and eventually we will want to replace them with actual icons/images to avoid screen reading software announcing these links as "less than symbol return to podcasts".

Can we extricate them from the translated strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your input. Do you mean you are going to replace the less than sign with an icon? If so, I'm happy to remove it. But if you only move it out and keep as a part of hardcoded text, I'm not sure it is a good idea. Unlike the close "X", it is not horizontally symmetrical. Some languages are written from right, so that punctuation should be flipped. "<" is not among auto-mirrored symbols and would eventually need to be changed as per locale. At the current stage we only support English and French, but I think the RTL support will be required sooner or later.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a really good point. I think in light of that, it's best to carry on with the implementation you have here and I'll speak to our team about how we want to adjust things in future, as eventually we don't want text representations of iconography (as they're not properly providing information to screen reader users). Until we make that future change, best to keep things together in the translated strings, as you say.

Copy link
Contributor

Choose a reason for hiding this comment

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

(if you're able to resolve those couple of conflicts, I'll approve and get this merged 👍 )

@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 25, 2021
@aitchiss aitchiss merged commit 6a3a91d into forem:main Oct 25, 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 25, 2021
citizen428 pushed a commit that referenced this pull request Oct 29, 2021
* views/podcasts, views/podcast_episodes i18n

* reformat for PR

* helper labels

* PR sync with main

* remove ja.yml

* Update en.yml

* Update fr.yml

* Update _meta.html.erb

* Update podcast_episodes_index_spec.rb

* Update podcast_create_spec.rb

* Update user_visits_podcast_episode_spec.rb

* Update en.yml

* Update feed.rb

* Update index.html.erb
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

4 participants