Review: Needs Fixing

* I think we need to check the msgcat output (either the return value or the 
output file) if there's nothing to output it seems to not generate its file at 
all, exporting openerp-web's translations twice in a row I get:

   extracting messages from addons/web_chat/static/src/js/web_chat.js
   writing PO template file to ./addons/web_chat/i18n/web_chat.pot.web
   Merging with existing PO file: ./addons/web_chat/i18n/web_chat.pot
   mv: ./addons/web_chat/i18n/web_chat.pot.tmp: No such file or directory
   […]
   writing PO template file to ./addons/web_hello/i18n/web_hello.pot.web
   Merging with existing PO file: ./addons/web_hello/i18n/web_hello.pot
   mv: ./addons/web_hello/i18n/web_hello.pot.tmp: No such file or directory
   […]
   writing PO template file to ./addons/web_rpc/i18n/web_rpc.pot.web
   Merging with existing PO file: ./addons/web_rpc/i18n/web_rpc.pot
   mv: ./addons/web_rpc/i18n/web_rpc.pot.tmp: No such file or directory
   web_tests
   extracting messages from addons/web_tests/static/src/js/web_tests.js
   writing PO template file to ./addons/web_tests/i18n/web_tests.pot.web
   Merging with existing PO file: ./addons/web_tests/i18n/web_tests.pot
   mv: ./addons/web_tests/i18n/web_tests.pot.tmp: No such file or directory

* The sh extraction script should probably stick to one style of command 
substitutions, ideally $(). Line 38 mixes $() and backticks, and line 42 uses 
backticks, both should use $().

* It should also check that the system has `msgcat` available before starting 
its work (at least in $do_all mode), most systems don't have the `gettext` 
suite installed by default.

  (nota: for 6.2, we should check if Babel can open the addons's POT files 
without wrecking them, and in that case replace this by a 100% python&babel 
script, there's Catalog.update for merging catalogs that would avoid writing 5 
extra files to disk)

* Maybe the qweb extraction thingie could use `iterparse` (and the (end) event) 
instead of reimplementing it? Could be a separate improvement though, but while 
we're at it… removes half the lines for iterating the object tree

-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-i18n-addons-unification/+merge/91287
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-i18n-addons-unification.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to