Skip to content
Browse files

revert back to plain # and b in CPP files

but also make these strings translatable
  • Loading branch information...
1 parent 301fd36 commit 6d0266145b73749dba522f1b995bf62822f97507 @Jojo-Schmitz Jojo-Schmitz committed Feb 11, 2014
Showing with 78 additions and 10 deletions.
  1. +24 −2 awl/utils.cpp
  2. +26 −4 libmscore/utils.cpp
  3. +14 −2 mscore/editstaff.cpp
  4. +14 −2 mscore/editstringdata.cpp
View
26 awl/utils.cpp
@@ -21,10 +21,32 @@
#include "utils.h"
static const char* vall[] = {
- "c","c\u266f","d","d\u266f","e","f","f\u266f","g","g\u266f","a","a\u266f","b"
+ QT_TRANSLATE_NOOP("awlutils", "c"),
+ QT_TRANSLATE_NOOP("awlutils", "c#"),
+ QT_TRANSLATE_NOOP("awlutils", "d"),
+ QT_TRANSLATE_NOOP("awlutils", "d#"),
+ QT_TRANSLATE_NOOP("awlutils", "e"),
+ QT_TRANSLATE_NOOP("awlutils", "f"),
+ QT_TRANSLATE_NOOP("awlutils", "f#"),
+ QT_TRANSLATE_NOOP("awlutils", "g"),
+ QT_TRANSLATE_NOOP("awlutils", "g#"),
+ QT_TRANSLATE_NOOP("awlutils", "a"),
+ QT_TRANSLATE_NOOP("awlutils", "a#"),
+ QT_TRANSLATE_NOOP("awlutils", "b")
};
static const char* valu[] = {
- "C","C\u266f","D","D\u266f","E","F","F\u266f","G","G\u266f","A","A\u266f","B"
+ QT_TRANSLATE_NOOP("awlutils", "C"),
+ QT_TRANSLATE_NOOP("awlutils", "C#"),
+ QT_TRANSLATE_NOOP("awlutils", "D"),
+ QT_TRANSLATE_NOOP("awlutils", "D#"),
+ QT_TRANSLATE_NOOP("awlutils", "E"),
+ QT_TRANSLATE_NOOP("awlutils", "F"),
+ QT_TRANSLATE_NOOP("awlutils", "F#"),
+ QT_TRANSLATE_NOOP("awlutils", "G"),
+ QT_TRANSLATE_NOOP("awlutils", "G#"),
+ QT_TRANSLATE_NOOP("awlutils", "A"),
+ QT_TRANSLATE_NOOP("awlutils", "A#"),
+ QT_TRANSLATE_NOOP("awlutils", "B")
};
namespace Awl {
View
30 libmscore/utils.cpp
@@ -390,11 +390,33 @@ void selectStavesMessage()
}
static const char* vall[] = {
- "c","c\u266f","d","d\u266f","e","f","f\u266f","g","g\u266f","a","a\u266f","b"
- };
+ QT_TRANSLATE_NOOP("utils", "c"),
+ QT_TRANSLATE_NOOP("utils", "c#"),
+ QT_TRANSLATE_NOOP("utils", "d"),
+ QT_TRANSLATE_NOOP("utils", "d#"),
+ QT_TRANSLATE_NOOP("utils", "e"),
+ QT_TRANSLATE_NOOP("utils", "f"),
+ QT_TRANSLATE_NOOP("utils", "f#"),
+ QT_TRANSLATE_NOOP("utils", "g"),
+ QT_TRANSLATE_NOOP("utils", "g#"),
+ QT_TRANSLATE_NOOP("utils", "a"),
+ QT_TRANSLATE_NOOP("utils", "a#"),
+ QT_TRANSLATE_NOOP("utils", "b")
+ };
static const char* valu[] = {
- "C","C\u266f","D","D\u266f","E","F","F\u266f","G","G\u266f","A","A\u266f","B"
- };
+ QT_TRANSLATE_NOOP("utils", "C"),
+ QT_TRANSLATE_NOOP("utils", "C#"),
+ QT_TRANSLATE_NOOP("utils", "D"),
+ QT_TRANSLATE_NOOP("utils", "D#"),
+ QT_TRANSLATE_NOOP("utils", "E"),
+ QT_TRANSLATE_NOOP("utils", "F"),
+ QT_TRANSLATE_NOOP("utils", "F#"),
+ QT_TRANSLATE_NOOP("utils", "G"),
+ QT_TRANSLATE_NOOP("utils", "G#"),
+ QT_TRANSLATE_NOOP("utils", "A"),
+ QT_TRANSLATE_NOOP("utils", "A#"),
+ QT_TRANSLATE_NOOP("utils", "B")
+ };
/*!
* Returns the string representation of the given pitch.
View
16 mscore/editstaff.cpp
@@ -376,8 +376,20 @@ void EditStaff::editStringDataClicked()
// Converts a MIDI numeric pitch code to human-readable note name
//---------------------------------------------------------
-static char g_cNoteName[][8] =
-{"C", "C\u266f", "D", "E\u266d", "E", "F", "F\u266f", "G", "A\u266d", "A", "B\u266d", "B" };
+static const char* g_cNoteName[] = {
+ QT_TRANSLATE_NOOP("editstaff", "C"),
+ QT_TRANSLATE_NOOP("editstaff", "C#"),
+ QT_TRANSLATE_NOOP("editstaff", "D"),
+ QT_TRANSLATE_NOOP("editstaff", "Eb"),
+ QT_TRANSLATE_NOOP("editstaff", "E"),
+ QT_TRANSLATE_NOOP("editstaff", "F"),
+ QT_TRANSLATE_NOOP("editstaff", "F#"),
+ QT_TRANSLATE_NOOP("editstaff", "G"),
+ QT_TRANSLATE_NOOP("editstaff", "Ab"),
+ QT_TRANSLATE_NOOP("editstaff", "A"),
+ QT_TRANSLATE_NOOP("editstaff", "Bb"),
+ QT_TRANSLATE_NOOP("editstaff", "B")
+ };
QString EditStaff::midiCodeToStr(int midiCode)
{
View
16 mscore/editstringdata.cpp
@@ -191,8 +191,20 @@ void EditStringData::accept()
// Converts a MIDI numeric pitch code to human-readable note name
//---------------------------------------------------------
-static char g_cNoteName[][8] =
-{"C", "C\u266f", "D", "E\u266d", "E", "F", "F\u266f", "G", "A\u266d", "A", "B\u266d", "B" };
+static const char* g_cNoteName[] = {
+ QT_TRANSLATE_NOOP("editstringdata", "C"),
+ QT_TRANSLATE_NOOP("editstringdata", "C#"),
+ QT_TRANSLATE_NOOP("editstringdata", "D"),
+ QT_TRANSLATE_NOOP("editstringdata", "Eb"),
+ QT_TRANSLATE_NOOP("editstringdata", "E"),
+ QT_TRANSLATE_NOOP("editstringdata", "F"),
+ QT_TRANSLATE_NOOP("editstringdata", "F#"),
+ QT_TRANSLATE_NOOP("editstringdata", "G"),
+ QT_TRANSLATE_NOOP("editstringdata", "Ab"),
+ QT_TRANSLATE_NOOP("editstringdata", "A"),
+ QT_TRANSLATE_NOOP("editstringdata", "Bb"),
+ QT_TRANSLATE_NOOP("editstringdata", "B")
+ };
QString EditStringData::midiCodeToStr(int midiCode)
{

0 comments on commit 6d02661

Please sign in to comment.
Something went wrong with that request. Please try again.