better translation interface, thanks Daniel González Zaballos

This commit is contained in:
Massimo DiPierro
2012-05-10 16:30:37 -05:00
parent c9570aab55
commit 323c8ba98e
3 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.7 (2012-05-10 15:12:10) dev
Version 1.99.7 (2012-05-10 16:30:33) dev
@@ -6,12 +6,17 @@ function delkey(id) {
jQuery('#'+id+' TEXTAREA').val(String.fromCharCode(127));
return false;
}
function hideShowTranslated(){
jQuery(".translated").closest("p").toggle();
}
</script>
{{block sectionclass}}edit_language{{end}}
<h2>{{=T('Editing Language file')}} "{{=filename}}"</h2>
<a class="button" href="#" onclick="hideShowTranslated(this);">
<span>{{=T('Hide/Show Translated strings')}}</span>
</a>
<div class="languageform">
{{=form}}
</div>
+2 -1
View File
@@ -308,8 +308,9 @@ def findT(path, language='en-us'):
mp = os.path.join(path, 'models')
cp = os.path.join(path, 'controllers')
vp = os.path.join(path, 'views')
mop = os.path.join(path, 'modules')
for file in listdir(mp, '.+\.py', 0) + listdir(cp, '.+\.py', 0)\
+ listdir(vp, '.+\.html', 0):
+ listdir(vp, '.+\.html', 0) + listdir(mop, '.+\.py', 0):
fp = portalocker.LockedFile(file, 'r')
data = fp.read()
fp.close()