fixed bug in language file that corrupts files on language update, thanks kverdecia2

This commit is contained in:
mdipierro
2012-09-01 22:32:12 -05:00
parent 918d3bd6df
commit a558af3b09
5 changed files with 11 additions and 6 deletions
+1
View File
@@ -23,6 +23,7 @@
- Support for Google App Engine projections, thanks Christian
- Field(... 'upload', default=path) now accepts a path to a local file as default value, if user does not upload a file. Relative path looks inside current application folder, thanks Marin
- executesql(...,fields=,columns=) allows parsing of results in Rows, thanks Anthony
- Rows.find(lambda row: bool(), limitby=(0,1))
### Auth improvements
+1 -1
View File
@@ -1 +1 @@
Version 2.0.5 (2012-09-01 07:01:32) stable
Version 2.0.5 (2012-09-01 22:32:08) stable
+3
View File
@@ -70,7 +70,9 @@
'inspect attributes': 'inspect attributes',
'Install': 'Install',
'Installed applications': 'Installed applications',
'invalid password.': 'invalid password.',
'Key bindings': 'Key bindings',
'Language files (static strings) updated': 'Language files (static strings) updated',
'languages': 'languages',
'Languages': 'Languages',
'Last saved on:': 'Last saved on:',
@@ -107,6 +109,7 @@
'Save via Ajax': 'Save via Ajax',
'Saved file hash:': 'Saved file hash:',
'session': 'session',
'session expired': 'session expired',
'shell': 'shell',
'Site': 'Site',
'Start wizard': 'Start wizard',
+1 -1
View File
@@ -3584,7 +3584,7 @@ INGRES_SEQNAME='ii***lineitemsequence' # NOTE invalid database object name
# to be a delimited identifier)
class IngresAdapter(BaseAdapter):
drivers = ('ingredbi',)
drivers = ('ingresdbi',)
types = {
'boolean': 'CHAR(1)',
+5 -4
View File
@@ -800,8 +800,8 @@ def findT(path, language='en'):
"""
must be run by the admin app
"""
filename = ospath.join(path, 'languages', language + '.py')
sentences = read_dict(filename)
lang_file = ospath.join(path, 'languages', language + '.py')
sentences = read_dict(lang_file)
mp = ospath.join(path, 'models')
cp = ospath.join(path, 'controllers')
vp = ospath.join(path, 'views')
@@ -830,8 +830,9 @@ def findT(path, language='en'):
'en' if language in ('default', 'en') else language)
if not '!langname!' in sentences:
sentences['!langname!'] = (
'English' if language in ('default', 'en') else sentences['!langcode!'])
write_dict(filename, sentences)
'English' if language in ('default', 'en')
else sentences['!langcode!'])
write_dict(lang_file, sentences)
### important to allow safe session.flash=T(....)
def lazyT_unpickle(data):