Resolve bare locale codes to supported BCP-47 language tags in recognition config - #640
Resolve bare locale codes to supported BCP-47 language tags in recognition config#640saurabhffs wants to merge 1 commit into
Conversation
|
You have tested the changes? |
I am confused by this. It is talking about translation and the changes are for transcriptions. |
|
the changes are tested. the issue involves transcription and translation both. please refer #635 the issue only occurs when language tag is not in the proper BCP-47 format i.e. missing hyphen/dash.
|
translation_language is used only for translation, should not be used for transcription. |
|
I am not aware of the translation _language confusion. But GoogleCloudTranscriptionService.java is strictly for transcription and validation transcription language tags. |
I pasted that from the issue that you were referencing #635 ... So when you choose a language in the UI you select a translate language, not a transcribe language. Transcribe language is controlled by useAppLanguage: So transcriber languages should already be sent as pl-PL from the UI and should not arrive as just pl is what I am trying to say. Do you have steps to reproduce where the |
|
Let me have another look at the issue with the provided context |
**Root Cause Analysis (RCA) Issue #635 **
Jigasi’s expected flow is:
The bug occurred because the reverse path for Polish as a target language was not equivalent to the path where Polish was the source language. In effect, the system handled PL -> other correctly, but other -> PL was not going through the same valid target-language resolution/request path, which resulted in no Polish translation output even though transcription itself was available.
Fix Implementation
Added strict language code normalization in the translation request builder to ensure frontend locale strings (e.g., pl-PL, pl_PL) are correctly mapped to the 2-letter ISO code (pl) required by the translation backend.
Improved logging in the TranslationManager to surface HTTP 400s or unrecognized target language exceptions from the translation provider instead of failing silently.