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

feature: translate trix field controller js warnings #3330

Conversation

rafaeliga
Copy link
Contributor

@rafaeliga rafaeliga commented Oct 10, 2024

Description

Translates trix_field_controller js warnings

Fixes #3329

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

image

Manual review steps

  1. Change the locale to one of locales supported
  2. Try to upload a image in trix when creating a new resource

Manual reviewer: please leave a comment with output from the test if that's the case.

Documentation

avo-hq/docs.avohq.io#301

Copy link

codeclimate bot commented Oct 10, 2024

Code Climate has analyzed commit 0a401e4 and detected 0 issues on this pull request.

View more on Code Climate.

@rafaeliga
Copy link
Contributor Author

@Paul-Bob Your steps to implement the feature worked great!

I added the translation for the others 2 warnings that I found there.

Can you help with the tests if necessary for this change?

@Paul-Bob
Copy link
Contributor

Hey @rafaeliga thank you for the contribution, is looking great!

We already have some tests for the trix field on spec/system/avo/trix_field_spec.rb

That test is already a system test and you should be able to test this alerts inside it.

@rafaeliga
Copy link
Contributor Author

@Paul-Bob Do you use VS code?

I see that the project uses Ruby LSP, but I think its missing something to configure here:

image

@Paul-Bob
Copy link
Contributor

@Paul-Bob Do you use VS code?

I see that the project uses Ruby LSP, but I think its missing something to configure here:

Yes, I'm not sure why that is happening on your side.

image

@Paul-Bob Paul-Bob added Enhancement Not necessarily a feature, but something has improved and removed Feature labels Oct 14, 2024
@rafaeliga
Copy link
Contributor Author

@Paul-Bob Which page should I add documentation?

Maybe this one? https://docs.avohq.io/3.0/i18n.html#customize-the-locale

@Paul-Bob
Copy link
Contributor

Paul-Bob commented Oct 17, 2024

@Paul-Bob Which page should I add documentation?

Maybe this one? https://docs.avohq.io/3.0/i18n.html#customize-the-locale

Let's add a new section on the Trix field docs (https://docs.avohq.io/3.0/fields/trix.html) and specify the supported translation keys and when/where those are used.

@rafaeliga rafaeliga force-pushed the feat/translate-trix-field-controller-js-warnings branch from 0ca6877 to 59bb830 Compare October 23, 2024 15:35
@rafaeliga rafaeliga marked this pull request as ready for review October 23, 2024 15:41
@rafaeliga
Copy link
Contributor Author

@Paul-Bob Looks good?

Copy link
Contributor

@Paul-Bob Paul-Bob left a comment

Choose a reason for hiding this comment

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

Looks great, thank you for this contribution @rafaeliga!

@Paul-Bob Paul-Bob merged commit c70de9b into avo-hq:main Oct 26, 2024
20 of 21 checks passed
@rafaeliga rafaeliga deleted the feat/translate-trix-field-controller-js-warnings branch October 31, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Not necessarily a feature, but something has improved
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Locale / translate Trix js messages
2 participants