Ignore:
Timestamp:
3 Mar 2015, 11:10:03 (10 years ago)
Author:
Henrik Bettermann
Message:

Translate title and footer on reports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/reports/contract_statistics.py

    r12659 r12660  
    1717##
    1818import grok
     19from zope.i18n import translate
    1920from zope.catalog.interfaces import ICatalog
    2021from zope.component import queryUtility, getUtility
     
    125126
    126127    def create_pdf(self):
     128        portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE
    127129        creator = getUtility(IPDFCreator, name='landscape')
    128130        table_data = tbl_data_to_table(*self.data)
     
    133135        pdf_data += [
    134136            Table(table_data, style=TABLE_STYLE, colWidths=col_widths)]
    135         doc_title = 'Contracts'
     137        doc_title = translate(_('Contracts'), 'waeup.ikoba',
     138            target_language=portal_language)
     139        footer_title = doc_title
     140
    136141        pdf = creator.create_pdf(
    137             pdf_data, None, doc_title, self.author, 'Contracts'
     142            pdf_data, None, doc_title, self.author, footer_title
    138143            )
    139144        return pdf
Note: See TracChangeset for help on using the changeset viewer.