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 #293113: Number instruments when using New Score Wizard #5260

Merged
merged 1 commit into from
Mar 20, 2020

Conversation

IsaacWeiss
Copy link
Contributor

When creating a new score and choosing instruments, all duplicates will be automatically numbered (e.g., "Violin" and "Violin" will be "Violin 1" and "Violin 2". Algorithm is probably wasteful; help requested.

The format "[default text] [digit]" may not be correct in all languages, but at the moment I don't know any way around that. The similar PR #2953 (for part names) did not address translations.

@GaspardPO
Copy link

What happens if you have 2 times the same instrument?
e.g. bass and treble for piano, or tab and part for guitar.

@IsaacWeiss
Copy link
Contributor Author

Multiple staves within the same instrument share one name between them. I'm not sure what you're asking.

@anatoly-os anatoly-os added this to the MuseScore 3.4 milestone Dec 16, 2019
@dmitrio95
Copy link
Contributor

The format "[default text] [digit]" may not be correct in all languages, but at the moment I don't know any way around that.

It could (at least partially) be done via translations mechanism. Setting part name

part->setPartName((part->partName() + QStringLiteral(" %1").arg(n)));

can be rewritten like

/*: Numbering of parts with equal names, where %1 stands for part name and %2 is a number. Example: "%1 %2" would expand to "Violin 1", "Violin 2" etc. */
part->setPartName(tr("%1 %2").arg(part->partName()).arg(n));

where the comment in /*: */ is a translator comment which will explain the context for translators on Transifex. That will allow translators to define the order of part name and number depending on a particular language.

@dmitrio95 dmitrio95 merged commit 0d0db01 into musescore:master Mar 20, 2020
@IsaacWeiss IsaacWeiss deleted the instrument-name-numbers branch April 26, 2020 04:36
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.

None yet

4 participants