[IMP] base: Improvements in views of Administration-> Translations.
bzr revid: uco@tinyerp.com-20100826071633-3flcycx3eqd43v2c
This commit is contained in:
parent
8ec99b95d5
commit
8593f3f856
|
@ -1392,12 +1392,20 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Translations">
|
||||
<field name="lang"/>
|
||||
<field name="type"/>
|
||||
<field name="name"/>
|
||||
<field name="res_id"/>
|
||||
<field name="type"/>
|
||||
<field name="lang"/>
|
||||
<field name="src"/>
|
||||
<field name="value"/>
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Source Term" colspan="2"/>
|
||||
<field name="src" nolabel="1" height="400"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Tranlsation Term" colspan="2"/>
|
||||
<field name="value" nolabel="1" height="400"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
<form col="3" string="Export language">
|
||||
<notebook>
|
||||
<page string="Export Data">
|
||||
<group col="2" fill="0" states="choose">
|
||||
<group col="2" colspan="4" fill="0" states="choose">
|
||||
<separator colspan="2" string="Export translation file"/>
|
||||
<field name="lang" width="300"/>
|
||||
<field name="lang" required="1"/>
|
||||
<field name="format" required="1"/>
|
||||
<field height="200" name="modules" width="500"/>
|
||||
<field height="200" name="modules" nolabel="1" colspan="4"/>
|
||||
<field invisible="1" name="state"/>
|
||||
</group>
|
||||
<group col="1" fill="0" states="get">
|
||||
|
@ -56,7 +56,7 @@
|
|||
</notebook>
|
||||
|
||||
<group col="2" colspan="3" fill="0">
|
||||
<button icon="gtk-cancel" name="act_cancel" special="cancel" states="choose" string="Cancel" type="object"/>
|
||||
<button icon="gtk-cancel" name="act_cancel" special="cancel" states="choose" string="Close" type="object"/>
|
||||
<button icon="gtk-ok" name="act_getfile" states="choose" string="Get file" type="object"/>
|
||||
<button icon="gtk-close" name="act_destroy" special="cancel" states="get" string="Close" type="object"/>
|
||||
</group>
|
||||
|
@ -86,14 +86,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form col="3" string="Update Translations">
|
||||
<image name="gtk-dialog-info"/>
|
||||
<group col="2" fill="0" height="500">
|
||||
<field name="lang" width="300"/>
|
||||
</group>
|
||||
<field name="lang"/>
|
||||
<label align="0.0" colspan="4" string="This wizard will detect new terms in the application so that you can update them manually."/>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4" fill="0">
|
||||
<button icon="gtk-cancel" name="act_cancel" special="cancel" string="Cancel" type="object"/>
|
||||
<button icon="gtk-cancel" name="act_cancel" special="cancel" string="Close" type="object"/>
|
||||
<button icon="gtk-ok" name="act_update" string="Update" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
|
|
|
@ -27,18 +27,23 @@ from tempfile import TemporaryFile
|
|||
|
||||
view_form="""<?xml version="1.0"?>
|
||||
<form string="Import language">
|
||||
<image name="gtk-dialog-info" colspan="2"/>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Import New Language" colspan="4"/>
|
||||
<field name="name" width="200"/>
|
||||
<field name="code"/>
|
||||
<field name="data" colspan="4"/>
|
||||
<label string="You have to import a .CSV file which is encoded in UTF-8.\n
|
||||
Please check that the first line of your file is one of the following:" colspan="4" align="0.0"/>
|
||||
<label string="type,name,res_id,src,value" colspan="4"/>
|
||||
<label string="module,type,name,res_id,src,value" colspan="4"/>
|
||||
<label string="You can also import .po files." colspan="4" align="0.0"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Import Data">
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Import New Language" colspan="4"/>
|
||||
<field name="name" width="200"/>
|
||||
<field name="code"/>
|
||||
<field name="data" colspan="4"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Help">
|
||||
<label string="You have to import a .CSV file which is encoded in UTF-8.\n
|
||||
Please check that the first line of your file is one of the following:" colspan="4" align="0.0"/>
|
||||
<label string="type,name,res_id,src,value" colspan="4"/>
|
||||
<label string="module,type,name,res_id,src,value" colspan="4"/>
|
||||
<label string="You can also import .po files." colspan="4" align="0.0"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>"""
|
||||
|
||||
fields_form={
|
||||
|
@ -69,7 +74,7 @@ class wizard_import_lang(wizard.interface):
|
|||
'actions': [],
|
||||
'result': {'type': 'form', 'arch': view_form, 'fields': fields_form,
|
||||
'state':[
|
||||
('end', 'Cancel', 'gtk-cancel'),
|
||||
('end', 'Close', 'gtk-cancel'),
|
||||
('finish', 'Ok', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
|
|
|
@ -34,10 +34,8 @@ view_form_end = """<?xml version="1.0"?>
|
|||
|
||||
view_form = """<?xml version="1.0"?>
|
||||
<form string="System Upgrade">
|
||||
<image name="gtk-dialog-info" colspan="2"/>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="System Upgrade" colspan="4"/>
|
||||
<label align="0.0" string="Choose a language to install:" colspan="4"/>
|
||||
<field name="lang" colspan="4" required="1"/>
|
||||
<label align="0.0" string="Note that this operation may take a few minutes." colspan="4"/>
|
||||
</group>
|
||||
|
@ -55,6 +53,7 @@ class wizard_lang_install(wizard.interface):
|
|||
|
||||
fields_form = {
|
||||
'lang': {'string':'Language', 'type':'selection', 'selection':tools.scan_languages(),
|
||||
'help': 'Choose a language to install.',
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -63,7 +62,7 @@ class wizard_lang_install(wizard.interface):
|
|||
'actions': [],
|
||||
'result': {'type': 'form', 'arch': view_form, 'fields': fields_form,
|
||||
'state': [
|
||||
('end', 'Cancel', 'gtk-cancel'),
|
||||
('end', 'Close', 'gtk-cancel'),
|
||||
('start', 'Start installation', 'gtk-ok', True)
|
||||
]
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
<field name="direction"/>
|
||||
<field name="translatable"/>
|
||||
<field name="active"/>
|
||||
<button name="%(base.action_wizard_update_translations)d"
|
||||
string="Update Terms" type="action" icon="gtk-ok" help="Update Languague Terms"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -98,13 +100,27 @@
|
|||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="res_lang_search" model="ir.ui.view">
|
||||
<field name="name">res.lang.search</field>
|
||||
<field name="model">res.lang</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Languages">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="iso_code"/>
|
||||
<field name="direction"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="res_lang_act_window" model="ir.actions.act_window">
|
||||
<field name="name">Languages</field>
|
||||
<field name="res_model">res.lang</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{'active_test': False}</field>
|
||||
<field name="search_view_id" ref="res_lang_search"/>
|
||||
</record>
|
||||
<menuitem action="res_lang_act_window" id="menu_res_lang_act_window" parent="base.menu_translation_app"/>
|
||||
<menuitem action="res_lang_act_window" id="menu_res_lang_act_window" parent="menu_translation"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue