Commit 3108cf1c341424724a2e754f4517de4c114a6cf5
1 parent
16623c5b
Exists in
master
and in
68 other branches
ENH: SplashScreen reffer used language
Showing
1 changed file
with
9 additions
and
2 deletions
Show diff stats
invesalius/invesalius.py
... | ... | @@ -68,9 +68,16 @@ class SplashScreen(wx.SplashScreen): |
68 | 68 | |
69 | 69 | else: |
70 | 70 | _ = i18n.InstallLanguage(lang) |
71 | - | |
72 | 71 | |
73 | - bmp = wx.Image("../icons/splash_en.png").ConvertToBitmap() | |
72 | + if (lang.startswith('pt')): #Necessy, pt noted as pt_BR | |
73 | + icon_file = "splash_pt.png" | |
74 | + else: | |
75 | + icon_file = "splash_" + lang + ".png" | |
76 | + | |
77 | + path = os.path.join("..","icons", icon_file) | |
78 | + | |
79 | + bmp = wx.Image(path).ConvertToBitmap() | |
80 | + | |
74 | 81 | wx.SplashScreen.__init__(self, bitmap=bmp, |
75 | 82 | splashStyle=wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, |
76 | 83 | milliseconds=1500, id=-1, parent=None) | ... | ... |