Closed emansom closed 2 years ago
Oh, that's interesting. There seems to be some sort of global fallback to "Picture-in-picture" title among different browsers/languages (like in: #6). The string here (with second word from lower letter) does not appear in Firefox translation files. Not sure where it comes from, but seems to occur in multiple browsers when translation is missing (maybe its hardcoded).
If so, then it would probably be better to go with #6 approach, since this is a single string only and avoids string duplication into lower case (performs faster).
Oh, that's interesting. There seems to be some sort of global fallback to "Picture-in-picture" title among different browsers/languages (like in: #6). The string here (with second word from lower letter) does not appear in Firefox translation files. Not sure where it comes from, but seems to occur in multiple browsers when translation is missing (maybe its hardcoded).
Several Firefox language packs are installed on my host via package manager. LANG
environment variable is set system-wide to nl_NL.UTF-8
.
Maybe Firefox can't decide which one to use and defaults to fallback? 🤷🏻♂️
If so, then it would probably be better to go with #6 approach, since this is a single string only and avoids string duplication into lower case (performs faster).
String comparison operations take nanoseconds, it won't have any meaningful effect on performance whatsoever. Humans perceive things in the realm of tens of milliseconds, not nanoseconds. Doing the lowered string comparison covers more niche cases.
It is however your project, you decide. 👍🏻
@emansom
String comparison operations take nanoseconds, it won't have any meaningful effect on performance whatsoever.
Comparison, yes. But I was talking about string duplication before its compared. With this commit it would be 2 duplicated strings for each window on the workspace. And yes, it will be pretty much unnoticeable and I wouldn't be such a nitpicker, if this code wasn't running as part of GNOME Shell. I am just trying to be extra careful and mindful of GNOME Shell performance.
Superseded by #6
Using Firefox with the Dutch language, the window title ends with a lowercase
picture
and it yields non functional behavior.This MR resolves the issue.
Likely there's a deeper issue with the Dutch translation not being picked up correctly, haven't looked into that.