Skip to content
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

Subtitles override level not localized #4892

Open
1 task done
low-batt opened this issue Apr 26, 2024 · 5 comments · Fixed by #4893
Open
1 task done

Subtitles override level not localized #4892

low-batt opened this issue Apr 26, 2024 · 5 comments · Fixed by #4893

Comments

@low-batt
Copy link
Contributor

System and IINA version:

  • macOS 13.6.3
  • IINA 1.3.4

Expected behavior:
Where appropriate labels presented to the user are localized.

Actual behavior:
In IINA's settings on the Subtitle tab in the ASS Subtitles section the Override level setting is controlled by a slider and has a label that displays the slider value as a string. This value is always shown in English. This setting is tied to the mpv sub-ass-override option:

--sub-ass-override=<yes|no|force|scale|strip>
Control whether user style overrides should be applied. Note that all of these overrides try to be somewhat smart about figuring out whether or not a subtitle is considered a "sign".

  • no: Render subtitles as specified by the subtitle scripts, without overrides.
  • yes: Apply all the --sub-ass-* style override options. Changing the default for any of these options can lead to incorrect subtitle rendering (default).
  • force: Like yes, but also force all --sub-* options. Can break rendering easily.
  • scale: Like yes, but also apply --sub-scale.
  • strip: Radically strip all ASS tags and styles from the subtitle. This is equivalent to the old --no-ass / --no-sub-ass options.

This also controls some bitmap subtitle overrides, as well as HTML tags in formats like SRT, despite the name of the option.

IINA is missing support for the scale value. That will be a subject for a separate issue.

Steps to reproduce:

  • Open the and click on System Settings…

  • Click on the General tab

  • Under General click on Language & Region

  • Scroll down to the Applications section

  • Add IINA and select a language other than English

  • Start IINA

  • Click on Settings… (in the languge being used) under the IINA menu

  • The settings panel appears

  • On the left side of the panel click on Subtitle

  • In the ASS Subtitles section look for the slider

  • Move the slider and notice the value displayed is in English

  • MPV does not have this problem.

mpv does not support localization.

How often does this happen?
Every time.

@low-batt low-batt self-assigned this Apr 26, 2024
low-batt added a commit that referenced this issue Apr 26, 2024
This commit will:
- Add key-value pairs for the yes, force and strip override levels to
  the base and en Localizable.strings files
- Change the transformedValue method in the ASSOverrideLevelTransformer
  class to return a localized string instead of the enum value string

This localizes the value displayed for the Override level setting found
in the ASS Subtitles section on the Subtitle tab in IINA's settings.
low-batt added a commit that referenced this issue Apr 26, 2024
This commit will:
- Add key-value pairs for the yes, force and strip override levels to
  the base and en Localizable.strings files
- Change the transformedValue method in the ASSOverrideLevelTransformer
  class to return a localized string instead of the enum value string

This localizes the value displayed for the Override level setting found
in the ASS Subtitles section on the Subtitle tab in IINA's settings.
@low-batt low-batt linked a pull request Apr 26, 2024 that will close this issue
2 tasks
uiryuu pushed a commit that referenced this issue May 22, 2024
This commit will:
- Add key-value pairs for the yes, force and strip override levels to
  the base and en Localizable.strings files
- Change the transformedValue method in the ASSOverrideLevelTransformer
  class to return a localized string instead of the enum value string

This localizes the value displayed for the Override level setting found
in the ASS Subtitles section on the Subtitle tab in IINA's settings.
@low-batt
Copy link
Contributor Author

The fix for this issue has been merged into the IINA develop branch. I am reopening this issue until the fix is available in an official release of IINA so that users intending to report this problem can easily locate this existing report. Once the fix for this issue has been included in an official release this issue will be closed.

@low-batt low-batt reopened this May 22, 2024
@ShlomoCode
Copy link

ShlomoCode commented May 23, 2024

I could not formulate a suitable translation for the "strip" option in my language. Can you help me by using synonyms to find a match?
I mean like "yes" can be translated as "enabled" and "force" to "yes, forced", what does "strip" mean? maybe "extreme/radically"?
I read the mpv documentation of course

@low-batt
Copy link
Contributor Author

Strip means "remove all ASS tags". It will be as if the subtitle file did not include any style tags.

@ShlomoCode
Copy link

I'm confused. What does "yes" and "force" mean then?

@low-batt
Copy link
Contributor Author

Remember I'm not a mpv developer, so I could be wrong…

no means only the ASS tags within the subtitle file will be used. Any mpv subtitle options will be ignored.

yes means if you set any of the mpv sub-ass* options, for example sub-ass-line-spacing then those will override the ASS tags in the subtitle file. But non-ASS mpv related subtitle style options will not affect the ASS subtitles.

scale is like yes, but will also apply the non-ASS specific sub-scale option.

force is like scale, but applies all sub* style options, like sub-pos.

strip is like force except any ASS tags that were not overridden will be ignored.

At least I think this is how the sub-ass-override works. I'm a little confused as well. I was going to look into this some more, but haven't had time yet. So much to do…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants