Commit Graph

49 Commits

Author SHA1 Message Date
Vo Minh Thu 1e7e2ca753 [REF] no longer use openerp.pooler.
Either use openerp.modules.registry.RegistryManager when the full
new() signature is needed, or use openerp.registry().

Replaced also some pool.get() with pool[] because KeyErrors
are better than AttributeErrors on None.

bzr revid: vmt@openerp.com-20130327111014-2i0hlvpy5y5ku7hm
2013-03-27 12:10:14 +01:00
Vo Minh Thu f0e4a9b01e [REF] tools.translate: removed dead code (wizard service do not exist anymore).
bzr revid: vmt@openerp.com-20130201112001-9db40vy8rhef6wj4
2013-02-01 12:20:01 +01:00
Olivier Dony 3ad16170f3 [MERGE] tools.translate: fix extraction of translation terms from mako source files, courtesy of Niels Huylebroeck (Agaplan)
bzr revid: odo@openerp.com-20130114112831-87gmdtqzaa55zssf
2013-01-14 12:28:31 +01:00
Niels Huylebroeck 9db9138056 [FIX] When extracting strings from mako reports we specify a correcter method for string extraction.
lp bug: https://launchpad.net/bugs/1096138 fixed

bzr revid: nh@agaplan.eu-20130104171631-p72mjfkfsvm2tdr8
2013-01-04 18:16:31 +01:00
Xavier Morel b6ece5d65f [REM] trailing semicolons
bzr revid: xmo@openerp.com-20121214124310-wfdkhmcwxnyqu30m
2012-12-14 13:43:10 +01:00
Xavier Morel c6079dd6bb [REM] unnecessary parens
bzr revid: xmo@openerp.com-20121214123803-6xu2s1ndnoyj4i3e
2012-12-14 13:38:03 +01:00
Xavier Morel 80d97e8d17 [REM] duplicate dict keys
bzr revid: xmo@openerp.com-20121214121741-lhkqewfw76riqy45
2012-12-14 13:17:41 +01:00
Olivier Dony b624267457 [FIX] translate,orm: remember local Model [_sql]_constraints, and keep only those when exporting translations
Previously all _*constraints leaked upstream and
downstream, and were duplicated in all the exported
terms for all modules inheriting from a given model.

bzr revid: odo@openerp.com-20121204082947-tdpiu71ryxzuredb
2012-12-04 09:29:47 +01:00
Olivier Dony 7f5ad72429 [MERGE] Forward-port 6.1 bugfixes up to rev. 4307
rev.4307 = rev-id launchpad_translations_on_behalf_of_openerp-20121125065030-g5if5pybr61la4yj

bzr revid: odo@openerp.com-20121126160320-t2suuik6lhk6wl0x
bzr revid: odo@openerp.com-20121126161836-mv8yymzgbnmif4ve
bzr revid: odo@openerp.com-20121126162023-ejvsapwouyudw6c6
bzr revid: odo@openerp.com-20121126181527-d4yx15372bis77qj
2012-11-26 19:15:27 +01:00
Olivier Dony 0293ce4f64 [FIX] translate: skip XML comments when extracting terms from views
bzr revid: odo@openerp.com-20121124025622-mb7t7q7wgb7gu8y6
2012-11-24 03:56:22 +01:00
Olivier Dony a23fcfb1e8 [IMP] translate: ignore 0-1 letter terms during terms export + catch and log babel extractor exceptions with filename
bzr revid: odo@openerp.com-20121123235130-euhbx6zqs5118472
2012-11-24 00:51:30 +01:00
Olivier Dony 28062933d0 [FIX] translation export: added missing translation function `_lt` for javascript source files
bzr revid: odo@openerp.com-20121123164604-xhs2247xu4oh774q
2012-11-23 17:46:04 +01:00
Olivier Dony 180549c72e [MERGE] OPW 577045: translate: properly export and translate terms in XSL-based reports
This patch comes with a related patch on addons which
fixes a lot of cases of terms that were not properly
translated in reports, due to improper use of the
translation system. The addons patch also adds a
lot of missing entries in the POT files.

bzr revid: odo@openerp.com-20121008110946-21984tjvhoy8zkx9
2012-10-08 13:09:46 +02:00
Chris Biersbach c79543ee4d [FIX] Wrong indentation fixed
bzr revid: cbi@openerp.com-20121008105800-kkfah0x3l0z9hg3a
2012-10-08 12:58:00 +02:00
Olivier Dony a42baec455 [IMP] translate: unify the server and web translation export mechanisms
- qweb and Javascript terms extraction now builtin
- all qweb/JS terms are flagged with an extra PO comment:
  `openerp-web`, which the web client will use when
  loading translations
- the homemade Python/Mako extractor has been removed
  and replaced by the default babel Python extractor.
  Net result is that we extract less spurious terms, but
  keep valid ones, so everything looks great under
  the sun.

bzr revid: odo@openerp.com-20121003132659-h5obyl1j7hjo1y2b
2012-10-03 15:26:59 +02:00
Chris Biersbach a528390071 [FIX] removed unwanted parsing of transalte() blocks in rml python code
bzr revid: cbi@openerp.com-20121001085948-bgixbde1y3a8ka1a
2012-10-01 10:59:48 +02:00
Chris Biersbach 1d7b6d3e35 [Fix] Fixed generation of .pot files
bzr revid: cbi@openerp.com-20120924134002-co53v0mbz8zicciv
2012-09-24 15:40:02 +02:00
Olivier Dony b505ba9e0a [IMP] translate: avoid loading duplicate `code`-type translations, we only care about one
bzr revid: odo@openerp.com-20120918073029-dujiwi17irt8m73t
2012-09-18 09:30:29 +02:00
Olivier Dony 550751b358 [IMP] translations: wip, remove unnecessary code, support loading PO comments and storing them, split ir.translation view data in separate XML file
bzr revid: odo@openerp.com-20120913142920-ggpeqth4s2wwqwd2
2012-09-13 16:29:20 +02:00
Olivier Dony 9a577ef431 [MERGE] Sync with trunk
bzr revid: odo@openerp.com-20120911114104-vk8afbjq9ao1dqr2
2012-09-11 13:41:04 +02:00
Stephane Wirtel b3988436cb [REF] Replace the user id 1 by openerp.SUPERUSER_ID
bzr revid: stw@openerp.com-20120831135309-o4plzf5wp0kyuzgf
2012-08-31 15:53:09 +02:00
Jigar Amin - OpenERP d0910e1b38 [IMP] integreated the web serivce for the translations
bzr revid: jam@tinyerp.com-20120713114208-yndy8hus850bh97z
2012-07-13 17:12:08 +05:30
Turkesh Patel (Open ERP) 48a344c1e8 [IMP] improved code.
bzr revid: tpa@tinyerp.com-20120713095448-ghr750h2jk9ivsj2
2012-07-13 15:24:48 +05:30
Turkesh Patel (Open ERP) 8383d6a245 [IMP] Fetch only traslated and distinct strings using sql.
bzr revid: tpa@tinyerp.com-20120713092838-5th251msbdkgjdnb
2012-07-13 14:58:38 +05:30
Turkesh Patel (Open ERP) f05ee5dfdb [IMP] improved code.
bzr revid: tpa@tinyerp.com-20120713055330-avz6ebzuqvcpxdd5
2012-07-13 11:23:30 +05:30
Turkesh Patel (Open ERP) c17ea49de9 [IMP] improved code
bzr revid: tpa@tinyerp.com-20120712132700-zc4co6o4plhzoi60
2012-07-12 18:57:00 +05:30
Turkesh Patel (Open ERP) bc76991e24 [IMP] improved code.
bzr revid: tpa@tinyerp.com-20120712132308-1qvurv572sxmsnqe
2012-07-12 18:53:08 +05:30
Turkesh Patel (Open ERP) d87adc497e [IMP] improved code to get translation from database.
bzr revid: tpa@tinyerp.com-20120712085838-pqzj86fptp96eag6
2012-07-12 14:28:38 +05:30
Turkesh Patel (Open ERP) 4ea3ad65b2 [ADD] added module field in ir.translation and improved code for that.
bzr revid: tpa@tinyerp.com-20120712052111-5qq9noxd5vd9dlwv
2012-07-12 10:51:11 +05:30
Turkesh Patel (Open ERP) f9ad472466 [ADD] add new http service translation.
bzr revid: tpa@tinyerp.com-20120711071054-rfreaxwys8b1fqbc
2012-07-11 12:40:54 +05:30
Olivier Dony e3922a054b [FIX] OPW 572856: translate: attempt to auto-detect user's language preferences when no context is available
lp bug: https://launchpad.net/bugs/434266 fixed

bzr revid: odo@openerp.com-20120629120418-q61hd8cbxy2nftva
2012-06-29 14:04:18 +02:00
Fabien Pinckaers ed4c342d9c [IMP] Translations of static terms in views
bzr revid: fp@tinyerp.com-20120628141632-ghixqjf59jodqgx4
2012-06-28 16:16:32 +02:00
Vo Minh Thu 23eb63f139 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120206203151-3snkz7usngwtv1xt
2012-02-06 21:31:51 +01:00
Olivier Dony aea1b13412 [IMP] tools.translate: be more lenient and accept standart gettext source annotations
The GetText spec says that PO auto-comments indicating
  the source location have this form:
   #: /path/to/file:lineno
  However OpenERP's POT export system defaults to a modified
  version of this format with an extra 'type' field:
   #: type:/path/to/file:lineno
  The babel extractors we use for openerp-web's translations
  have the GetText format hardcoded, so it's a good idea
  to be more lenient and allow the standards annotations too.
  We can use a default 'code' type for such cases.

  For openerp-web translations the type does not matter,
  as the translations will be directly loaded by the 
  web engine from the PO files and served in Javascript
 to the browser, with no typing needed.

  This patch simply avoids failing to parse updated PO files
  that will contain standard GetText annotations for the
  openerp-web related terms.

bzr revid: odo@openerp.com-20120202143210-05p1w24t6u77cyv8
2012-02-02 15:32:10 +01:00
Vo Minh Thu a142292f91 [IMP] openerp.tools: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124140056-hqoy49bh7wyr1xce
2012-01-24 15:00:56 +01:00
Olivier Dony 356e4ed9bd [FIX] translation: remove calls to trans_update_res_ids
Calling this method is no longer required since the
merge of the new code for loading translations using
a temporary table. The method itself has been removed
at revision 3919, so all calls to it should have been
cleaned up as well.
Rev.3919 = rco@openerp.com-20111223104824-fup1cjbjni1fsty1

bzr revid: odo@openerp.com-20120109140958-10i1ti16tw327580
2012-01-09 15:09:58 +01:00
Vo Minh Thu b71c0095c9 [MERGE] tools.translate: use misc.file_open() to load .po files even from .zip files.
bzr revid: vmt@openerp.com-20120104103212-qq2ad04b1ffydrur
2012-01-04 11:32:12 +01:00
Vo Minh Thu 842cb1ad41 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20111201153214-0iintvpp7crnr2jc
2011-12-01 16:32:14 +01:00
Naresh (OpenERP) f211942d6a [FIX]:loading translation of .zip module
lp bug: https://launchpad.net/bugs/885134 fixed

bzr revid: nch@tinyerp.com-20111130085452-vcrxnv86avhfihom
2011-11-30 14:24:52 +05:30
Vo Minh Thu ec3ea4197e [FIX] tools.translate: release.support_email has been removed, so we no longer set the Report-Msgid-Bugs-To value in .po files.
lp bug: https://launchpad.net/bugs/873959 fixed

bzr revid: vmt@openerp.com-20111014150210-qs7n58cocvnjputl
2011-10-14 17:02:10 +02:00
Vo Minh Thu 180ffb18a1 [REF] openerp-server: streamlining startup script.
bzr revid: vmt@openerp.com-20110823103343-rvy2zkre8bo9cq6g
2011-08-23 12:33:43 +02:00
Vo Minh Thu e375049414 [REF] osv: moved osv_pool to modules/registry.
bzr revid: vmt@openerp.com-20110614142226-yd3y39a8z3ubwvxm
2011-06-14 16:22:26 +02:00
P. Christeas f1558730f6 ir.translation, import: push the algo. to SQL, improve performance
At a language import (translation files), we want to push a big batch of
translation records into the database. These will need update-or-insert
logic (against existing ones) or even resolution of ir.model.data .
Doing this loop in Python had been slow (invoking 2x read()s, +1 for
ir.model.data, 1 insert or update), triggered the cache (fill and clean
at each iteration).

Instead, follow the old-school db recipe for mass records insertion:
 - create a temporary table w/o indexes or constraints
 - quickly populate the temp with all records of the batch
   (through a dedicated "cursor" object)
 - process the table, doing lookups in collective SQL queries (yes, SQL
   is all about loops of data processing, efficiently)
 - insert all records from temp into ir.model.data
 - call (implicitly) all constraints of ir.model.data at the end of that
   single query.

This improves performance of translation imports by ~3x at least.

bzr revid: xrg@linux.gr-20110608162059-rfy1vvwp8w66ry0i
2011-06-08 19:20:59 +03:00
P. Christeas 28e3960004 Revert "[IMP] translation: Added two columns to ir_translation to fix the res_ids after loading is done."
This reverts commit a78cd642cd956afe3f3cee54558b214549f0a9a5.

Conflicts:

	openerp/addons/base/ir/ir_translation.py
	openerp/tools/translate.py

bzr revid: xrg@linux.gr-20110608092941-f2ycamq0k52y4nc8
2011-06-08 12:29:41 +03:00
Antony Lesuisse 6aa240ca19 [IMP] ir_translation only display installed lang, 10% speedup in translation loading
bzr revid: al@openerp.com-20110601163455-2o732ssum24kwshu
2011-06-01 18:34:55 +02:00
Vo Minh Thu 0e1186dd3d [REF] openerp.pooler/openerp.sql_db: cleaner dependencies:
- openerp.pooler no longer provides get_db_only, which is a provided by sql_db
- openerp.sql_db does not rely anymore on netsvc, which is goog as it was
making a circular import. The downside is that db_close callers have to clean
also the Agent themselves.

bzr revid: vmt@openerp.com-20110420141407-au0oanwjc0t15vy5
2011-04-20 16:14:07 +02:00
Naresh (OpenERP) dce1a9ab59 [FIX]:added missing of parsing of 'help' attribute while synchronizing translations
bzr revid: nch@tinyerp.com-20110421093400-aigxqul71iw2avph
2011-04-21 15:04:00 +05:30
Olivier Dony 14ebc46e3a [FIX] tools.translate: add missing imports after previous merge
bzr revid: odo@openerp.com-20110209090231-odqbf8leyurdh945
2011-02-09 10:02:31 +01:00
Vo Minh Thu f8572e5c60 [IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies

bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
2011-02-07 13:57:23 +01:00