tool4po --get-list-trans incorrect function call

Bug #1008981 reported by dtech
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ADempiere ERP Localization
Fix Released
Medium
PeanutBlake

Bug Description

I tried to run the command to get the translation list on tool4po 0.99 based on the README:

$ python3.1 tool4po.py --get-list-trans 'en_US_360LTS_standard/' 'nl_NL_370LTS_exported/' 'list_trans.xml'

However this failed with the following error message:
        Default Language: nl_NL
--------------------------------------------------------
        Warning: LANGUAGE_PATTERN_DEFAULT is empty!
--------------------------------------------------------
        Error! Wrong mode in run_get_list_trans!
        mode: en_US_360LTS_standard

Upon inspecting the code I found that the command translates into a function call in the following way:
  run_get_list_trans(sys.argv[2], sys.argv[3], sys.argv[4])
This does not seem consitend with the current definition:
  def run_get_list_trans(mode, file_out, folder_tra, folder_ori=''):

I therefore changed the call:
  run_get_list_trans('pair', sys.argv[4], sys.argv[3], sys.argv[2])

Which seems to restore the --get-list-trans functionality.

Please review and merge patch I have attached

Revision history for this message
dtech (dhoepelman) wrote :
Changed in aderp:
assignee: nobody → PeanutBlake (peanutblake)
importance: Undecided → Low
Changed in aderp:
importance: Low → Medium
status: New → Fix Released
Revision history for this message
PeanutBlake (peanutblake) wrote :

Hi, dtech.
Thanks very much!
Yes, it is a bug.

I found this bug on Mar 09, 2012, but didn't update the wiki link (http://www.adempiere.com/Tool4po).
Sorry!

You can download verion 1.10 here:
https://launchpad.net/aderp/tool4po/v1.10

Please refer here for lastest update: https://launchpad.net/aderp/tool4po/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.