Skip to content

MuseScore 本体翻訳コンテキスト一覧

プラグインから qsTranslate("コンテキスト名", "原文") で MuseScore 本体の翻訳を再利用するとき、第 1 引数に指定する コンテキスト名の一覧です。

関連: 国際化開発ガイド / 一次資料 docs/old_docs/i18n.md

出典: musescore/MuseScoreshare/locale/musescore_en.ts および instruments_en.ts(MuseScore Studio 5.0 系ソース時点)。
MuseScore のバージョンによってコンテキストの追加・改名・統廃合があり得ます。確実に使う文言は、同梱の .ts または Transifex で原文とコンテキストを確認してください。


1. 使い方

qml
// 音名(本体 global コンテキスト)
qsTranslate("global", "C♯")

// ダイアログ定番(同梱プラグインで多用)
qsTranslate("PrefsDialogBase", "Apply")
qsTranslate("PrefsDialogBase", "Cancel")

注意:

  • 原文(英語ソース文字列)は本体と一字一句一致させる必要があります。違うと翻訳されません。
  • コンテキスト名も本体と一致させる必要があります。
  • コンテキストはリリース間で変わることがあるため、重要な UI は独自 qsTr との併用も検討してください。

2. プラグインで特に使いやすいコンテキスト

コンテキスト向いている用途原文の例(英語)
globalOK/Cancel/Close、一般語、音名など"OK", "Cancel", "Close", "C", "C♯"
PrefsDialogBase設定ダイアログの Apply/Cancel 等(同梱プラグインで使用)"Apply", "Cancel", "Save", "Reset", "Quit"
actionメニュー・コマンド名"Quit", "Full screen" など(& 付き表記に注意)
appshellホーム/Plugins などシェル周り"Plugins", "Scores", "Home menu"
preferences設定関連の語"Audio", "Reset to default"
notation記譜・編集 UI"Capo", "History"
paletteパレット関連"Custom", "Create"
playback再生・ミキサー"Mute", "Solo", "Measure", "Beat"
projectスコア/プロジェクト"Title", "Composer", "Untitled score"
propertiespanelプロパティパネル"Color", "Direction", "Up", "Down"
engraving記譜一般"Score", "Articulation"
engraving/sym記号のユーザー向け名称(多数の記号名)
engraving/dynamictype強弱記号名"p (piano)", "f (forte)"
engraving/cleftype音部記号名"Treble clef", "Bass clef"
engraving/instruments楽器名(instruments_*.ts楽器カタログの名称
engraving/instruments/family楽器ファミリー
engraving/instruments/group楽器グループ
SelectDialog選択ダイアログ"Select", "Same staff"
TransposeDialogBase移調ダイアログ"Transpose"
MeasurePropertiesBase小節プロパティ"Measure properties", "Visible"
PageSettingsBaseページ設定"Page settings", "Portrait"
EditStyleBaseスタイル設定"Style", "Notes", "Rests"
shortcutsショートカット UI"None"
instruments楽器追加 UI"Select instrument", "Family"

PrefsDialogBasemusescore_en.ts のコンテキスト一覧には含まれないことがありますが、同梱の tuning / intervals などレガシー QML プラグインで実際に使われており、実行時に本体側の訳が解決される前提の書き方です。動作は対象の MuseScore 4.x で確認してください。

音名の例(global

同梱 note_names と同様:

qml
qsTranslate("global", "C")
qsTranslate("global", "C♯")
qsTranslate("global", "D♭")
// … F♭♭♭ 〜 B♯♯♯ など

ボタン類の例

qml
FlatButton {
    text: qsTranslate("PrefsDialogBase", "Apply")
    accentButton: true
}
FlatButton {
    text: qsTranslate("PrefsDialogBase", "Cancel")
    onClicked: quit()
}
FlatButton {
    text: qsTranslate("global", "Close")
    onClicked: quit()
}

3. コンテキストの探し方

  1. 本ページの一覧(§4)で候補を絞る
  2. share/locale/musescore_ja.ts(または musescore_en.ts)を開き、<name>コンテキスト</name> と前後の <source> を確認する
  3. プラグインではその <source> と同じ文字列qsTranslate の第 2 引数に渡す
  4. MuseScore の表示言語を切り替えて、訳が出ることを確認する

一覧の再生成(メンテ用):

powershell
python tools/i18n/extract-musescore-contexts.py

4. 全コンテキスト一覧

musescore_en.tsinstruments_en.ts から抽出したコンテキストです。文言数は英語カタログのおおよその <message> 数です。

コンテキスト名おおよその文言数(en)
action778
AlignSelect11
appshell47
appshell/about12
appshell/gettingstarted17
appshell/menu/add9
appshell/menu/add/chordandfret1
appshell/menu/diagnostics10
appshell/menu/edit1
appshell/menu/file4
appshell/menu/format2
appshell/menu/help1
appshell/menu/plugins1
appshell/menu/tools4
appshell/menu/view4
appshell/preferences2
appshell/welcome16
braille/notation3
braille/view3
BreaksDialog5
cloud3
CustomizeKitDialog27
debugOption1
EditPitchBase26
EditStaffBase93
EditStaffType57
EditStringDataBase6
EditStyleBase504
engraving331
engraving/bagpipeembellishment160
engraving/brackettype6
engraving/cleftype37
engraving/drumset65
engraving/dynamictype33
engraving/gradualtempochangetype11
engraving/hairpintype5
engraving/instruments2932
engraving/instruments/family120
engraving/instruments/genre11
engraving/instruments/group12
engraving/layoutbreaktype4
engraving/noteheadgroup74
engraving/noteheadscheme9
engraving/noteheadtype4
engraving/ottavatype6
engraving/playtechtype23
engraving/propertyName382
engraving/scoreorder13
engraving/slurstyletype5
engraving/spacertype3
engraving/staffgroup3
engraving/sym441
engraving/timesig5
engraving/tremolotype9
engraving/trilltype4
engraving/tripletfeel7
engraving/vibratotype5
extensions1
FontStyleSelect4
global74
iex_audio1
iex_capella2
iex_guitarpro3
iex_mei1
iex_midi39
iex_musicxml11
importexport/mnx3
inspector4
instruments17
KeyEdit4
layoutpanel29
layoutpanel/instrumentsettingspopup11
layoutpanel/staffsettingspopup11
MasterPalette1
MeasurePropertiesBase31
musesounds15
notation366
notation/add-remove-system-breaks1
notation/editstaff1
notation/editstringdata3
notation/editstyle40
notation/editstyle/accidentals7
notation/editstyle/barlines3
notation/editstyle/bends21
notation/editstyle/chordsymbols42
notation/editstyle/hammeronpulloff23
notation/editstyle/instrumentnames42
notation/editstyle/repeatplaycount6
notation/editstyle/slursandties16
notation/editstyle/stavesharing2
notation/editstyle/timesignatures46
notation/editstyle/tupletCentering3
notation/editstyle/voltas41
notation/measureproperties3
notation/percussion28
notation/staffpartproperties4
notation/stafftextproperties2
notation/staffvisibilitypopup7
notation/timeline20
notation/undohistory1
NoteGroups9
noteInputMethod9
OffsetSelect5
PageSettingsBase22
palette225
palette/unicodeRanges303
playback112
preferences186
preferences/score3
project110
project/cloud16
project/export94
project/migration10
project/newscore64
project/properties7
project/save61
project/share6
project/template41
project/templatecategory8
propertiespanel599
publish1
RealizeHarmonyDialogBase5
SelectDialog15
SelectNoteDialog20
shortcuts8
SpecialCharactersDialog1
StaffTextPropertiesDialog6
staveSharingTest3
SymbolDialogBase5
systemBrackets2
TimeDialogBase13
TimeSigProperties5
TransposeDialogBase66
TupletDialog10
ui3
undoableAction220
VoicingSelect15
workspace1

5. 参考

内容参照
国際化の手順国際化開発ガイド
翻訳コンパイル自動化翻訳コンパイル自動化
旧 i18n 解説docs/old_docs/i18n.md
Transifex(MuseScore)app.transifex.com/musescore/musescore