Menu

#902 Expense type select field is not translated in project expense creation form

Expenses
closed
nobody
4
2012-11-26
2012-11-20
aiol
No

When creating a new expense for a project, the expense types are not translated in the select field (expense_type_id). This form is in intranet-expenses/new.tcl

The version of intranet-expenses module I am using is 4.0.3.3.0

Discussion

  • aiol

    aiol - 2012-11-20

    I have been able to solve the problem. This is the content of patch.diff file after changing the code in intranet-expenses/www/new.tcl file:

    ~~~~
    Index: new.tcl
    ===================================================================
    RCS file: /home/cvsroot/intranet-expenses/www/new.tcl,v
    retrieving revision 1.31
    diff -u -r1.31 new.tcl
    --- new.tcl 18 Dec 2011 17:27:16 -0000 1.31
    +++ new.tcl 20 Nov 2012 11:29:51 -0000
    @@ -114,13 +114,13 @@
    set expense_currencies [parameter::get_from_package_key -package_key intranet-expenses -parameter "ExpenseCurrencies" -default {}]
    set currency_options [im_currency_options -currency_list $expense_currencies $include_empty]

    -set expense_type_options [db_list_of_lists expense_types "

    • select expense_type,
    • expense_type_id
    • from im_expense_type
      -"]
      -
      -set expense_type_options [db_list_of_lists expense_types "select expense_type, expense_type_id from im_expense_type"]
      +set expense_type_options [list]
      +set expense_type_sql "select expense_type, expense_type_id from im_expense_type"
      +db_foreach expense_types $expense_type_sql {
    • set expense_type [lang::message::lookup "" "intranet-expenses.$expense_type" "$expense_type"]
    • set expense_type_options [linsert $expense_type_options 0 [list $expense_type $expense_type_id]]
    • ns_log notice "Type is $expense_type"
      +}
      set expense_type_options [linsert $expense_type_options 0 [list [lang::message::lookup "" "intranet-expenses.--Select--" "-- Please Select --"] 0]]
      ~~~~
     
  • Klaus Hofeditz

    Klaus Hofeditz - 2012-11-26

    Hi aiol, tx for providing the patch, committed today. Best regards - Klaus

     
  • Klaus Hofeditz

    Klaus Hofeditz - 2012-11-26
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB