Skip to content

original language mapping#1278

Merged
Audionut merged 2 commits intomasterfrom
original-languages
Mar 5, 2026
Merged

original language mapping#1278
Audionut merged 2 commits intomasterfrom
original-languages

Conversation

@Audionut
Copy link
Owner

@Audionut Audionut commented Mar 4, 2026

Summary by CodeRabbit

  • Refactor
    • Improved language matching and processing with expanded alias resolution and normalization, resulting in more accurate detection of audio and subtitle languages.
    • Strengthened original-language validation with candidate expansion and fallback handling to reduce false negatives.
    • Enhanced display formatting and diagnostics for language information so language labels are more consistent and clearer to end users.

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Thanks for taking the time to contribute to this project. Upload Assistant is currently in a complete rewrite, and no new development is being conducted on this python source at this time.

If you have come this far, please feel free to leave open, any pull requests regarding new sites being added to the source, as these can serve as the baseline for later conversion.

If your pull request relates to a critical bug, this will be addressed in this code base, and a new release published as needed.

If your pull request only addresses a quite minor bug, it is not likely to be addressed in this code base.

Details for the new code base will follow at a later date.

@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9bc0eb42-a251-4a1c-80e5-a62357dd2863

📥 Commits

Reviewing files that changed from the base of the PR and between 16e087f and fa5e211.

📒 Files selected for processing (1)
  • src/trackers/COMMON.py

📝 Walkthrough

Walkthrough

Adds a language normalization and alias-expansion subsystem to COMMON.py, with helpers for token normalization, alias lookup, coercion/expansion of language candidates, and display formatting; integrates this into check_language_requirements to perform candidate-based matching and emits debug for unmatched originals.

Changes

Cohort / File(s) Summary
Language Normalization & Alias Expansion
src/trackers/COMMON.py
Adds LANGUAGE_EQUIVALENCE_GROUPS and private helpers (_normalize_language_token, _build_language_alias_lookup, _coerce_language_values, _expand_language_candidates, _expand_language_list, _format_language_for_display), integrates alias lookup and candidate expansion into check_language_requirements, coerces audio/subtitle values to lists, normalizes audio languages, and logs expanded original-language candidates when checks fail.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I hop through tokens, soft and spry,

I group their names and let them try,
Aliases bloom, a tidy crew,
Audio and original now find true,
A rabbit's cheer for languages anew!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'original language mapping' directly aligns with the main change: implementing a language normalization and alias expansion subsystem to handle original language mapping in check_language_requirements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch original-languages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

@Audionut Audionut merged commit cb8964c into master Mar 5, 2026
3 of 4 checks passed
@Audionut Audionut deleted the original-languages branch March 5, 2026 11:59
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