-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Suggest to correct if the caption's language is set to non-"fr" default language while the caption is actually in French #6553
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
Draft
nicolas-raoul
wants to merge
15
commits into
main
Choose a base branch
from
feat-bonjour-caption-check
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds a dialog to confirm if the caption is in French when the user enters 'bonjour' as the only caption and the language is the default, but not French.
Adds a dialog to confirm if the caption is in French when the user enters 'bonjour' as the only caption and the language is the default, but not French. This check is performed when the user proceeds to the next step in the upload wizard.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. If the user enters a caption in French, has only one caption, and the language is the default (but not French), a dialog is shown to confirm if the language should be changed to "fr". This check is performed when the user proceeds to the next step in the upload wizard.
…bility Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. If the user enters a caption in French, has only one caption, and the language is the default (but not French), a dialog is shown to confirm if the language should be changed to "fr". This check is performed when the user proceeds to the next step in the upload wizard. This feature is only enabled for Android API level 26 and above to maintain compatibility with older devices. This is achieved by adding a version check and overriding the library's minSdk in the manifest.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. If the user enters a caption in French, has only one caption, and the language is the default (but not French), a dialog is shown to confirm if the language should be changed to "fr". This check is performed when the user proceeds to the next step in the upload wizard. This feature is only enabled for Android API level 26 and above to maintain compatibility with older devices. This is achieved by adding a version check and overriding the library's minSdk in the manifest. This commit also fixes a build error caused by a transitive dependency by adding it to the tools:overrideLibrary attribute.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. If the user enters a caption in French, has only one caption, and the language is the default (but not French), a dialog is shown to confirm if the language should be changed to "fr". This check is performed when the user proceeds to the next step in the upload wizard. This feature is only enabled for Android API level 26 and above to maintain compatibility with older devices. This is achieved by adding a version check and overriding the library's minSdk in the manifest. This commit also fixes build errors caused by transitive dependencies by adding them to the tools:overrideLibrary attribute.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. This check is performed when the user proceeds to the next step in the upload wizard, but only on Android API 26+ to ensure backward compatibility. This commit resolves multiple manifest merger build failures by overriding the `minSdkVersion` for the ML Kit library and its transitive dependencies (`genai-common`, `play-services-basement`). All ML Kit-related code is wrapped in SDK version checks to prevent runtime crashes on older devices.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. This check is performed when the user proceeds to the next step in the upload wizard, but only on Android API 26+ to ensure backward compatibility. This commit resolves multiple manifest merger build failures by overriding the `minSdkVersion` for the ML Kit library and its transitive dependencies (`genai-common`, `play-services-basement`). All ML Kit-related code is wrapped in SDK version checks to prevent runtime crashes on older devices.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. This check is performed when the user proceeds to the next step in the upload wizard, but only on Android API 26+ to ensure backward compatibility. This commit resolves multiple manifest merger build failures by overriding the minSdkVersion for the ML Kit library and its transitive dependencies (genai-common, play-services-basement). All ML Kit-related code is wrapped in SDK version checks to prevent runtime crashes on older devices.
Adds logging to the French caption detection feature to show the prompt and the model's response. This will help with debugging and monitoring the feature.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. This check is performed when the user proceeds to the next step in the upload wizard, but only on Android API 26+ to ensure backward compatibility. This commit resolves build failures by: 1. Adding the `-Xskip-metadata-version-check` Kotlin compiler flag to handle the metadata version incompatibility between the ML Kit library and the project. 2. Updating the `AndroidManifest.xml` to override the `minSdkVersion` for all conflicting transitive dependencies. 3. Making the `uploadMediaDetailAdapter` in `UploadMediaDetailFragment` public to allow access from `UploadActivity`.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. This check is performed when the user proceeds to the next step in the upload wizard, but only on Android API 26+ to ensure backward compatibility. This commit resolves multiple build failures by: 1. Adding the `-Xskip-metadata-version-check` Kotlin compiler flag to handle the metadata version incompatibility between the ML Kit library and the project. 2. Updating the `AndroidManifest.xml` to override the `minSdkVersion` for all conflicting transitive dependencies. 3. Adding the `lifecycle-runtime-ktx` dependency to enable `lifecycleScope` for coroutines. 4. Making the `uploadMediaDetailAdapter` in `UploadMediaDetailFragment` public to allow access from `UploadActivity`.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. This check is performed when the user proceeds to the next step in the upload wizard, but only on Android API 26+ to ensure backward compatibility. This commit resolves multiple build failures by: 1. Adding the `-Xskip-metadata-version-check` Kotlin compiler flag to handle the metadata version incompatibility between the ML Kit library and the project. 2. Updating the `AndroidManifest.xml` to override the `minSdkVersion` for all conflicting transitive dependencies. 3. Adding the `lifecycle-runtime-ktx` dependency to enable `lifecycleScope` for coroutines. 4. Making the `uploadMediaDetailAdapter` in `UploadMediaDetailFragment` public to allow access from `UploadActivity`. 5. Fixing coroutine implementation by adding the correct import and accessing the ML model response correctly.
Adds a feature to detect if a caption is in French using the offline ML Kit Prompt API. This check is performed when the user proceeds to the next step in the upload wizard, but only on Android API 26+ to ensure backward compatibility. This commit resolves multiple build failures by: 1. Adding the `-Xskip-metadata-version-check` Kotlin compiler flag to handle the metadata version incompatibility between the ML Kit library and the project. 2. Updating the `AndroidManifest.xml` to override the `minSdkVersion` for all conflicting transitive dependencies. 3. Adding the `lifecycle-runtime-ktx` dependency to enable `lifecycleScope` for coroutines. 4. Making the `uploadMediaDetailAdapter` in `UploadMediaDetailFragment` public to allow access from `UploadActivity`. 5. Fixing coroutine implementation by adding the correct import and accessing the ML model response correctly. 6. Adding a test-specific `AndroidManifest.xml` to resolve manifest merger failures during unit test builds.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
screen-20251105-195935-1762352939473.mp4
The proof of concept is working, as seen in the screencast above, but more work is needed:
-Xskip-metadata-version-checkwas really a good idea, Migrate to Kotlin 2.1.0 and Compose Compiler Plugin #6552 would probably be better.I am OK with supporting only French at first, the model does not know all Wiki languages. We can extend to more languages in a next phase.
When run on an old phone (Pixel 5), there is nothing special visible to the user, just a silent error in logcat but the app behaves like if the feature was not there. Which is good. Here is the logcat for reference: