Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change GUI Language #1506

Closed
federico-pepe opened this issue Dec 15, 2016 · 29 comments · Fixed by #2604
Closed

Change GUI Language #1506

federico-pepe opened this issue Dec 15, 2016 · 29 comments · Fixed by #2604

Comments

@federico-pepe
Copy link
Contributor

Is it possible to add a dropdown menu where I can choose the language of Sonic Pi?

@samaaron
Copy link
Collaborator

@federico-pepe Sonic Pi's GUI only supports one language - that of Sonic Pi itself - a DSL based on top of Ruby. Which other languages did you want support for?

@federico-pepe
Copy link
Contributor Author

Hi @samaaron I'm sorry. I meant translations. I completed the italian translation of the GUI months ago on Weblate but I'm still not able to select it in Sonic Pi. I was wondering when it'll be available.

@samaaron
Copy link
Collaborator

Ah, that makes a lot more sense.

This was something I suggested to @hzulla a while back when he started doing all the fab translation stuff. He said it wasn't typical. However, I still think it would be a nice feature.

For now, you just need to change your system language to Italian and reboot Sonic Pi - it should then appear with Italian translation :-)

@federico-pepe
Copy link
Contributor Author

Unfortunately the GUI language doesn't change if I change the system language (but the tutorials do).

@ghost
Copy link

ghost commented Aug 25, 2017

**He said it wasn't typical. ** really?
I am german but i have all my stuff setup in english, and it really really REALLY bugs me if an application assumes i want the gui to be in any other language then the one i use everything else in.

So i would be really really happy if i could change the language to the one i prefer or stop this "system is setup in <insert language here> but i choose to display the gui in some other language" nonsense.

@samaaron
Copy link
Collaborator

I'd like to see sonic pi have a language chooser at some point. If anyone would like to have a go at prototyping it, that would be ace.

@ghost
Copy link

ghost commented Aug 25, 2017

is there a config file one could use until a menu is implemented?

@mrdevis
Copy link

mrdevis commented Oct 3, 2017

+1 for a language scope per application

@mrdevis
Copy link

mrdevis commented Oct 3, 2017

ps, my workaround on OSX until now:
rename the language file in the app ::
right click -> open package
navigate to ./etc/doc/lang/

if you do not want german, than rename the german file:
something like "sonic-pi-tutorial-BOBO.po"
The app opens and does not find the german language file, then defaults to english.

Ugly, but it works (until the next update).
Cheers, Jeroen

@samaaron
Copy link
Collaborator

samaaron commented Oct 3, 2017

@mrdevis ha, nice one!

I'm unfortunately battling for funding right now, so features like this are sadly way down in my priority list. I was hoping that as Sonic Pi grew more popular, I'd get more financial support, help, but the inverse appears to be the case at the moment :-(

@mrdevis
Copy link

mrdevis commented Oct 3, 2017

just downloaded and it looks good. I come from SC, and I am investigating some new (easier) front ends. I will definitely have a deeper look into it... Thanks for all the work!!

@MichaPau
Copy link

For any reason I can't do that on my Windows7 machine. (Sonic Pi version 3.1)
Switching from French to English...

I renamed the [...]fr.po file in /etc/doc/lang/
I deleted the fr folder in /doc/generated/

but i still get the French tutorial...

I didn't find something else corresponding to any localization data

French is a wonderful language but on computers I really can't stand it...
(and unfortunately I can't change the system language - for Windows a professional licence would be needed)

As a workaround I open the tutorial external in the Atom Editor which has a Markdown preview mode...

@rdwebdesign
Copy link

I know this issue is old, but I don´t want to open a new one if this is still active.

I'm Brazilian and I'm using Sonic Pi on my Raspberry Pi. The system uses Brazilian Portuguese (pt_BR).
There's no pt_BR translation for Sonic Pi tutorial, but the program is using pt (Portugal Portuguese). The pt tutorial is horrible to read.

I want my Sonic Pi interface in English. Changing the system language works, but I do not want to use English in the whole system. It isn't practical.

I tried the renaming workaround (mrdevis). I renamed all pt and pt_BR language files I've found, but I didn't succeed (maybe I missed some translation files).

Is there any updates on this issue (languages/translations preferences)?

@rdwebdesign
Copy link

@federico-pepe, @samaaron

I've created a method to start Sonic Pi in a language (translation) other than the system language, on Raspberry Pi.
I know it's not a complete solution, but it's a fast workaround.

The solution can be found here (https://gist.github.com/rdwebdesign/9b98569a8ab52ea321688ad8d30fd85c). Just change de LANGUAGE code to whatever you need.

Note: I only use Sonic Pi on Raspberry Pi, so I don't know how to replicate this on Windows or Mac.

@SunderB
Copy link
Contributor

SunderB commented Jan 30, 2019

Hi,
@rdwebdesign That seems like good workaround. :) On Mac, the command would be similar I think; and maybe you could put it into a .sh file? On Windows, I'm not 100% sure. Maybe you could change the executable name to sonic-pi.exe, use a .sh file and run it from bash? Or maybe you could set the env variable separately in the command line, then execute sonic-pi.exe?

For a more permanent solution, I've tried to make a start on an option in the GUI to change the language: #2017. I've also rearranged some GUI code in the process. I hope this is a good start :)

@sschuberth
Copy link

I believe the problem is twofold: First of all Sonic Pi, at least on Windows, uses the wrong setting when determining the language to use for its GUI: On Windows, applications should not use the "system locale", but the "GUI language" to determine the default language for a GUI. See the somewhat related discussion (and the fix) in the KeepassXC project, which also uses Qt.

Secondly, it would be nice to be able to override the default language selection for the GUI with any of the supported languages / translations.

@samaaron
Copy link
Collaborator

@sschuberth thanks for shedding further light on this :-)

