Skip to content
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

fix #305676: Repeat barline tooltips in Repeats & Jumps palette are not getting translated #6096

Merged
merged 1 commit into from
May 25, 2020

Conversation

Jojo-Schmitz
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz commented May 18, 2020

Resolves https://musescore.org/en/node/305676

  • Use translated names of barlines in timeline and Repeats & Jumps palette.
  • Change to use SMuFL names for barlines so we use the same strings and translations in basic and advanced workspace palettes, master symbols palette (untranslated before), inspector and timeline.

mscore/timeline.cpp Outdated Show resolved Hide resolved
mscore/timeline.cpp Outdated Show resolved Hide resolved
@Jojo-Schmitz Jojo-Schmitz force-pushed the barline-heavy branch 4 times, most recently from c07d278 to 445ea48 Compare May 19, 2020 11:36
libmscore/mscore.h Outdated Show resolved Hide resolved
@Jojo-Schmitz Jojo-Schmitz changed the title fix #305613: add heavy double barline fix #305613: add heavy, revers end and heavy double barlines May 19, 2020
@Jojo-Schmitz Jojo-Schmitz changed the title fix #305613: add heavy, revers end and heavy double barlines fix #305613: add heavy, reverse end and heavy double barlines May 19, 2020
@Jojo-Schmitz Jojo-Schmitz force-pushed the barline-heavy branch 4 times, most recently from 521aa89 to 00e8e92 Compare May 19, 2020 16:57
@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented May 19, 2020

Hmm, Travis CI fails, but what the heck is https://travis-ci.org/github/musescore/MuseScore/jobs/688906064#L4338-L4339 trying to tell me?

Ah, https://travis-ci.org/github/musescore/MuseScore/jobs/688906064#L13216-L13248
It complains about the repeat barlines descriptions being duplicates, in the barlines and the repeats palette.
Hmm, yes, they are duplicates, but on purpose, as these are also identical. How to fix this?

The (dirty) trick to avoid that prior to this PR here was to aooend the word "barline" to the description in for repeats in barline.cpp but not use change texts of the repeats palette (introduced in #5760), but that also leads to them not getting translated, so can't stay that way anyhow.
Guess @Kartikay26 is needed here...
OK, added exceptions to tst_palette.cpp to allow certain duplicates now

@@ -3331,7 +3331,7 @@ const std::array<const char*, int(SymId::lastSym)+1> Sym::symUserNames = { {
"Smooth lift, short",
QT_TRANSLATE_NOOP("symUserNames", "Muted (closed)"),
"Half-muted (half-closed)",
QT_TRANSLATE_NOOP("symUserNames", "Opened"),
QT_TRANSLATE_NOOP("symUserNames", "Open"),
Copy link
Contributor Author

@Jojo-Schmitz Jojo-Schmitz May 20, 2020

Choose a reason for hiding this comment

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

We should not be changing SMuFL names, unless we absolutely have to, might be better to raise an issue with them about this particular text, but my past experience with this are... hmm... mixed, to put it mildly.
We could resort to 'translate' this string to "Opened" for en_US and en_GB (we do similar thing with "bar" vs. measure and "ledger" vs "leger" already, as a result of above mentioned 'experience'), as that does seem make more sense, vs. the "closed" strings above.

Comment on lines +67 to +73
// Exceptions - allowed duplicates
if (name.key().endsWith(" repeat sign") // repeat barlines in "Barlines" and "Repeats & Jumps" palette
|| name.key() == "Open" // articulations in "Articulations" and channel switch text in "Text" palette
|| name.key() == "Line" // bracket type in "Brackets" and line type in "Lines" palette
|| name.key().startsWith("Add parentheses to ") // "Noteheads" and "Accidentals" palette
)
continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of if(cond) continue; we could do if(!cond) duplicates = true; That would make the debug statement below print out the duplicates if you run the test. However, IIRC, Travis doesn't show debug output if the tests pass (and no one would check it anyway even if it did), so I don't know how we could show the warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the warnings don't show, they won't be worth being added

@Jojo-Schmitz
Copy link
Contributor Author

@anatoly-os let me know whether you'd like these 2 commits being disentangled, at least the 2nd should make it into 3.x, but in the current form won't without the 1st, and creating 2 PRs from it would mean merge conflicts needed to get sorted later

@anatoly-os
Copy link
Contributor

@Jojo-Schmitz I think this PR should go to master, since the changes are not the fixes, but the new functionality. You can make a new PR to 3.x including only the second commit.

@Jojo-Schmitz
Copy link
Contributor Author

Jojo-Schmitz commented May 25, 2020

OK, done, see #6119. Next step is to change this here ;-), done now too.
So just the other way round, this is still for 3.x, but only with that (former) 2nd commit (and only for 3.x), that other for master (only), with both commits still.

@Jojo-Schmitz Jojo-Schmitz changed the title fix #305613: add heavy, reverse end and heavy double barlines fix #305676: Repeat barline tooltips in Repeats & Jumps palette are not getting translated May 25, 2020
…ot getting translated

by fixing the mtest to allow certain duplicates and reverting
some
earlier changes to make those textx different
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