-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Effect & effect parameter short names #1064
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -26,6 +26,7 @@ EffectManifest ReverbEffect::getManifest() { | |||
EffectManifestParameter* time = manifest.addParameter(); | |||
time->setId("bandwidth"); | |||
time->setName(QObject::tr("Bandwidth")); | |||
time->setName(QObject::tr("Band")); |
There was a problem hiding this comment.
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"?
@@ -44,7 +44,11 @@ void WEffect::effectUpdated() { | |||
EffectPointer pEffect = m_pEffectSlot->getEffect(); | |||
if (pEffect) { | |||
const EffectManifest& manifest = pEffect->getManifest(); | |||
name = manifest.name(); | |||
if (! manifest.shortName().isEmpty()) { |
There was a problem hiding this comment.
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()); | ||
} |
There was a problem hiding this comment.
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)
name = manifest.shortName(); | ||
description = manifest.name() + ": " + manifest.description(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
LGTM, thanks! |
@@ -26,7 +26,7 @@ EffectManifest ReverbEffect::getManifest() { | |||
EffectManifestParameter* time = manifest.addParameter(); | |||
time->setId("bandwidth"); | |||
time->setName(QObject::tr("Bandwidth")); | |||
time->setName(QObject::tr("Band")); | |||
time->setShortName(QObject::tr("BW")); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Thanks, any comment on the i18 issue/character limit?
… On Dec 6, 2016, at 07:35, Be ***@***.***> wrote:
@Be-ing commented on this pull request.
In src/effects/native/reverbeffect.cpp <#1064>:
> @@ -26,7 +26,7 @@ EffectManifest ReverbEffect::getManifest() {
EffectManifestParameter* time = manifest.addParameter();
time->setId("bandwidth");
time->setName(QObject::tr("Bandwidth"));
- time->setName(QObject::tr("Band"));
+ time->setShortName(QObject::tr("BW"));
"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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1064>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AEUPSZkHWPToJGBjRfVstVJdXej2O2H2ks5rFQIfgaJpZM4LEm5F>.
|
Let's revisit the character limit issue after new effects sections for skins are finalized. |
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. 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. |
7a7d0c3
to
a5a2fdc
Compare
What about using text elision on effect / parameter name widgets? WLabel already supports this: <Elide>right</Elide> |
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. |
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. |
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. |
description = manifest.description(); | ||
if (!manifest.shortName().isEmpty()) { | ||
name = manifest.shortName(); | ||
description = manifest.name() + tr(": ") + manifest.description(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -46,7 +46,9 @@ void WEffect::effectUpdated() { | |||
const EffectManifest& manifest = pEffect->getManifest(); | |||
if (!manifest.shortName().isEmpty()) { | |||
name = manifest.shortName(); | |||
description = manifest.name() + tr(": ") + manifest.description(); | |||
// %1 = effect name |
There was a problem hiding this comment.
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.
Ready to merge? |
thanks! |
Allow effects and effect parameter manifests to define short names to be displayed in skins.
fixing https://bugs.launchpad.net/mixxx/+bug/1395245