Fixed missing emails in the author section. #7975
Fixed missing emails in the author section. #7975renderman21 wants to merge 15 commits intoLMMS:masterfrom
Conversation
|
Tested this, the emails for LADSPA plugins are still missing. The only change is that the full email addresses for Andy and Jesse are fully missing rather than partially missing. Edit: It looks like the text is just fine, but now that there are no spaces in the email address, it is wrapping it to the next line, and the label itself is not resizing to accommodate and so the text gets clipped out of existence. Disabling text wrapping fixes this, but of course that means text can't wrap anymore. |
It wasn't utilizing the full width or height, which was especially apparent when resizing the window
This makes it more stylistically consistent with the native plugins by using rich text, and also fixes the stupid text wrapping issue.
|
The text wrapping issue was driving me crazy, so I changed the way LADSPA plugin descriptions are rendered to be more similar to how native plugin descriptions are rendered. This includes slightly more readable descriptions for LADSPA plugin properties for users who don't read the LADSPA spec for fun ( This is a bit drastic and I thought about opening a new PR for this, but it's directly related to the line wrapping problem so... Before
After
|
| const auto ldesc = lm->getDescription(lkey); | ||
|
|
||
| QString labelText = | ||
| "<p><b>" + QWidget::tr("Name") + ":</b> " + lm->getName(lkey) + "</p>" |
There was a problem hiding this comment.
| "<p><b>" + QWidget::tr("Name") + ":</b> " + lm->getName(lkey) + "</p>" | |
| QWidget::tr("<p><b>Name:</b> %1</p>").arg(lm->getName(lkey)) |
How about simplifying each line like this?
Things like the colon, spacing, and position of the name in relation to the "Name:" label are technically language-dependent.
There was a problem hiding this comment.
I agree regarding the colon and spacing, but I don't think including the markup in the translation string makes sense. What about something like:
| "<p><b>" + QWidget::tr("Name") + ":</b> " + lm->getName(lkey) + "</p>" | |
| "<p><b>" + QWidget::tr("Name: ") + "</b>" + lm->getName(lkey) + "</p>" |
Edit: I forgot about QString::arg(), thanks for the reminder!
There was a problem hiding this comment.
My concern was that an Arabic translation would look like this:
الاسم: Allpass delay line
with the "Allpass delay line" text being bold while the name label is non-bold.
The only easy way around this issue I think would be to include the markup in the translation string.
There was a problem hiding this comment.
I would imagine that the RTL text rendering happens after markup, since layout is dependent on markup, but I'll run a quick test to see what actually happens.
Edit: This can't currently be tested as there aren't actually translation strings for most of the plugin selector dialog. Hm.
There was a problem hiding this comment.
After further experimentation, I can confirm that changing the language does not change the layout to RTL as I would have expected. While I do think that including markup in the translation string is generally incorrect, in this case I have to concede that it's the only way to get it working without fixing the greater RTL layout issue.
I renounce the savagery of `string + string + string + string...`
Also HTML-escape the plugin description as suggested by regulus79
| tr("Description: "), qApp->translate("PluginBrowser", descriptor.description).toHtmlEscaped(), | ||
| tr("Author: "), QString::fromUtf8(descriptor.author) |
There was a problem hiding this comment.
Should the author come before the description?


As per #7936, here is the attempt in order to fix the missing emails as described.
Some things to note, most of the email format have the characters
/dot/and/atin them and that they had to be converted to the correct characters of.and@respectively.LADSPA plugins, however, are a different story. Originally, the solution was to manually change the email format but it did not work since it is dependent on the ladspa repository. Meaning, no changes can be made in , unless that repository is changed. Anyway, some author emails have a, rather, peculiar email format and that they've been manually changed. This case happens for the authors: Andy Wingo and Jesse Chappel. They both have spaces, and they are inconsistent with the other authors' emails present in the
plugins/swhfolder