Skip to content

fix: localization of humanize naturaltime #33189

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ceenayekta
Copy link

SUMMARY

This pull request introduces localization support to the humanize library used within Apache Superset. The change enables better handling of localized text and formats, improving the internationalization capabilities of the platform. The implementation includes updates to integrate localization logic into the existing humanize library usage, ensuring consistency across supported languages.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Spanish:
image
French:
image

TESTING INSTRUCTIONS

  1. Pull the branch humanize_lib_localization and start the development server.
  2. Verify that text formatting and human-readable labels (e.g., dates, durations) are properly localized based on the configured language.
  3. Test the behavior across different supported locales to ensure functionality and consistency.
  4. Check for any regressions in areas where the humanize library is used.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Feel free to modify the description further to include any additional details or specifications related to your changes.

@dosubot dosubot bot added the i18n:general Related to translations label Apr 19, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Readability Unclear Regional Locale Mapping ▹ view 🧠 Incorrect
Design Duplicate time formatting methods ▹ view 🧠 Not in standard
Readability Inappropriate Default Fallback Locale ▹ view 🧠 Incorrect
Readability Non-Pythonic Comparison Syntax ▹ view 🧠 Not in scope
Files scanned
File Path Reviewed
superset/constants.py
superset/models/sql_lab.py
superset/utils/core.py
superset/models/helpers.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@michael-s-molina michael-s-molina changed the title fix localization of humanize naturaltime fix: localization of humanize naturaltime Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n:general Related to translations size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant