Git Product home page Git Product logo

online-po-compile's Introduction

gettext's .po to .mo compiler... on-line

This is a tiny app that allow your users to upload their gettext's .po files and download them compiled into .mo files. Compilation is done via msgfmt command.

Requirements

  • PHP 5+ and FileInfo extension (included in PHP 5.3+).
  • GNU/Linux (it will probably work in other OS, but has not been tested).

Install

To install this app in your server, you need a working web server with PHP 5+ and, of course, the msgfmt command working (if you are using Debian/Ubuntu, you can install it with the gettext package).

Clone the git repo in your public directory and edit the init.php file to meet your needs:

  • RECAPTCHA_PUB: put here your ReCaptcha public key. You can get one here: https://www.google.com/recaptcha/admin/create
  • RECAPTCHA_PRIV: your ReCaptcha private key
  • TMP_DIR: the absolute path to your files/ dir, where uploaded and compiled files will be stored.
  • FILES_PUBLIC: the public relative path to your files/ dir, usually '/files'.
  • CONTACT: your e-mail address, so your users can contact you if something goes wrong.
  • MAX_FILE_SIZE: max file size for uploaded files, in bytes.
  • ALLOW_NOCAPTCHA: allow bypass Captcha verification by adding the ?nocaptcha=1 argument to the app's URL.
  • FB_APP_ID: your Facebook app ID, if you want to enable OG app tracking
  • FB_API_KEY: your Facebook API Key for that App.
  • MAIN_TITLE: the site title, which is shown in <title> tag, meta description and some other places.

Contact me!

Any doubts or comments? Don't hesitate to contact me on [email protected]

online-po-compile's People

Contributors

isra00 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

online-po-compile's Issues

Keep the original .po filename in the .mo

Possible implementation: create sub-directories in /files with the file_id, which contain the .mo file with the original name. So, instead of this:

/files/8594a9cd3f4dd32e35b4bcfabfb0d5ea.mo

we get:

/files/8594a9cd3f4dd32e35b4bcfabfb0d5ea/original_name.mo

IMPORTANT: sanitize and escape file names!

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.