Skip to content

Translating instrument names

Peter Jonas edited this page Feb 2, 2024 · 1 revision

Naming convention

In previous versions of MuseScore there was some confusion about whether instruments should be labelled like Horn in F or like F Horn. Starting in MuseScore 4, we have decided to adopt a specific convention for this as explained below. Translators should try to adopt an equivalent convention in their language where possible.

Instrument in X

Here X identifies the transposition of a transposing instrument. The instrument is written in X, meaning it plays note X when C is written in the score.

Example: Horn in F means "Horn notated in F", so a written C for this horn sounds like F on the piano.

X Instrument

Here X identifies the lowest note the instrument can play. The instrument's description may provide further clarification:

  • Pitched in X
    • The lowest note is essentially fixed (e.g. wind instruments).
    • Example: G Dizi is a dizi pitched in G.
  • Tuned to X
    • The lowest note is adjustable (e.g. by detuning the lowest string on a string instrument).
    • Example: D Violone is a violone with lowest string tuned to D.

String components

Starting with MuseScore 4, instrument data has been broken into small components that are used to construct instrument names programmatically. This allows for more flexibility in how instrument names are displayed in different areas of the program.

Component Displayed
where?
Example data for instrument ID:
bb-bass-clarinet-bass-clef
Example data for instrument ID:
a-bass-clarinet-bass-clef
trackName UI Bass Clarinet (bass clef) Bass Clarinet (bass clef)
longName Score Bass Clarinet Bass Clarinet
shortName Score B. Cl. B. Cl.
traitName Score & UI *(B♭) A
Trait type Nowhere transposition transposition
description UI Bass clarinet in B♭. An octave lower than
the B♭ soprano clarinet. Notated in the
bass clef (‘German notation’).
Bass clarinet in A. Extremely rare and
almost never used today. Notated in the
bass clef (‘German notation’).

The asterisk * and parentheses () characters in the B♭'s traitName have a special meaning in the code. These characters will not be visible to users in the application.

Trait type

Trait type is the only non-translatable component. It simply tells us what the traitName means for a particular instrument. The possible values are:

Trait type Means that traitName refers to...
transposition The transposition of a transposing instrument (i.e. the note heard when playing a written C).
tuning The lowest note that the instrument can normally play.
course The number of courses (i.e. independently playable strings) the instrument has.
No value traitName is not used for this instrument.

The trait type value affects how the other string components are assembled to create the fully qualified instrument names you see in the score.

Translatable components

With the exception of 'trait type', all components are translatable. Translators should be aware that:

  • Translations are independent for each instrument and component.
    • For example, the string "Bass Clarinet" can be translated differently for the instrument in A compared to the one in B♭.
  • Translations don't have to be literal.
    • Instruments in the score should use whatever name is conventional in your language.
    • In the UI, you may add whatever qualifiers are necessary to distinguish from other instruments that have similar names in your language.

However, translators should use these freedoms sparingly. Please think carefully before deviating from patterns established in the English data. Always test your translations in the program to ensure that the behaviour is what you expect, particularly within the New Score dialog when the family dropdown is set to display 'All instruments'.

Identifying components in the translation interface

On Transifex, you will be asked to give translations for isolated strings like Car., Horn or *B♭. The Transifex editor will display disambiguation text to help you identify what the string is used for.

Source string Disambiguation (ID compnt.) Meaning (please provide a translation for…)
Car. carillon shortName The shortName of the Carillon instrument.
Horn ab-horn longName The longName of the Horn in A♭ instrument.
*B♭ bb-cornet traitName The traitName (in this case transposition) of the Cornet in B♭.

If you see an instrument ID you don't recognise, you can look it up in the first column of this Google Spreadsheet to see which instrument it refers to.

Instrument names in the UI

These components are used in the New Score dialog and the Add or remove instruments dialog:

Component Used where in Instruments dialog? Example ID: bb-bass-clarinet-bass-clef
trackName Middle column under the Instruments search box. Bass Clarinet (bass clef)
traitName Drop-down combo boxes next to some instruments in the middle column. *(B♭)
description Bottom left corner after you select an instrument in the middle column. Bass clarinet in B♭. An octave lower than the B♭ soprano
clarinet. Notated in the bass clef (‘German notation’).

Translator hint: You can control which instruments share a drop-down in your language by translating the same trackName differently for different instruments. You can control which option appears as the default in each drop-down by adding an asterisk * to the traitName that should be the default. Please use these abilities sparingly. Organise the instruments like they are in English unless you have a good reason not to.

When you add an instrument to the Your score list on the right of the Instruments dialog, the trackName and traitName are combined to give a fully qualified instrument name, which we call the "instrument title". This title will be displayed in other parts of the UI, such as the Mixer.

Example instrument title: Bass Clarinet (bass clef) in B♭

Translator hint: You are able to control whether the traitName (B♭) should appear before or after the trackName (Bass Clarinet (bass clef)) in your language, and whether the two components should be separated by the word "in" or by some other string. If you can, try to follow the formatting style used for the instrument names in English, but feel free to deviate from this if the English formatting would appear strange to users in your language.

Instrument names on the score

These components are used in instrument staff labels on the score:

Component Used in which staff labels? ID: bb-bass-clarinet-bass-clef ID: a-bass-clarinet-bass-clef
longName First system and after a section break. Bass Clarinet Bass Clarinet
shortName Subsequent systems. B. Cl. B. Cl.
traitName All systems, but only for certain instruments. *(B♭) A

The traitName in the score is the same as the traitName in the Instruments dialog. It is combined with the longName or the shortName to create staff labels on the first system or on subsequent systems respectively. These labels can be different to the instrument title displayed in the UI.

Example ID Instrument title in UI Staff label (first system) Staff label (subsequent systems)
bb-bass-clarinet-bass-clef Bass Clarinet (bass clef) in B♭ Bass Clarinet B. Cl.
a-bass-clarinet-bass-clef Bass Clarinet (bass clef) in A Bass Clarinet in A B. Cl. in A

Notice that the traitName (B♭ or A) is displayed in staff labels for the Bass Clarinet (bass clef) in A but not for the Bass Clarinet (bass clef) in B♭. This is because the B♭ variety is by far the most commonly used in English speaking countries, so it is normal to omit B♭ from staff labels for the bass clarinet in English.

Translator hint: You are able to control whether the traitName for a given instrument should appear in the score in your language. This is achieved by adding or removing parentheses () around the translated traitName.

Testing

Translation

Compilation

  1. Set up developer environment
  2. Install Qt and Qt Creator
  3. Get MuseScore's source code
  4. Install dependencies
  5. Compile on the command line
  6. Compile in Qt Creator

Beyond compiling

  1. Find your way around the code
  2. Submit a Pull Request
  3. Fix the CI checks

Misc. development

Architecture general

Audio

Engraving

Extensions

Google Summer of Code

References

Clone this wiki locally