mutliple non-translatable items from menu and palettes
some non-translatable items, some just don't pick up the existing translations
- Menu->File->Info... all the labels
- Menu->Edit->Workspaces-> the terms "advanced", "basic" and "default"
- Palette->Grace Notes all the tooltips
- Palette->Clefs all the tooltips
- Palette->Key Signatures all the tooltips
- Palette->Arpeggios & Glissandi all the tooltips
- Palette->Brackets the tooltips "Brace" and "Square"
- Palette->Articulations all the tooltips
- Palette->Accidentals all the tooltips
- Palette->Note Heads all the tooltips
- Palette->Tremolo all the tooltips
- Palette->Bagpipe Embellishments all the tooltips (regardless of the fix in #23341: Tool tips for bagpipe embellishments' palette items are not translatable)
- Palette->Beam Properties all the tooltips
- Palette->Symbols all the tooltips
- all the above palette issues also in Menu->View->Master Palette
Comments
For what concerns the palettes, the problem seems to be the "context" field.
The tooltips in general are written by instruction at line 731 of mscore/palette.cpp
qApp->translate("Palette", cells[idx]->name.toUtf8())
so the context field is called "Palette". However, in the files downloaded from Transifex the context field for the "clefs", for example, is "MS::ClefInfo".
Actually, this is strange, since from line 29 of libmscore/clef.cpp
#define TR(a) QT_TRANSLATE_NOOP("clefTable", a)
the context field should have been "clefTable", which however would not give the expected results since it is different from "Palette" (i.e. the one actually used in palette.cpp).
Similar considerations holds for the other tooltips of the palette.
For example, in the file from Transifex:
- the context for grace notes is "action"
- the context for the keys is "MuseScore"
- the context for the time signatures is "TimeSigProperties"
... et cetera ...
The context for barlines in the palette is "Palette" and therefore their translations appear in the tolltips.
One of the problems involved in this bug is that it seems that each time the
TR(x)
function is defined as an alias forQT_TRANSLATE_NOOP
inside a#define
instruction, the corresponding context is not handled properly in the *.ts files of Transifex.A further example is the dropdown list of "Style" inside a "Text properties" (from a right-click on a text element): the context in the code is defined as "MuseScore" in a
#define
instruction, the translation is accessed correctly in a "MuseScore" context (line 51 of mscore/textstyle.cpp), but in the Transifex ts file the context is "Ms" and thus the translation does not appear.Is 'lupdate' working on the source files? If so, these ain't preprocessed, so the marcor replacement of TR() to QT_TRANSLATE_NOOP() hasn't taken place, hence lupdate simply doesn't see them
I wonder why those translations did work in 1.x then?!?
Qt issue?
Or has the (MuseScore) code changed that much in this respect?
ad 1. I guess these are read from the score file directly and as such not translatable at all?
ad 2. I found the string 'advanced' only in ...mscore/workspace.cpp, but in there I didn't find 'default' nor 'basic'.
I found the files "advanced.workspace" and "basic.workspace" in ...share/workspaces, but no "default.workspace", so it is a complete mystery to me where these strings stem from and how to get them translated (and whether at all)
the workspaces names in the menu are derived from the filenames, so not really translatable.
advanced workspace and basic.workspace are delivered together with the nightlies, default.workspace seems to be created on first use in the users' directory. They are xml files in a zipped container( just like .mxl files). Advanced and default seem to have been created once, before translation took place or with a partial translation and seem to have been saved in some translated form (the 'advanced' workspace contains German terms). They are (currently) not translatable, only the default workspace, which gets created on the fly, should pick the translated terms.
So that should explain the non-translated terms in the Palette, when using the basic and advanced workspace.
The terms in the menus and the master palette, as well as in the palette when using the default workspace remaining untranslated though seems to have a different cause. One way to 'fix' these seems to be to copy the new translation to overwrite the ones that come with the nightly build, for some reason, regardless being newer, they don't get picked up otherwise?!?
Regardless of 4f11576 the workspace names "Advanced" and "Basic" are not translated
@Jojo even after a factory -F reset?
Haven't tried that, but found a fix for it anyway. Needs QT_TR_NOOP() and initialization and qApp->translate() at use. See PR #1266
Revisiting the issues from #1 reveals that most are fixed. remaining:
So once the workspaces are fixed, I guess we can mark this fixed.
Fixed in 03a928098a
Automatically closed -- issue fixed for 2 weeks with no activity.