I would be very happy to consider pull requests that fix both of these issues...

@prankstrisse
Copy link

prankstrisse commented Sep 25, 2019

For starting Sonic Pi in English on Windows just create a *.bat file with the following contents:

@echo off
setx LANG "en_GB"
SET PI_PATH=C:\Program Files (x86)\Sonic Pi\app\gui\qt\release
start "" "%PI_PATH%\sonic-pi.exe" 
@echo on

Worked for me :)

@quetzalcoatl
Copy link

Also, it's good to know some locale codes! :)
-> https://stackoverflow.com/a/28357857/717732

@andiechu
Copy link

andiechu commented Oct 17, 2020

Same requirements here. Is there a solution for this problem on Mac OSX? It doesn't work to just change the names of the lang file in the package content.
The tutorials are not a problem because there are English tutorials on Sonic Pi's website. But part of the GUI is also translated, which creates more confusion, because the tutorials and most information online are in English, so if one use a translated version it is going to be harder to find the right solution online.


Edit:

Found the solution for Mac OS X. Go to your bash and run: LANG=en.UTF-8 /YOUR_APP_DIRECTORY/Sonic\ Pi.app/Contents/MacOS/Sonic\ Pi

@zkerriga
Copy link

Nothing was said about Linux systems above, so I inform you that on ArchLinux to change the language, just write export LANGUAGE=ru_RU.UTF-8 (for example for the Russian locale) before starting the program :)

I put this in a script with other settings specifically for ArchLinux.

@breakin
Copy link

breakin commented Feb 8, 2021

Just wanted to give a quick comment here! I am starting to learn Sonic PI so I can play around with it with my kid. He knows swedish and I know swedish/english. I want to be able to switch during a running session so he can get swedish menus but then I can get english tutorials when I'm checking stuff for him. Just wanted to give a use-case where having a dropdown or changing "live" might make sense! That being said it isn't that important (I'll teach him the few english words needed), just want to give some ideas for when it might make sense...!

@ethancrawford
Copy link
Collaborator

As can be seen from the notification just above, late last year a very helpful feature by @SunderB was merged to the dev branch for a dropdown language selector in Sonic Pi's preferences panel. (Here it is on macOS):
image

This language switcher does require an app restart to make a new language selection take effect. Is everyone happy for us to call this ticket done once the feature makes it to the next official release? 🙂

@sschuberth
Copy link

LGTM! 👍🏻

@federico-pepe
Copy link
Contributor Author

Awesome! 👍

@arphox
Copy link

arphox commented Dec 10, 2021

Language still cannot be changed in version "Sonic Pi v3.3.1 on Win" and AFAIK there is no easy way to change it (e.g. modifying a config file or so).
I am so disappointed that you enforce these community-made (so not professional) half-done translations on your users. I have no problem with translations, but can you just not force them on people? I just want to use the app in its original language.

@ethancrawford
Copy link
Collaborator

@arphox: I see your frustration - thank you for your feedback.

As with any other growing software project, there are always things here that can be improved.

Aside from Sam, (who relies much on the generosity of crowdfunding), Sonic Pi is, at heart, a project led by volunteers. We each have our own particular resources, skills and time availability. Who knows, if we'd had an abundance of such things, perhaps flexible language picking may have made it into the project sooner 🤷‍♂️

The important thing now is that the language picker shown above will be available in the next official version (v4.0) as soon as we are able to release it. (You can also get the change now if you so desire, by compiling your own build from source with the much improved build process, or if you are a Patreon supporter of Sam, downloading a beta version with the change in it).

There is also work being carried out to extend translation across all of the built-in documentation, not just the tutorial and UI. (This will not be ready for the next version, but the groundwork has been laid).

@FloraCanou
Copy link

Hope this one gets released soon! But basically the app shouldn't try to detect the system language but instead let the user select upon installation.

@samaaron
Copy link
Collaborator

Closing as this was part of the recent v4 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.