projects
/
iramuteq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c5d2a5a
)
langage
author
pierre
<ratinaud@univ-tlse2.fr>
Tue, 18 Nov 2014 12:59:04 +0000
(13:59 +0100)
committer
pierre
<ratinaud@univ-tlse2.fr>
Tue, 18 Nov 2014 12:59:04 +0000
(13:59 +0100)
chemins.py
patch
|
blob
|
history
iramuteq.py
patch
|
blob
|
history
diff --git
a/chemins.py
b/chemins.py
index
3217a4f
..
f43969c
100644
(file)
--- a/
chemins.py
+++ b/
chemins.py
@@
-159,6
+159,7
@@
def ConstructGlobalPath(AppliPath):
ConfigPath = os.path.join(AppliPath, 'configuration')
DictConfigPath = {
'global': os.path.join(ConfigPath, 'global.cfg'),
ConfigPath = os.path.join(AppliPath, 'configuration')
DictConfigPath = {
'global': os.path.join(ConfigPath, 'global.cfg'),
+ 'preferences': os.path.join(ConfigPath, 'iramuteq.cfg'),
}
return DictConfigPath
}
return DictConfigPath
diff --git
a/iramuteq.py
b/iramuteq.py
index
ccc28f8
..
1ce343d
100644
(file)
--- a/
iramuteq.py
+++ b/
iramuteq.py
@@
-113,6
+113,8
@@
ImagePath = os.path.join(AppliPath, 'images')
DictConfigPath = ConstructGlobalPath(AppliPath)
ConfigGlob = ConfigParser()
ConfigGlob.read(DictConfigPath['global'])
DictConfigPath = ConstructGlobalPath(AppliPath)
ConfigGlob = ConfigParser()
ConfigGlob.read(DictConfigPath['global'])
+DefaultConf = ConfigParser()
+DefaultConf.read(DictConfigPath['preferences'])
#repertoire de l'utilisateur
if os.getenv('HOME') != None:
user_home = os.getenv('HOME')
#repertoire de l'utilisateur
if os.getenv('HOME') != None:
user_home = os.getenv('HOME')
@@
-191,10
+193,9
@@
class IraFrame(wx.Frame):
self.preslangue = {}
for langue in code_langues :
self.preslangue[langue] = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=[code_langues[langue]])
self.preslangue = {}
for langue in code_langues :
self.preslangue[langue] = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=[code_langues[langue]])
-
+ self.setlangue()
#self.presLan_fr = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['fr_FR'])
#self.presLan_en = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['en'])
#self.presLan_fr = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['fr_FR'])
#self.presLan_en = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['en'])
- self.setlangue()
# tell FrameManager to manage this frame
#self._mgr = wx.aui.AuiManager()
self._mgr = aui.AuiManager()
# tell FrameManager to manage this frame
#self._mgr = wx.aui.AuiManager()
self._mgr = aui.AuiManager()
@@
-525,7
+526,10
@@
vous devez signaler le chemin de l'éxecutable de R dans les préférences."""
def setlangue(self) :
self.pref.read(self.ConfigPath['preferences'])
def setlangue(self) :
self.pref.read(self.ConfigPath['preferences'])
- guilangue = self.pref.get('iramuteq', 'guilanguage')
+ try :
+ guilangue = self.pref.get('iramuteq', 'guilanguage')
+ except :
+ guilangue = DefaultConf.get('iramuteq', 'guilanguage')
self.preslangue.get(guilangue, 'english').install()
def OnVerif(self, evt) :
self.preslangue.get(guilangue, 'english').install()
def OnVerif(self, evt) :