Skip to content

Bug/Extreme Case Handling for camelCase / snake_case #61

@AaronChen11

Description

@AaronChen11

Issue Description(Bug)

The current translation engine does not properly handle identifiers such as camelCaseWords, PascalCase, snake_case_variables, or UPPER_SNAKE_CASE. In many cases, these identifiers are broken apart or reformatted into natural language during translation.

Example:

Image Image

Expected behavior

Testing camelCaseWords in this comment (identifier should remain intact, unmodified, and untranslated).

*Describe the solution you'd like(More detail in Feature/Heuristic-Based Identifier Detection)
Have stricter masking rules (non-AI) to detect and preserve identifiers in code comments. Specifically:

  • Detect camelCase, PascalCase, snake_case, and SCREAMING_SNAKE_CASE identifiers.

  • Replace them with ITHI_IDENTIFIER_XXXX tokens during translation.

  • After translation, unmask to restore the exact original identifier formatting.

  • Ensure identifiers are excluded from translation, so they remain unchanged regardless of the target language.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions