Package mcbase :: Package libs :: Package reportviewer :: Module tools
[hide private]
[frames] | no frames]

Source Code for Module mcbase.libs.reportviewer.tools

 1  # -*- coding: utf-8 -*- 
 2   
 3  ########################################################################## 
 4  # tools.py 
 5  # 
 6  # Grafiksel Rapor Tasarım Editörü Genel Araçlar 
 7  # 
 8  # (C) 2006 Likya Yazılım ve Bilişim Hizmetleri Ltd. Şti. 
 9  ########################################################################## 
10   
11  from PyQt4.QtCore import * 
12  from PyQt4.QtGui import * 
13   
14 -def tr(s):
15 ''' 16 UTF-8 str'yi unicode'a çevirir. 17 ''' 18 import lqtrans 19 20 if type(s) == unicode: 21 return s 22 23 s = str(s) 24 25 u = unicode(s, 'UTF-8', 'ignore') 26 27 translated = lqtrans.translations.get(u, {}).get('en', u) 28 29 return translated
30