Git Product home page Git Product logo

oxygen-wpml-tools's Introduction

oxygen-wpml-tools

Tools for automating translation process between Oxygen builder and WPML

Since I don't want to copy/paste every translated text field from a page to another inside the Oxygen Builder, I made a very simple python script to automate at the translation process. (you will keep doing copy paste between the JSON of a page to the JSON of the translated page) I just made also a bash script to stop copy pasting and upload everything automatically.

So now the method is the following:

  1. Upload oxy_json_exporter.php and execute on your website.
  2. Download JSON files.
  3. Extract POT file with oxy_translator.py
  4. Translate with your favorite tool and get .PO files
  5. Use bulk_run-upload-po2jsons.sh in order to translate and upload translated text.
  6. Enjoy!

Hope it helps someone.

oxy_json_exporter.php

Script that dumps from the database every JSON in every language

Usage is the following:

Upload the script inside your wp installation
visit the script address from the browser or from the command line using php cli
download the JSONs generated.

TODO:

transform in a WP plugin or in something that can be used remotely.

oxy_translator.py

Script that can import/export contents and links from/to an Oxygen JSON file to/from a CSV/POT/PO file.

Usage is the following:

Method 1) extract a POT file out from a JSON file ./oxy_translator.py -p $SOURCE.json $DEST.pot

Method 2) translate a SOURCE_JSON file using a .PO file into a new DEST_JSON file ./oxy_translator.py -j $SOURCE_JSON $PO_FILE $DEST_JSON

CSV Methods are deprecated and should not be used anymore.

bulk_run-jsons2pot.sh

Extracts a single POT file out from many JSON files.

bulk_run-po2jsons.sh

Bulk translate of many JSON files using a single PO file.

bulk_run-upload-po2jsons.sh

Scripts that automatically translates multiple JSON files (exported with oxy_json_exporter.php), translates them with a PO file and UPLOAD automatically in Wordpress!

oxygen-wpml-tools's People

Contributors

pad52 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.