[shared] Added utils::flipDict allowing to flip keys<->values of a dict. [gen] file.py: added missing i18n labels. [gen] Added css style for rendering nice tables within the message popup.
This commit is contained in:
parent
ffb8bed189
commit
a905aaa139
|
@ -327,20 +327,20 @@ class File(Field):
|
|||
checked=":value and 'checked' or None"
|
||||
name=":'%s_delete' % name" id=":'%s_nochange' % name"
|
||||
onclick=":'document.getElementById(%s).disabled=true' % fName"/>
|
||||
<label lfor=":'%s_nochange' % name">Keep the file unchanged</label><br/>
|
||||
<label lfor=":'%s_nochange' % name">:_('keep_file')</label><br/>
|
||||
<!-- Delete the file. -->
|
||||
<x if="not field.required">
|
||||
<input type="radio" value="delete"
|
||||
name=":'%s_delete' % name" id=":'%s_delete' % name"
|
||||
onclick=":'document.getElementById(%s).disabled=true' % fName"/>
|
||||
<label lfor=":'%s_delete' % name">Delete the file</label><br/>
|
||||
<label lfor=":'%s_delete' % name">:_('delete_file')</label><br/>
|
||||
</x>
|
||||
<!-- Replace with a new file. -->
|
||||
<input type="radio" value=""
|
||||
checked=":not value and 'checked' or None"
|
||||
name=":'%s_delete' % name" id=":'%s_upload' % name"
|
||||
onclick=":'document.getElementById(%s).disabled=false' % fName"/>
|
||||
<label lfor=":'%s_upload' % name">Replace it with a new file</label><br/>
|
||||
<label lfor=":'%s_upload' % name">:_('replace_file')</label><br/>
|
||||
</x>
|
||||
<!-- The upload field. -->
|
||||
<input type="file" name=":'%s_file' % name" id=":'%s_file' % name"
|
||||
|
|
|
@ -235,6 +235,18 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Keep the file unchanged"
|
||||
msgid "keep_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Delete the file"
|
||||
msgid "delete_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Replace it with a new file"
|
||||
msgid "replace_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr ""
|
||||
|
|
12
gen/tr/ar.po
12
gen/tr/ar.po
|
@ -235,6 +235,18 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Keep the file unchanged"
|
||||
msgid "keep_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Delete the file"
|
||||
msgid "delete_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Replace it with a new file"
|
||||
msgid "replace_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr ""
|
||||
|
|
12
gen/tr/de.po
12
gen/tr/de.po
|
@ -235,6 +235,18 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Keep the file unchanged"
|
||||
msgid "keep_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Delete the file"
|
||||
msgid "delete_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Replace it with a new file"
|
||||
msgid "replace_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr ""
|
||||
|
|
12
gen/tr/en.po
12
gen/tr/en.po
|
@ -236,6 +236,18 @@ msgstr "(Un)check everything"
|
|||
msgid "page_unlock"
|
||||
msgstr "Unlock"
|
||||
|
||||
#. Default: "Keep the file unchanged"
|
||||
msgid "keep_file"
|
||||
msgstr "Keep the file unchanged"
|
||||
|
||||
#. Default: "Delete the file"
|
||||
msgid "delete_file"
|
||||
msgstr "Delete the file"
|
||||
|
||||
#. Default: "Replace it with a new file"
|
||||
msgid "replace_file"
|
||||
msgstr "Replace it with a new file"
|
||||
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr "Are you sure?"
|
||||
|
|
12
gen/tr/es.po
12
gen/tr/es.po
|
@ -235,6 +235,18 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Keep the file unchanged"
|
||||
msgid "keep_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Delete the file"
|
||||
msgid "delete_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Replace it with a new file"
|
||||
msgid "replace_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr "¿Está seguro?"
|
||||
|
|
12
gen/tr/fr.po
12
gen/tr/fr.po
|
@ -236,6 +236,18 @@ msgstr "Tout (dé)sélectionner"
|
|||
msgid "page_unlock"
|
||||
msgstr "Déverrouiller"
|
||||
|
||||
#. Default: "Keep the file unchanged"
|
||||
msgid "keep_file"
|
||||
msgstr "Conserver le fichier"
|
||||
|
||||
#. Default: "Delete the file"
|
||||
msgid "delete_file"
|
||||
msgstr "Supprimer le fichier"
|
||||
|
||||
#. Default: "Replace it with a new file"
|
||||
msgid "replace_file"
|
||||
msgstr "Le remplacer par un autre"
|
||||
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr "Êtes-vous sûr?"
|
||||
|
|
12
gen/tr/it.po
12
gen/tr/it.po
|
@ -235,6 +235,18 @@ msgstr ""
|
|||
msgid "page_unlock"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Keep the file unchanged"
|
||||
msgid "keep_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Delete the file"
|
||||
msgid "delete_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Replace it with a new file"
|
||||
msgid "replace_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr "È sicuro?"
|
||||
|
|
12
gen/tr/nl.po
12
gen/tr/nl.po
|
@ -235,6 +235,18 @@ msgstr "Alles (de)selecteren"
|
|||
msgid "page_unlock"
|
||||
msgstr "Ontgrendelen"
|
||||
|
||||
#. Default: "Keep the file unchanged"
|
||||
msgid "keep_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Delete the file"
|
||||
msgid "delete_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Replace it with a new file"
|
||||
msgid "replace_file"
|
||||
msgstr ""
|
||||
|
||||
#. Default: "Are you sure?"
|
||||
msgid "action_confirm"
|
||||
msgstr "Bent u zeker?"
|
||||
|
|
|
@ -120,6 +120,12 @@ td.search { padding-top: 8px }
|
|||
.grid th { font-style: italic; font-weight: normal;
|
||||
border-bottom: 5px solid #fdfdfd; padding: 3px 5px 0 5px }
|
||||
.grid td { padding: 3px 3px 0 3px }
|
||||
.msgTable { margin: 6px 0; width: 100%; font-size: 93% }
|
||||
.msgTable tr { vertical-align: top }
|
||||
.msgTable td, .msgTable th { border: 1px solid grey; color: grey;
|
||||
padding: 0px 5px; text-align: left }
|
||||
.msgTable th { background-color: #f0e3b8; font-style: italic;
|
||||
font-weight: normal }
|
||||
.cellGap { padding-right: 0.4em }
|
||||
.cellDashed { border: 1px dashed grey !important }
|
||||
.noStyle { border: 0 !important; padding: 0 !important; margin: 0 !important }
|
||||
|
|
|
@ -381,7 +381,7 @@ class ImageImporter(DocImporter):
|
|||
self.importPath = newImportPath
|
||||
imagePath = os.path.splitext(imagePath)[0] + '.png'
|
||||
self.format = 'png'
|
||||
# Retrieve image size from self.size.
|
||||
# Retrieve image size from self.size
|
||||
width = height = None
|
||||
if self.size and (self.sizeUnit != 'pc'):
|
||||
width, height = self.size
|
||||
|
|
|
@ -169,6 +169,14 @@ def splitList(l, sub):
|
|||
res[-1].append(elem)
|
||||
return res
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
def flipDict(d):
|
||||
'''Flips dict p_d: keys become values, values become keys. p_d is left
|
||||
untouched: a new, flipped, dict is returned.'''
|
||||
res = {}
|
||||
for k, v in d.iteritems(): res[v] = k
|
||||
return res
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
class Traceback:
|
||||
'''Dumps the last traceback into a string.'''
|
||||
|
|
Loading…
Reference in a new issue