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

chore: #2 adding localization to the editor #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SalahAdDin
Copy link

What does it do?

It implements string literals for localization.

Why is it needed?

Content managers can speak any language other than English.

How to test it?

Change the preferred adding language on the profile screen, go to the rich text content screen and check the toolbar tooltips.
image

Notes

I was unable to make the Revert/Insert Link button work properly:
image

I defined the literal properly following the documentation: "editor.dialog.button.link-confirm": "{action, select, Remove {Eliminar Enlace} Insert {Insertar Enlace}}",
Here is the function using it, following the documentation:

          <Button
            onClick={() => onInsertLink()}
            variant={shouldRemove ? "danger-light" : "success-light"}
          >
            {formatMessage(
              {
                id: "editor.dialog.button.link-confirm",
                defaultMessage: "{action} Link",
              },
              {
                action: shouldRemove ? "Remove" : "Insert",
              }
            )}
          </Button>

But, as you can see, it does not work.

@SalahAdDin SalahAdDin changed the title chore: adding localization to the editor chore: #2 adding localization to the editor Aug 13, 2024
@SalahAdDin
Copy link
Author

Closes: #10

@SalahAdDin SalahAdDin mentioned this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant