Skip to content

Pootle project tool

Leandro Regueiro edited this page Feb 14, 2017 · 16 revisions

Aims

  • provide access to tp_tool api
  • clone tps within/between projects
  • move tps within/between projects
  • update some/all of 1 tp from another
  • clone projects
  • move projects

Actions that are needed on units

  • Template actions:

    • Add missing units from source to target
    • Remove units missing in source from target
    • Adjust source of a unit in target
  • Target translation actions:

    • Copy translations from source unit to target unit
      • Copy only if blank
      • Copy only if source unit is newer than target unit

Commands

--target-language can be set with one --language parameter only. It will perform all actions on TP-SOURCE->TP-TARGET.

clone

pootle project clone foo --target-project=baz [--language=…]*
pootle project clone foo --language=pt --target-project=baz --target-language=pt-BR

move

pootle project move foo --target-project=baz [--language=…]*
pootle project move foo --language=pt --target-project=baz --target-language=pt-BR

update

pootle project update foo --target-project=baz [--translations][--overwrite][--language=…]*
pootle project update foo --target-project=baz --language=pt --target-language=pt-BR [--translations][--overwrite]

Runs standard update process baz project from foo project. If no --overwrite provided then resolve_conflict param is POOTLE_WINS (which means that target project baz wins). Otherwise foo project wins. If --translations is set it updates translations only. No new units can be added. No existing units can be marked as obsolete.

remove

pootle project remove foo [--force] [--language=…]*

--force can be used for the whole project only and removes project directory from PO_DIRECTORY

Clone this wiki locally