Rafostar / gnome-shell-extension-pip-on-top

Makes "Picture-in-Picture" windows stay on top (even on Wayland session). Compatible with Firefox, but may work with few other browsers too.
GNU General Public License v2.0
53 stars 10 forks source link

Support "Picture-in-picture" string #6

Closed helkaluin closed 2 years ago

helkaluin commented 2 years ago

I have no idea why the Brave devs decided to add hyphens to the Chromium default, but there we are.

Rafostar commented 2 years ago

Is Brave string seriously different from Chromium (Picture in picture VS Picture-in-picture)? Also, any idea where are Brave translations stored? If they are public, we could do non-english support too (similarly like we do for Firefox).

helkaluin commented 2 years ago

I did a bit of grepping and it seems it's because of Brave's patchset over Chromium having its own list of translated strings.

Specifically you want to look for translation id="7750228210027921155" in app/resources/generated_resources_LANGCODE.xtb

https://github.com/brave/brave-core/tree/master/app/resources

I did a trivial git diff and I don't think the translation ids should change. More info from the Chromium side of how they handle i10n could be found here: https://www.chromium.org/developers/design-documents/ui-localization/

helkaluin commented 2 years ago

Upon further investigation it seems the hyphenated "Picture-in-picture" might actually not be a Brave-exclusive thing, but rather an en-GB thing...

Anyway, if you could incorporate i10n of Chromium strings, I'm sure that will supersede this pull request.

Rafostar commented 2 years ago

@helkaluin

might actually not be a Brave-exclusive thing, but rather an en-GB thing...

Seems like it. Also same string seems to appear in Firefox for some languages. See #7. This one solution should perform faster as it does not duplicate the string into lowercase. So I would rather go with this as a workaround until handling Chromium languages is investigated and improved.

Can you update the commit title?

Rafostar commented 2 years ago

I meant commit message. Something like:

git commit --amend

And change it to something like:

Support "Picture-in-picture" string

Cause its not only for Brave and not only for en-GB. Then please:git push --force your change. Thanks.

Rafostar commented 2 years ago

Thank you!