Fix auto-generated RTL captions position #6314
Merged
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.
Fix auto-generated RTL captions position
Pull Request Type
Related issue
Description
Just like with the auto-generated captions for left-to-right languages YouTube also adds horizontal positioning to their auto-generated captions for right-to-left captions, however they use 100% (right side of captions area) instead of 0% (left side of captions area) so it wasn't getting caught by the existing logic to remove that positioning.
Screenshots
Before (screenshot taken from the linked issue):
![freetube](https://private-user-images.githubusercontent.com/40123526/388211507-29b9ae38-ea8a-447d-abe2-0f550c7d3b29.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDI4NjksIm5iZiI6MTczOTA0MjU2OSwicGF0aCI6Ii80MDEyMzUyNi8zODgyMTE1MDctMjliOWFlMzgtZWE4YS00NDdkLWFiZTItMGY1NTBjN2QzYjI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE5MjI0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI5MjkyMmJhMTE1MDc2MGZhMjYxN2VhOWZjYzQyNWE2M2M5OTExODY2MDkwNTQ0MmQ5ODZmNDM3MTNlY2NjNWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Uref5ld2ZVZ-ZSshsKejcD5bE2XbllSDD6BiqIzB3ts)
After:
![after](https://private-user-images.githubusercontent.com/48293849/393633627-7b612859-bd72-496e-a4b9-678e8b0e4627.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDI4NjksIm5iZiI6MTczOTA0MjU2OSwicGF0aCI6Ii80ODI5Mzg0OS8zOTM2MzM2MjctN2I2MTI4NTktYmQ3Mi00OTZlLWE0YjktNjc4ZThiMGU0NjI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE5MjI0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4MzU2MzUwNzkyN2VlODc3OWNlNTI1YzQ1M2NhNTA2Yjg1YmE2ZjllYWE5OWI1ZmQ1OTI2MTM1NTk5ZTE5ZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Tn3cM2rntBZwjC-xjwodzOX5kUTp9MEQkXuJwpM1b1U)
Testing
Arabic (auto-generated)
subtitle trackDesktop