mikehadlow / gtr-cof

Interactive music theory dashboard for guitarists. http://guitardashboard.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide Do Re Mi Fa So La Ti Do note names

mikehadlow opened this issue · comments

From @jm_fayard (twitter)
Could you add a settings to display the notes as Do Re Mi Fa So La Ti Do?
Yes C=DO, C#=DO#, Cb=DOb
For B, we actually call it SI (not Ti) in France/Italy/Spain

commented

As per my other bug #22 , we could have a parameter that calls a function based on the current displayed value of the note. Like, if you are in Italian, you call translate(language, note) that in turn calls a function toItalian(note) that receives "C #" and then decides how to do the translation.

For Italian, for example, it would just be a matter of getting the first letter and doing a lookup: "C" -> "Do" and then adding whatever follows the space " #", so you get "Do #" (and maybe removing the space if you have a G, because Sol is long enough). For German, the translator could be a bit smarter and make "C #" into whatever they call it (they have a special name, my daughter's books are in German and it's not just C#). By using a function, we can do more than a lookup if it is needed. And we only need this done when rendering to d3, not in the internal logic.

So it would be a matter of having a "language" parameter that goes into each object, and changing the renderers to use the results of translate().

I'm very sorry, but I've decided that internationalization of GD is too big a task for me to do properly, so I'm going to keep it as an English only resource. Please feel free to fork other language versions.

I'm very sorry, but I've decided that internationalization of GD is too big a task for me to do properly, so I'm going to keep it as an English only resource. Please feel free to fork other language versions.

I think I will analyze internationalization requirements and send a PR. I am expecting some spare time to work on this next weeks!