Changes between Version 14 and Version 15 of DeveloperGuidelinesNewModule


Ignore:
Timestamp:
01/04/09 18:32:47 (13 years ago)
Author:
Fran Boon
Comment:

single/plural bad for Internationalisation!

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelinesNewModule

    v14 v15  
    3333To avoid namespace clashes, use the format: {{{db.module_table}}}
    3434
    35 e.g. if beilding a Vehicle Management System, create db.veh_vehicle:
     35e.g. if building a Vehicle Management System, create db.veh_vehicle:
    3636{{{
    3737module='veh'
    3838resource='vehicle'
    3939table=module+'_'+resource
    40 single=resource.capitalize()
    41 # NB May need manual fixing!
    42 plural=single+'s'
    4340db.define_table(table,
    4441                SQLField('modified_on','datetime',default=now),
     
    5249Also add the messages for your resources:
    5350{{{
    54 title_create=T('Add %s' % single)
    55 title_display=T('%s Details' % single)
    56 title_list=T('List %s' % plural)
    57 title_update=T('Edit %s' % single)
    58 subtitle_create=T('Add New %s' % single)
    59 subtitle_list=T('%s' % plural)
    60 label_list_button=T('List %s' % plural)
    61 label_create_button=T('Add %s' % single)
    62 msg_record_created=T('%s added' % single)
    63 msg_record_modified=T('%s updated' % single)
    64 msg_record_deleted=T('%s deleted' % single)
    65 msg_list_empty=T('No %s currently registered' % plural)
     51title_create=T('Add Vehicle')
     52title_display=T('Vehicle Details')
     53title_list=T('List Vehicles')
     54title_update=T('Edit Vehicle')
     55subtitle_create=T('Add New Vehicle')
     56subtitle_list=T('Vehicles')
     57label_list_button=T('List Vehicles')
     58label_create_button=T('Add Vehicle')
     59msg_record_created=T('Vehicle added')
     60msg_record_modified=T('Vehicle updated')
     61msg_record_deleted=T('Vehicle deleted')
     62msg_list_empty=T('No Vehicles currently registered')
    6663exec('crud_strings.%s=Storage(title_create=title_create, title_display=title_display, title_list=title_list, title_update=title_update, subtitle_create=subtitle_create, subtitle_list=subtitle_list, label_list_button=label_list_button, label_create_button=label_create_button, msg_record_created=msg_record_created, msg_record_modified=msg_record_modified, msg_record_deleted=msg_record_deleted, msg_list_empty=msg_list_empty)' % resource)
    6764}}}
    68 Copy/paste & do just a few small tweaks once pasted:
    69  * Maybe change phrasing: registered vs defined, etc
    7065
    7166=== Controller ===