Skip to content

Fix structural duplication and localization errors in the hindi translation file #3812

Description

@Urvi2727

p5.js version

p5.js 1.11.11

What is your operating system?

Windows

Web browser and version

All browsers

Actual Behavior

Description

A review of the currently implemented Hindi localization file (hi.json) reveals significant structural defects, redundant code blocks, and incomplete translations. These legacy issues in the codebase need to be resolved to ensure proper JSON parsing and a consistent experience for Hindi-speaking users.


Identified Errors in Existing Codebase

  • Major Structural Duplication: Within the current hi.json, the JSON restarts after the AssetList section, redefining several objects (Nav, Feedback, Searchbar, CollectionList, etc.) for a second time. This results in duplicate key errors in many standard JSON parsers.
  • Incomplete Localization: The existing "Banner" key contains English text ("Donate Today!...") rather than the intended Hindi translation.
  • Missing Keys: Essential strings for library version management (CustomVersionTitle and CustomVersionInfo) are currently absent from the Preferences section.
  • Inconsistent Vocabulary: The term "Asset" is inconsistently handled in the live file, translated as "संपत्ति" (literal) in the Auth block and "ऐसेट" (technical) in the AssetList block.
  • Technical Mistranslation: The current shortcut for renaming a variable is translated as "चरण का नाम बदलें" (Change Step Name), which is contextually incorrect for programming. It should be updated to "वैरिएबल का नाम बदलें".
  • Redundant/Fragmented Validation: Validation logic in the current version is fragmented across ReduxFormUtils and NewPasswordView with overlapping and inconsistent phrasing.

Expected Behavior

The hi.json file should provide a consistent and fully localized experience for Hindi-speaking users. Specifically:

  • Structural Integrity: The JSON should be valid and free of redundant or duplicated blocks.
  • Full Localization: All UI elements, including the "Banner" section, should be translated into Hindi.
  • Accurate Terminology: Technical terms like "Asset" and "Variable" should use standard transliterations ("ऐसेट" and "वैरिएबल") that are familiar to the developer community.
  • UI Completeness: Missing phrases for version management (e.g., CustomVersionTitle) in the Preferences tab should be present and correctly displayed.
  • Consistent Validation: Password and email validation messages should follow a unified phrasing across the platform.

Steps to reproduce

Steps:

  1. just visit https://editor.p5js.org/
  2. select हिन्दी as language
Image

Activity

  1. added a commit that references this issue on Jan 27, 2026
    0b91ba7
  2. Urvi2727 commented on Jan 27, 2026

    @Urvi2727
    ContributorAuthor

    Hey @raclim, here is the approach I took to audit and resolve the issues in hi.json:

    Approach & Resolution

    • Structural Audit: I identified and removed a massive redundant block where the JSON restarted after AssetList, redefining multiple objects like Nav and Feedback.

    • Technical Standardization: I replaced the literal translation "संपत्ति" (property) with the standard technical transliteration "ऐसेट" (asset).

    • Contextual Correction: I updated the RenameVariable string from "चरण" (step) to "वैरिएबल" (variable) to better reflect JavaScript programming concepts.

    • Missing Key Sync: I manually integrated absent strings for library version management (CustomVersionTitle, CustomVersionInfo) and consolidated fragmented password validation logic.

    • Localization Completion: I localized the English Banner text and updated legacy social media labels to ensure full UI coverage.

    This cleanup ensures the file is structurally valid for parsing and uses terminology familiar to the Indian developer community.
    Since the PR is ready, it would be great if you could assign me to it.

  3. Urvi2727 commented on Jan 27, 2026

    @Urvi2727
    ContributorAuthor

    Hi @raclim ma'am, I've opened PR #3813 with a fix. Whenever convinient, I'd really appreciate a review. Thanks!

  4. ksen0 commented on Sep 18, 2026

    @ksen0
    Member

    @aashu2006 thanks for volunteering to review this one and the PR! Thanks for the report @Urvi2727

  5. aashu2006 commented on Sep 21, 2026

    @aashu2006
    Member

    hii @raclim @ksen0 @Urvi2727

    I had a good look into this and the real issue is a bad merge in Dec 2025 (2b20449). The follow-up fix (6245964) made the JSON valid again, but it left an unused block of Nav keys after AssetList and deleted 11 existing Hindi translations (CustomVersion*, RenameVariable, About.Contact etc.)

    some points in the issue are outdated now, but these two problems are still there.

    also #3813 already restores those keys, but the 4 to 2 space re-indent makes the whole file show up in the diff, which is probably why it looked like the blocks were missing. It also removes 3 keys that en-US still has (Nav.Auth.Welcome, Nav.Auth.My, Nav.Auth.Asset)

    @Urvi2727 do you want to keep working on it? If yes, reverting the indentation should make it easy for me to review, and I'm happy to help. If not, I can open a fresh PR and add you as co-author

    @raclim @ksen0 let me know which way you would prefer :)

  6. ksen0 commented on Sep 22, 2026

    @ksen0
    Member

    Thanks for the research @aashu2006 ! I agree that the existing PR would need to (1) fix indentation so only necessary diff shows up and review is possible, and (2) reinstate any keys that were removed by accident.

    @Urvi2727 can you let us know if you'd like to finish up your PR? Please reply here by end of day Sep 29.

    @aashu2006 if we don't hear back from @Urvi2727 in a week, please open a fresh PR, with @Urvi2727 as coauthor.

    Thanks all!

  7. Urvi2727 commented on Sep 22, 2026

    @Urvi2727
    ContributorAuthor

    heyy @ksen0 @aashu2006
    I apologize for being inactive, I've got mid-sems going on here in college. And to answer your question, yes I'd still love to work on this PR and finish it up!
    Please let me know how you want to proceed :)
    Thank you!!!

  8. aashu2006 commented on Sep 22, 2026

    @aashu2006
    Member

    no worries @Urvi2727, all the best for mid-sems!

    to finish this up:

    1. bring the indentation back to 4 spaces so only the real changes show in the diff, easiest way is to start from the latest develop version of the file and re-add your changes on top
    2. rebase on the latest develop
    3. add back Nav.Auth.Welcome, Nav.Auth.My and Nav.Auth.Asset
    4. for Banner.Copy, either match the current en-US text or leave it out for now

    tag me once it's done and I will review.

  9. aashu2006 commented on Oct 22, 2026

    @aashu2006
    Member

    Hi @ksen0 @Urvi2727

    since there hasn't been an update on #3813 in a while, I'll go ahead and open a fresh PR as discussed, with @Urvi2727 as co-author.

    while digging in I found the follow-up fix (6245964) actually dropped ~60 Hindi strings, not just the 11 I mentioned earlier (Feedback, MobilePreferences, MobileDashboardView, the *_mobile headers, etc.). the new PR restores all of them from history, removes the orphaned Nav block, and keeps the indentation as is so the diff stays small.

    @Urvi2727 thanks for the initial work on this!

  10. added a commit that references this issue on Oct 28, 2026
    44aad19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugError or unexpected behaviors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions