-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Help translate MuseScore
This page is about how to translate the MuseScore desktop program. Please visit the following pages if you are interested in helping with translations for:
- MuseScore.org Website and Handbook
- MuseScore Tutorial Videos (just one video right now)
Translation of the MuseScore desktop software happens at Transifex.
Information about the sign-up process is currently available here, but will be transferred to this page soon.
Please also read about Translating instrument names.
Many source strings contain special characters that have a particular meaning to MuseScore.
Character(s) in source string | Purpose / meaning |
---|---|
%1 , %2 , %3 , … |
Replacement markers |
%n or %Ln
|
Plural forms |
& or && surrounded by spaces |
The word "and" |
&a , &b , &c , … or &1 , &2 , &3 , … |
Mnemonic access key |
These characters must be handled appropriately in translations as explained below.
The percent sign followed by a number (i.e. %1
, %2
, %3
, etc.) indicates where a secondary string will be substituted into the main string. You must add each marker to the appropriate place in the translated string for the substitution to work in your language.
Source string | Romanian | Japanese |
---|---|---|
Add note %1 to chord |
Adaugă nota %1 la acord | コードに %1 の音を追加 |
File "%1" is corrupted. |
Fișierul „%1” este corupt. | ファイル "%1" が壊れています |
Start measure: %1; Start beat: %2 |
Măsură început: %1; Timp început: %2 | 開始小節: %1; 開始拍: %2 |
The markers in the above strings will be replaced with a note name, a file name, and numeric digits respectively.
Translator hint: Look out for developer notes on Transifex that tell you what the markers mean in cases where it isn't obvious. Information in the Context tab may also provide clues.
The percent sign followed by the lowercase letter 'N' (i.e. %n
) is a special replacement marker used to represent a quantity of something.
Contains %n matching element(s)
Last modified %n day(s) ago
%n error(s) found
In these source strings, %n
will be replaced by a number (e.g. 7
), so it’s important that the marker also appears in the translation.
Aside: In theory you can use %Ln
instead of %n
in the translation if you want the number to be localised so that it appears correctly in your language. However, it doesn't make much difference in practice since n
is always an integer, and almost always less than 1000. Presumably %Ln
would group digits in higher numbers based on thousands (e.g. one billion would be 1,000,000,000
in English, or 1.000.000.000
in other European languages).
In the source strings above, the first noun after the %n
marker is written ending (s)
for grammatical reasons (e.g. element(s)
). However, we don't want the strings to appear that way in MuseScore.
Here is how the source string %n error(s) found
should appear in MuseScore’s UI:
n = |
English (US) | French | Polish | Chinese (China) |
---|---|---|---|---|
0 | 0 errors found | 0 erreur trouvée | Znaleziono 0 błędów | 发现 0 个错误 |
1 | 1 error found | 1 erreur trouvée | Znaleziono 1 błąd | 发现 1 个错误 |
2 | 2 errors found | 2 erreurs trouvées | Znaleziono 2 błędy | 发现 2 个错误 |
3 | 3 errors found | 3 erreurs trouvées | Znaleziono 3 błędy | 发现 3 个错误 |
4 | 4 errors found | 4 erreurs trouvées | Znaleziono 4 błędy | 发现 4 个错误 |
5 | 5 errors found | 5 erreurs trouvées | Znaleziono 5 błędów | 发现 5 个错误 |
6 | 6 errors found | 6 erreurs trouvées | Znaleziono 6 błędów | 发现 6 个错误 |
… | … | … | … | … |
22 | 22 errors found | 22 erreurs trouvées | Znaleziono 22 błędy | 发现 22 个错误 |
… | … | … | … | … |
25 | 25 errors found | 25 erreurs trouvées | Znaleziono 25 błędów | 发现 25 个错误 |
… | … | … | … | … |
1 000 000 | 1000000 errors found | 1000000 d’erreurs trouvées | Znaleziono 1000000 błędów | 发现 1000000 个错误 |
1 000 001 | 1000001 errors found | 1000001 erreurs trouvées | Znaleziono 1000001 błędów | 发现 1000000 个错误 |
… | … | … | … | … |
As the table shows, in many languages the translation of %n error(s) found
varies depending on the value of n
. These variations are known as the plural forms.
Translator hint: You must provide a translation for every plural form that is available in your language.
English has two plural forms: singular (n = 1
) and plural (all other values of n
), hence we maintain two English "translations" of each pluralised string. These are identified on Transifex by the labels 1
and other
respectively.
Source string | Plural label | n = |
English (US) |
---|---|---|---|
%n error(s) found |
1 |
1 | %n error found |
%n error(s) found |
other |
0 or 2, 3, 4… | %n errors found |
French is similar but it uses the singular form for n = 0
as well as n = 1
, and it has a special case for when n
is a multiple of a million.
Source string | Plural label | n = |
French |
---|---|---|---|
%n error(s) found |
1 |
0 or 1 | %n erreur trouvée |
%n error(s) found |
many |
1 000 000, 2 000 000, 3 000 000, … | %n d’erreurs trouvées |
%n error(s) found |
other |
2, 3, 4…999 999, 1 000 001…1 999 999, … | %n erreurs trouvées |
All languages have the other
form. For some languages, such as Chinese, this is the only plural form, and it is used for all values of n
.
Source string | Plural label | n = |
Chinese (China) |
---|---|---|---|
%n error(s) found |
other |
0, 1, 2, 3… | 发现 %n 个错误 |
Polish has several plural forms and more complicated rules for when each is to be used. Arabic has six forms, which is the maximum currently required by any language.
Translator hint: Transifex will not allow you to save the translation of a pluralised string until you have provided all of the plural forms needed in your language.
The plural labels, and the rules for when to use them, are defined by the Unicode Common Locale Data Repository (CLDR).
Transifex label |
CLDR label / abbr. |
CLDR guidelines (values of n the label is commonly used for,in order of precedence, decreasing) [grammatical name] |
---|---|---|
other |
other / x
|
Most integers [plural], or all values of n not covered by a more specific rule. Required. |
1 |
one / o
|
n is 1 [singular], or ends in 1 (e.g. 11, 21, 31, etc.). |
2 |
two / t
|
n is 2 [dual], or ends in 2 (e.g. 12, 22, 32, etc.). |
0 |
zero / z
|
n is 0, or ends in 0 (e.g. 10, 20, 30, etc.). |
few |
few / f
|
n is 3 [trial], is small [paucal], or small numbers are involved (e.g. ends in 3, 4, or 5, etc.). |
many |
many / m
|
n is large, is fractional (e.g. 0.5), or large numbers are involved (e.g. multiples of 1 000 000). |
The full CLDR Language Plural Rules are more complicated than the above guidelines (e.g. Russian uses the one
form for numbers ending in '1' but not those ending in '11'). Also, rules are merged wherever possible, with the highest rule taking priority (e.g. in French the n = 0
case always matches the n = 1
case, hence the one
label can be used for both cases and there is no need for a separate zero
form).
Translator hint: If you're not sure when a particular rule applies, you can use trial and error to work it out — for example, by changing the initial number of measures in MuseScore's New Score dialog — to see which translation is used with each value of n
.
It's worth noting that, while the plural labels are standardized, the rules for when to apply them are not the same in each language (e.g. French uses the one
form for n = 0
, whereas English uses the other
form, as mentioned above). Also, the rules say nothing about how the string is to be modified for each form. Even in English, the plural form isn't always the singular noun with an 's' on the end. Counter-examples include:
Singular | Plural | Comment |
---|---|---|
1 fish | 2 fish | |
1 man | 2 men | |
1 child | 2 children | |
1 baby | 2 babies | |
1 ox | 2 oxen | |
1 antenna | 2 antennae | |
1 staff (US), or 1 stave (UK) | 2 staves | |
1 penny | 2 pennies | Counting coins |
"A pound and a penny" | "Two pounds and two pence" | Prices in sterling |
However, all of these can be represented with two forms, singular and plural, even if the two forms are sometimes the same (as in "1 fish", "2 fish", which can both be translated as "%n fish").
Historically, English had "tuppence" (two pence) and "thruppence" (three pence), as well as "onepence", "twopence", "threepence", "fourpence", etc., although such terms are no longer in common use. CLDR is only really designed to cope with numeric digits (i.e. 2 pence) rather than numeric words.
It is possible to translate a number as word, but you must be careful when doing this. For example, you could translate the n = 1
version of %n day(s) ago
as "yesterday" in English, but you can't translate the n = 0
case as "today" because that translation will also be used for the other
case. Meanwhile, in French the n = 0
and n = 1
cases share a translation, which rules out both "yesterday" and "today". For this reason, it's usually safer to handle such cases manually in the code rather than abusing the CLDR system.
The ampersand symbol (&
) appears in some strings. It can have different meanings in different places.
Translator hint: As a general rule, the translation should never contain more &
symbols than the source string.
When surrounded by spaces, &
just means "and". It should be translated to a word or a symbol that means "and" in your language.
Source string (en ) |
German translation (de ) |
Italian translation (it ) |
---|---|---|
Repeats & jumps | Wiederholungen & Sprünge | Salti e ripetizioni |
Breaths & pauses | Atemzeichen & Zäsuren | Respiri e cesure |
Aside: In English, the word "mnemonic" is pronounced "nemonic" (the first 'm' is silent).
When &
occurs in front of a letter or number it creates a mnemonic access key, which has a special meaning to the software as explained below. In this case the &
character itself should appear in all translations. It will not show up in the UI, although the character after it may be underlined in menus and button labels on Windows and Linux (usually only if the user presses the Alt key).
Source string (en ) |
German translation (de ) |
Italian translation (it ) |
---|---|---|
&Save | &Speichern | &Salva |
Save &as | Speichern &als | Salva &come |
Exchange voices &2-3 | Stimmen &2-3 vertauschen | Scambia le voci &2-3 |
The character after &
is the mnemonic. On Windows and Linux, users can press Alt followed by the mnemonic character to trigger a button or menu item. For example, in the File menu, users can press Alt+S to trigger the 'Save' action without having to navigate the entire File menu.
Translator hint: Each translated string should either contain one mnemonic (if the source string has one) or no mnemonics. There should never be more than one mnemonic. Mnemonics must be unique within a menu or dialog, but you can use the same letter/number key again in submenus and child dialogs.
See Microsoft's guidelines for help choosing mnemonics to use as access keys:
- https://docs.microsoft.com/en-gb/windows/win32/uxguide/cmd-menus#access-keys
- https://docs.microsoft.com/en-us/windows/apps/design/input/access-keys#choose-access-keys
Important: If the source string doesn't contain a mnemonic then you must not provide one in the translation. If you try to do this then the &
character itself will be visible in the UI, which in this situation is undesirable.
Note: those don't seem to exist anymore in the current version.
It may occasionally be necessary to use &
as itself (e.g. to mean "and") in a string that already contains a mnemonic. This is achieved by doubling the &
symbol in places where you want it to appear as itself. &&
in a source or translated string will appear as a single &
in the UI.
Source string (en ) |
German translation (de ) |
Italian translation (it ) |
---|---|---|
&Repeats && jumps | Wiederholungen && &Sprünge | Salti e &ripetizioni |
Breaths && pa&uses | Atemzeichen && Zäsuren | R&espiri e cesure |
Notice that the German translator did not provide a mnemonic for Atemzeichen && zäsuren (there is no requirement to provide mnemonics, although it is recommended to do so). Nevertheless, Atemzeichen && zäsuren still needs the double ampersand because the source string contains a mnemonic.
Important: If the source string doesn't contain a mnemonic then you must not use &&
in the translation (use &
instead). If you try to use &&
in this situation then both &
characters will be visible in the UI.
Testing
- Manual testing
- Automatic testing
Translation
Compilation
- Set up developer environment
- Install Qt and Qt Creator
- Get MuseScore's source code
- Install dependencies
- Compile on the command line
- Compile in Qt Creator
Beyond compiling
Misc. development
Architecture general
- Architecture overview
- AppShell
- Modularity
- Interact workflow
- Channels and Notifications
- Settings and Configuration
- Error handling
- Launcher and Interactive
- Keyboard Navigation
Audio
Engraving
- Style settings
- Working with style files
- Style parameter changes for 4.0
- Style parameter changes for 4.1
- Style parameter changes for 4.2
- Style parameter changes for 4.3
- Style parameter changes for 4.4
Extensions
- Extensions overview
- Manifest
- Forms
- Macros
- Api
- Legacy plugin API
Google Summer of Code
References