File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,10 @@ try:
114114 libintl .bindtextdomain (locale_domain , locale_dir )
115115 libintl .bind_textdomain_codeset (locale_domain , 'UTF-8' )
116116 del libintl
117+ elif sys .platform == 'darwin' :
118+ gettext .install (locale_domain , locale_dir , names = ["ngettext" ])
119+ gettext .textdomain (locale_domain )
120+ gettext .bindtextdomain (locale_domain , locale_dir )
117121 else :
118122 locale .bindtextdomain (locale_domain , locale_dir )
119123 locale .bind_textdomain_codeset (locale_domain , 'UTF-8' )
Original file line number Diff line number Diff line change 33import sys
44import os
55import subprocess
6+ import locale
67
78def getScriptPath ():
89 return os .path .dirname (os .path .realpath (sys .argv [0 ]))
@@ -27,12 +28,20 @@ for arg in sys.argv[1:]:
2728MELDPATH = os .path .join (getScriptPath (), "Meld-bin" )
2829APPPATH = fix_abspath (os .path .join (getScriptPath (), '..' ))
2930
31+ LANG = "C"
32+ try :
33+ LANG = "." .join (locale .getdefaultlocale ()[0 ], "UTF-8" )
34+ except :
35+ pass
36+
3037environment = dict (os .environ , ** {
3138 "DYLD_LIBRARY_PATH" : ":" .join ([
3239 os .path .join (APPPATH , "Resources" , "lib" ),
3340 os .path .join (APPPATH , "Frameworks" )
3441 ]),
35- "LANG" : "C"
42+ "LANG" : LANG ,
43+ "LC_ALL" : LANG ,
44+ "LC_CTYPE" : LANG
3645})
3746
3847status = subprocess .call ([MELDPATH ] + arglist , env = environment )
You can’t perform that action at this time.
0 commit comments