Giter Site home page Giter Site logo

Comments (11)

low-batt avatar low-batt commented on July 23, 2024 2

I have fixed both the AUDIO and SUBTITLES tabs to not truncate the number when the panel is compressed. But I do not like that the units ends up right next to the field. Looks a bit ugly. However we have reached the limit of my GUI abilities. I will leave the PR as a draft. Will need one of the other developers to tweak this to look better when compressed.

from iina.

low-batt avatar low-batt commented on July 23, 2024 1

With the proposed fix the audio delay setting controls now look like:
he-audio-delay-fixed

from iina.

low-batt avatar low-batt commented on July 23, 2024 1

When I tested it the text field holding the number automatically reduced it's size. The results shown are unexpected. I will investigate.

from iina.

low-batt avatar low-batt commented on July 23, 2024

Analysis

My initial take was that s. It is not a letter or an abbreviation, but an International System of Units (SI) symbol. From the US Metric Association FAQ:

SI unit symbols are the same in all languages, as you can see on this nutrition label from Japanese snack cakes.

That suggested the error was that IINA was presenting this label to translators instead of making it universal across all languages. However as shown here usage of SI symbols is not common practice in some locals. Therefore IINA should allow translators to specify the text to use in this case. Thus the layout problem needs to be corrected.

Fixing

The solution is to change the Line Break attribute of the text field cell from Word Wrap to something else.

from iina.

ShlomoCode avatar ShlomoCode commented on July 23, 2024

After further thought, the abbreviation "שנ'" is not commonly used in Hebrew, so it seems to me that it is better to translate it as "שניות". I consulted about this with some local colleagues who also thought so. After changing the translation there is a problem even with this PR:

CleanShot 2024-04-27 at 22 44 38@2x

Can you fix it? Maybe you should narrow the width of the number input?

from iina.

low-batt avatar low-batt commented on July 23, 2024

Changing the units to be larger and setting the language to be Right-to-Left Pseudolanguage I see this:
en-audio-delay-6

The text field shrank to allow space for the units string. All seems to be working fine. But when I change the language to be Hebrew I see this:
he-audio-delay-broken

Not quite the same as the screenshot you posted, but something is clearly broken. Not obvious to me what is causing this. Will continue to investigate.

from iina.

ShlomoCode avatar ShlomoCode commented on July 23, 2024

The second image you uploaded looks pretty good, I don't understand how. I even tested on a clean MacOS VM and it looked like this:
CleanShot 2024-04-28 at 03 26 52@2x

from iina.

low-batt avatar low-batt commented on July 23, 2024

I experimented a lot, but was unable to reproduce the behavior shown in your screenshot:
he-audio-clip

I did update the code to clip instead of truncate to match the behavior of the other labels. Make certain your QuickSettingsViewController.xib has the lineBreakMode set for 1VY-EN-1mi:

<textFieldCell key="cell" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="s" id="1VY-EN-1mi">

I found the 0s (kan-bp-QDi) and 5s (Kt8-Kg-i2O) labels have not been setup to be translated (missing from the en translations). I assume you had to add those directly to the he strings file? I believe these first have to be added to the en file, pushed to Crowdin and changed there. We will need to coordinate with @uiryuu on this.

I did confirm that some other languages also do not use the SI symbol:

Translations:
low-batt@gag iina (he-audio-delay *$%=)$ grep -inr --include \*.strings '1VY-EN-1mi.title' *
iina/de.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/ur.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/he.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "שנ'";
iina/ar.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "ث";
iina/el.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/zh-Hans.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "秒";
iina/ja.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "秒";
iina/fa.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "ثانيه";
iina/mk.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/eu.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/en.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/uk.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = " с";
iina/kn.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/en-GB.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/es.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/is.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/sl.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/da.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/it.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "i";
iina/bg.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/sk.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/sr-Latn.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/sr.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/be.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/ta.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/ne.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/ml.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/sv.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "sek";
iina/cs.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/ko.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "초";
iina/hy.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/zh-Hant.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "秒";
iina/no.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/hu.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "mp";
iina/tr.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "sn";
iina/pl.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/pt-BR.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/vi.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "g";
iina/lv.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "sekundēm";
iina/ru.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "с";
iina/af.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/fr.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/fi.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/id.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "dtk";
iina/nl.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "sec";
iina/th.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/pt.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/bn.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/ug.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/ro.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/hr.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";
iina/hi.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "सै.";
iina/ca.lproj/QuickSettingViewController.strings:5:"1VY-EN-1mi.title" = "s";

from iina.

ShlomoCode avatar ShlomoCode commented on July 23, 2024

Sorry, I just noticed that I took a image of "subtitle delay" and you only fixed "audio delay"...

Confirms that audio delay seems normal:
CleanShot 2024-04-30 at 23 59 29@2x

But when I shrink the window it is not possible to see a decimal number:
CleanShot 2024-05-01 at 00 00 36@2x
Do you have an idea how to solve this?

from iina.

low-batt avatar low-batt commented on July 23, 2024

Yes. I will fix that. It will mean the label will get clipped instead of the box with the number when the window is really compressed.

from iina.

ShlomoCode avatar ShlomoCode commented on July 23, 2024

To clarify the progress in the meantime, this is how it is currently in a large window (it's perfect):
CleanShot 2024-05-03 at 06 59 28@2x

And this is in a quarter window (it's a little ugly but usable):
CleanShot 2024-05-03 at 06 58 53@2x

If there would be a way not to omit part of the label even in a quarter window, that would be perfect.

from iina.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.