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
Extraction of i18n strings in system panel #11555
Extraction of i18n strings in system panel #11555
Conversation
@greenwoodt this pr is not complete, as there are more strings to be extracted. Please see all the comments in the ticket |
I'm fully aware @alecslupu thanks. I'll notify you for a review once it is. |
…dim into fix/extract-i18n-strings
@alecslupu I have changed and added translations according to your request on issue: #11481, however there was one I was stuck with on adding as the string does interpolate a class variable, located here: I wondered whether you could provide insight on changing this? Does one at the interploation on the locales.en file directly and just call the translation? |
I have reverted line 12 back to |
Check the Rails docs section. It's like this: t(".sign_in_with", provider: OmniAuth::Utils.camelize(provider)) And then in the relevant en.yml section: sign_in_with: Sign in with %{provider} But giving a second look to the feature itself, I'd said that we should remove this altogether, as:
So, its safe to remove this whole block: <%- if devise_mapping.omniauthable? %>
<%- current_organization.enabled_omniauth_providers.keys.each do |provider| %>
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %>
<% end -%>
<% end -%> Can you do that @greenwoodt ? Thanks |
What if we add the string that's missing in the en.yml file? I'm referring to this one:
|
The file still fails a test, even after adding the string manually. I can try again today and let you know. |
decidim-system/app/views/decidim/system/devise/shared/_links.html.erb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one key that should not be as it is.
decidim-system/app/views/decidim/system/devise/sessions/new.html.erb
Outdated
Show resolved
Hide resolved
decidim-system/app/views/decidim/system/devise/passwords/edit.html.erb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greenwoodt , please check also : decidim-system/app/views/decidim/system/devise/shared/_links.html.erb Line 2 ( there is a "Log in" left befind)
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
…ml.erb Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
…html.erb Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just checked out all the comments from the original issue and I found a missing one:
#11478 (comment)
Regarding the rest, codewise is 🆗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, wrong button 😅
Can you check my last review? 🙏🏽
No worries! Check my comment here regarding this change that didn't work. I left it out purposefully as it was causing errors to the tests. |
I have checked 66fc58d, and it seems that you have forgot to add it to en.yml file. it should work without any kind of issues, once you add As as alternative you could define it as |
@alecslupu @andreslucena updated and ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The PR is fairly simple, and I already reviewed it.
🎩 What? Why?
Extracting and adding i18n translations to system docs where needed, making the use of strings not needed.
📌 Related Issues
Link your PR to an issue
Testing
📷 Screenshots