Skip to content

Effect & effect parameter short names#1064

Merged
rryan merged 7 commits intomixxxdj:masterfrom
Be-ing:effect_short_names
Dec 9, 2016
Merged

Effect & effect parameter short names#1064
rryan merged 7 commits intomixxxdj:masterfrom
Be-ing:effect_short_names

Conversation

@Be-ing
Copy link
Copy Markdown
Contributor

@Be-ing Be-ing commented Dec 5, 2016

Allow effects and effect parameter manifests to define short names to be displayed in skins.
fixing https://bugs.launchpad.net/mixxx/+bug/1395245

Copy link
Copy Markdown
Member

@rryan rryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread src/effects/native/reverbeffect.cpp Outdated
EffectManifestParameter* time = manifest.addParameter();
time->setId("bandwidth");
time->setName(QObject::tr("Bandwidth"));
time->setName(QObject::tr("Band"));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of "BW"?

Comment thread src/widget/weffect.cpp Outdated
if (pEffect) {
const EffectManifest& manifest = pEffect->getManifest();
name = manifest.name();
if (! manifest.shortName().isEmpty()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please drop the space after ! (and below)

setText(m_pEffectParameterSlot->shortName());
} else {
setText(m_pEffectParameterSlot->name());
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be nice to setBaseTooltip as something like <name>: <description> so it's easy to learn the full name. (same in WEffect)

Comment thread src/widget/weffect.cpp Outdated
if (! manifest.shortName().isEmpty()) {
if (!manifest.shortName().isEmpty()) {
name = manifest.shortName();
description = manifest.name() + ": " + manifest.description();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the ": " be translatable? @sblaisot, that should be " : " in French, correct?

Copy link
Copy Markdown
Member

@sblaisot sblaisot Dec 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, the english ": " translates in french to " : " (in fact, the first space, before the colon, is a non-breaking space).
But I'm afraid this will be hard in transifex to translate that as the space after the colon will not be visible in the interface and it need some hints to be properly translated :(
@esbrandt what do you think ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

French typography rule is simple (this is the only simple thing in french): if the punctuation mark is made of a single part (like dot, comma, ...), there is no space before and one space after. If it is made of two parts (like colon, semicolon, ...), there is a non-breaking space before and a space after.
with the exception of parenthesis, brackets, ... which have a space outside and no space inside.

@rryan
Copy link
Copy Markdown
Member

rryan commented Dec 6, 2016

LGTM, thanks!

time->setId("bandwidth");
time->setName(QObject::tr("Bandwidth"));
time->setName(QObject::tr("Band"));
time->setShortName(QObject::tr("BW"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a common abbreviation. We cant expect translators to guess what this means.
Up to 11 characters are used for short name Moog Filter, can`t we use just Bandwidth then?

The transifex translation service allows to set a character limit. We can use that, and/or add a comment for translator in the code, hinting that they have $ characters max. and should use an abbreviation where appropriate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Moog Filter" is for a short effect name, this is for a short parameter name. There's less space for parameter names than effect names.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@esbrandt what's the latest way to add a hint to translators? Could we address it that way?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(by "it" here I mean the problem that "BW" is not a common abbreviation)

Do these annotations actually make it into transifex?
http://doc.qt.io/qt-4.8/i18n-source-translation.html#translator-comments

@esbrandt
Copy link
Copy Markdown
Contributor

esbrandt commented Dec 6, 2016 via email

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Dec 6, 2016

Let's revisit the character limit issue after new effects sections for skins are finalized.

@daschuer
Copy link
Copy Markdown
Member

daschuer commented Dec 6, 2016

Thanks, any comment on the i18 issue/character limit?

I have the experience that a character count limit does not works well, unless you use a fixed width font. This is especially true if you allow non latin fonts.
In my professional work we check the rendered pixel width of a the critical texts.

We may consider to do this as a unit-test, but this is too late, since the original translator might be not reachable anymore. Does Transiflex support Plug-Ins in order to do this?

At least we should elide long texts to prevent the GUI from bursting at the seams.

@Be-ing Be-ing force-pushed the effect_short_names branch from 7a7d0c3 to a5a2fdc Compare December 7, 2016 18:39
@rryan
Copy link
Copy Markdown
Member

rryan commented Dec 7, 2016

What about using text elision on effect / parameter name widgets? WLabel already supports this:

<Elide>right</Elide>

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Dec 7, 2016

I think short names written by a human are clearer than a verbose name truncated with an ellipse.

Also, there's a preference option to turn off tooltips in the skins. Users with that option on can't see tooltips for elided names.

@rryan
Copy link
Copy Markdown
Member

rryan commented Dec 7, 2016

I think short names written by a human are clearer than a verbose name truncated with an ellipse.

Unless I'm misunderstanding, we're talking about the case where the short name written by a human (or its translation) is too long, right?

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Dec 7, 2016

Unless I'm misunderstanding, we're talking about the case where the short name written by a human (or its translation) is too long, right?

Oh, I misunderstood. I thought the point of short names was to make that not happen.

@rryan
Copy link
Copy Markdown
Member

rryan commented Dec 7, 2016

Oh, I misunderstood. I thought the point of short names was to make that not happen.

Ah I see how what I said was ambiguous. I'm very much in favor of short names, but am wondering to @daschuer's point how to handle the case where the short name overflows (for example, badly translated into something verbose, or maybe the user's accessibility settings changes the font size on us). I think a character limit in Transifex might help to impose an upper bound on translations that would surely overflow but agree it probably wouldn't work in all cases.

Comment thread src/widget/weffect.cpp Outdated
description = manifest.description();
if (!manifest.shortName().isEmpty()) {
name = manifest.shortName();
description = manifest.name() + tr(": ") + manifest.description();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think

//: Effect description %1 = effect name %2 = effect description  
tr("%1: %2").arg(manifest.name(), manifest.description());

is more translator friendly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment thread src/widget/weffect.cpp Outdated
if (!manifest.shortName().isEmpty()) {
name = manifest.shortName();
description = manifest.name() + tr(": ") + manifest.description();
// %1 = effect name
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only //: and /*: */ comments are picked up for the translator.

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Dec 9, 2016

Ready to merge?

@rryan rryan merged commit 7e81c30 into mixxxdj:master Dec 9, 2016
@rryan
Copy link
Copy Markdown
Member

rryan commented Dec 9, 2016

thanks!

@Be-ing Be-ing deleted the effect_short_names branch February 1, 2017 01:16
@mixxxbot mixxxbot mentioned this pull request Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants