Skip to content

Translate the tooltip for the close button on the modal - #454

Merged
sejas merged 1 commit into
trunkfrom
add/translate-hover-close-modal
Aug 13, 2024
Merged

Translate the tooltip for the close button on the modal#454
sejas merged 1 commit into
trunkfrom
add/translate-hover-close-modal

Conversation

@sejas

@sejas sejas commented Aug 12, 2024

Copy link
Copy Markdown
Member

Proposed Changes

  • Translates the tooltip of the close button in the modals
Screenshot 2024-08-12 at 19 21 54

Testing Instructions

  • Change the language of your computer or in src/lib/locale.ts
diff --git a/src/lib/locale.ts b/src/lib/locale.ts
index 4e17d62..354e96d 100644
--- a/src/lib/locale.ts
+++ b/src/lib/locale.ts
@@ -32,6 +32,7 @@ export function getSupportedLocale(): string {
        // `app.getLocale` returns the current application locale, acquired using
        // Chromium's `l10n_util` library. This value is utilized to determine
        // the best fit for supported locales.
+       return 'es';
        return match( [ app.getLocale() ], supportedLocales, DEFAULT_LOCALE );
 }
 
  • Add the translation: ,"Close":["Cerrar"] to the selected language file, for example: src/translations/studio-es.jed.json
  • Run npm start
  • Click on your profile image or add site button to open a modal
  • Move the mouse hover the X button to close the modal
  • Wait a second and observe the tooltip is translated. (You need to add the translation to your language , for example src/translations/studio-es.jed.json)
96A0Xd.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@sejas sejas self-assigned this Aug 12, 2024
@sejas
sejas requested a review from a team August 12, 2024 17:22

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Screenshot 2024-08-13 at 9 40 01 AM

Nice work, it worked as expected for me 👍 Thanks for making this improvement!

@fluiddot fluiddot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch @sejas ! LGTM 🎊 !

@sejas
sejas merged commit c2f2163 into trunk Aug 13, 2024
@sejas
sejas deleted the add/translate-hover-close-modal branch August 13, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants