Commit Graph

80 Commits

Author SHA1 Message Date
Olivier Dony 9a84d55036 [MERGE] Forward-port saas-3 up to 9b55532 2014-08-14 14:37:42 +02:00
Olivier Dony 8b12d1c566 [MERGE] Forward-port of 7.0 up to 85d2b45 2014-08-14 04:11:33 +02:00
Olivier Dony 69eef5ac8d [FIX] tools.translate: addons path resolution failed with duplicates
When the addons_path config contained the
default path, the system was working with
an empty addons_path in the middle of the
other paths. This empty one matched for all
files, making all files appear to belong to
the root path component, e.g. `home` if the
root path is in /home.
Refactored a bit to avoid duplicates and
redundant path calculations.
2014-08-14 02:07:59 +02:00
Vo Minh Thu 680214c47e [FIX] tools.translate: when loading entries from a PO file, use also the POT.
On Launchpad, as commented on bug 933496, PO entries (and their comments) are
shared between series. This mean that e.g. the 7.0 series can have the wrong
`reference` comments (those beginning with #:) as they would be copied from say
the trunk series. Those `reference` comments are used to import translations
and look them up.

This patch adds a few lines of code to tools.translate so that targets
defined in the POT `reference` comments are used in addition to those from the
PO file.

Also adds a test module to validate the new behavior.

This patch stems from:
 - the 6.1 branch by Vo Minh Thu:
    https://code.launchpad.net/+branch/~openerp-dev/openobject-server/6.1-fix-po-targets-933496-vmt
 - the 7.0 port by Numerigraphe:
    https://code.launchpad.net/~numerigraphe-team/openobject-server/7.0-fix-po-targets-933496-vmt
2014-08-13 23:07:40 +02:00
Christophe Simonis fa07bc8532 [MERGE] forward port of branch saas-3 up to 310d3fe 2014-07-30 19:09:33 +02:00
Christophe Simonis 310d3fe4c4 [MERGE] forward port of branch 7.0 up to 39f3e40 2014-07-30 18:55:31 +02:00
Mathieu Benoit 40b1fccb2a [FIX] translate: Fix debug print when parse path list to translate. 2014-07-25 16:17:29 -04:00
Kersten Jeremy 720339ed1d [MERGE] Merge branch lp:~numerigraphe/openobject-server/7.0-translation-order-933496-numerigraphe
bzr revid: jke@openerp.com-20140320090105-fl2jt7hhplwu6dgr
2014-03-20 10:01:05 +01:00
Antony Lesuisse 38d1ca1ff2 [MERGE] trunk
bzr revid: al@openerp.com-20140227161819-p9chmskfifo0rygs
2014-02-27 17:18:19 +01:00
Christophe Simonis a69f789b41 [MERGE] forward port of branch 7.0 up to revid 5224 chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
bzr revid: dle@openerp.com-20140205105045-j95kduyjiq83e57z
bzr revid: dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: dle@openerp.com-20140116161158-u95vcs3os4tk2zob
bzr revid: dle@openerp.com-20140121172737-gzawfi3ssg7xifef
bzr revid: chs@openerp.com-20140129094554-c3abc8x3qz9mpszr
bzr revid: chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140206110220-myn57cryam1y4k9v
2014-02-06 12:02:20 +01:00
Christophe Simonis c234d8547d [FIX] _(): avoid useless warning where translating string without a cursor
bzr revid: chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
2014-02-06 11:51:41 +01:00
Christophe Simonis a45b2c6b90 merge upstream
bzr revid: chs@openerp.com-20140117092206-ha47ryhjc4ph50nl
2014-01-17 10:22:06 +01:00
Christophe Simonis 0771ca2692 [MERGE] forward port of branch saas-2 up to revid 5002 dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: chs@openerp.com-20140115205357-arptzm69logz3osm
2014-01-15 21:53:57 +01:00
Christophe Simonis 5269664102 [FIX] correct uses of addons_path
bzr revid: chs@openerp.com-20140115180313-pqcrfmstci2w21y8
2014-01-15 19:03:13 +01:00
Denis Ledoux 05aab83eb1 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9743 revid:qdp-launchpad@openerp.com-20140108160719-9i8xhrat49cn9l5e
bzr revid: chs@openerp.com-20140107141524-xzz39a2ym66swr0t
bzr revid: chs@openerp.com-20140107172248-zic9mqg0rigy2czb
bzr revid: chs@openerp.com-20140108160418-ph17jgy5hlejj9hr
bzr revid: dle@openerp.com-20140108171400-8r0fwv3wi36w2im0
2014-01-08 18:14:00 +01:00
Xavier ALT 4986d636b4 [FIX] translation: force clearing of cached translated term after a successfull `trans_load_data`
When re-loading a translation (with 'Overwrite Existing Terms') we need to
  empty the translation cache to ensure overwritten terms get their new values.

bzr revid: xal@openerp.com-20131217145738-9oy2fjhbc46yzonq
2013-12-17 15:57:38 +01:00
Denis Ledoux f6d7ee39fc [FIX]tools, translate: more tolerant code, if the model does not exist anymore (impossible to syncrhonize translation terms if there are ir_model_fields with non-existing models)
bzr revid: dle@openerp.com-20131127161154-t8xfjiytqq8ja8fh
2013-11-27 17:11:54 +01:00
Olivier Dony 8ac110c4dd [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5098 rev-id: odo@openerp.com-20131011123914-7zuvd9mch21yxgj8
bzr revid: dle@openerp.com-20131009131902-a93nsbou4w8y0vlx
bzr revid: chs@openerp.com-20131009175454-j06y1ngylfbqyrpj
bzr revid: dle@openerp.com-20130918160049-fo88fl7uyhfoofkv
bzr revid: dle@openerp.com-20130924130544-kmkyr0d73cusvdav
bzr revid: odo@openerp.com-20131011134433-nyfjipvlql4xu127
2013-10-11 15:44:33 +02:00
Stefan Rijnhart 7de17a9358 [FIX] Keep backwards compatibility with Babel 0.9.6
bzr revid: stefan@therp.nl-20130918074505-59q1fs3ixlev1ein
2013-09-18 09:45:05 +02:00
Stefan Rijnhart a9b8936a4d [RVT] Undo previous fix
bzr revid: stefan@therp.nl-20130918074407-ae6yu2f001vxl0le
2013-09-18 09:44:07 +02:00
Stefan Rijnhart b224b40fac [FIX] Restore compatibility with Babel > 0.9.6
lp bug: https://launchpad.net/bugs/1226576 fixed

bzr revid: stefan@therp.nl-20130917122312-r6s7dgzdsfil7xyg
2013-09-17 14:23:12 +02:00
Lionel Sausin 1f3a482f4f [REF] avoid the lookup in sorted translation export as suggested by Guewen Baconnier @ Camptocamp
bzr revid: ls@numerigraphe.com-20130829075035-lml81a7bbn66c8qu
2013-08-29 09:50:35 +02:00
Xavier Fernandez http://www.smile.fr 3276861ff6 [FIX] port Xavier Fernandez's fix for Bug #971412: Translations export has no fixed order
lp bug: https://launchpad.net/bugs/971412 fixed

bzr revid: ls@numerigraphe.com-20130828152117-e1h0yljgbn538v9o
2013-08-28 17:21:17 +02:00
Raphael Collet 05851d21ba [MERGE] from trunk
bzr revid: rco@openerp.com-20130411073017-x6e4h8xbvmy3ofdw
2013-04-11 09:30:17 +02:00
Vo Minh Thu 307ca374d6 [MERGE] forward merge 7.0 until revision 4919.
bzr revid: vmt@openerp.com-20130404130704-24vsmczw34cssytd
2013-04-04 15:07:04 +02:00
Raphael Collet 09be864f1d [IMP] replace all tests like 'registry.get(X)' by 'X in registry' where X is non static
bzr revid: rco@openerp.com-20130329140723-dnrl02saky570xg0
2013-03-29 15:07:23 +01:00
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
Ravi Gohil (OpenERP) bdde088d08 [FIX] re-importing the translation from a file(.csv, .xml) updates the terms in ir_translation table but does not update it in cache memory, need a server restart to take those change effect in interface. (Maintenance Case: 587178)
bzr revid: rgo@tinyerp.com-20130318133338-djkx3ykbkitvbzeb
2013-03-18 19:03:38 +05:30
Olivier Dony 527ef066dd [REVERT] tools.translate: undo rev 4874 refactoring and renaming `trans_parse_view`, was meant for trunk
rev 4874 = rev-id xmo@openerp.com-20130306095720-3277aw0rq9pzpsw4

bzr revid: odo@openerp.com-20130307164558-alvl7hcov2uhqxbw
2013-03-07 17:45:58 +01:00
Xavier Morel 7e7a8b44a9 [IMP] deduplicate trans_parse_view code, rename for clarity
also correctly handle all translatable attributes in a <attribute name=...> extension tag

bzr revid: xmo@openerp.com-20130306095720-3277aw0rq9pzpsw4
2013-03-06 10:57:20 +01:00
Dhruti Shastri c0e0110f42 [translation] : placeholders are missed out for Translation (Case:585261)
bzr revid: dhs@tinyerp.com-20130219095601-ncsy6tnfns1xz4ls
2013-02-19 15:26:01 +05:30
Dhruti Shastri 01eb26c35a [translation] : placeholders are missed out for Translation (Case:585261)
bzr revid: dhs@tinyerp.com-20130219084856-ab44isuegq7w31wo
2013-02-19 14:18:56 +05:30
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