Skip to content
This repository was archived by the owner on Mar 4, 2019. It is now read-only.

Repository files navigation

This is a Drupal installation profile for B-Translator Server.

* What is B-Translator

  The codename *B-Translator* can be decoded like *Bee Translator*,
  since it aims at collecting very small translation contributions
  from a wide crowd of people and to dilute them into something
  useful.

  It can also be decoded like *Be Translator*, as an invitation to
  anybody to give his small contribution for translating programs or
  making their translations better.

  For more detailed information see: http://info.btranslator.org


* Installation

  Installation is done inside a Docker container. For instructions
  about installing Docker see: https://docs.docker.com/installation/

  + Create a working directory:
    #+BEGIN_EXAMPLE
    mkdir workdir/
    #+END_EXAMPLE

  + Link the docker directory inside the working directory:
    #+BEGIN_EXAMPLE
    cd workdir/
    ln -s ../btr_server/docker .
    #+END_EXAMPLE

  + Modify and customize the settings:
    #+BEGIN_EXAMPLE
    cp docker/settings.sh .
    vim settings.sh
    #+END_EXAMPLE

  + Build a Docker image:
    #+BEGIN_EXAMPLE
    docker/build.sh settings.sh
    tail -f logs/nohup-btr_server-master-20150929.out
    less -r logs/nohup-btr_server-master-20150929.out
    #+END_EXAMPLE
    This will create a docker image, named =btr_server:master= with a
    minimal ubuntu system and everything that is needed for the normal
    work of the Drupal application.

  + Create a Docker container like this:
    #+BEGIN_EXAMPLE
    docker/create.sh
    #+END_EXAMPLE
    It will create a container with port forwarding like this: =-p
    80:80 -p 443:443 -p 2201:2201=. If you don't like the default port
    forwarding, edit ~config~ and modify it.

  + Now you can start and stop the container with =docker/start.sh=
    and =docker/stop.sh=, enter the shell of the container with
    =docker/enter.sh=, etc.

  + If =development=true= is set on the settings, then the code of the
    application inside the container will be linked to the directories
    ~btr_server/~ and ~btr_client/~ inside the workdir, so that you
    can edit and work on it easily.

  + If it is installed on a local machine (for testing or
    development), add the domain names =btr.example.org= and
    =l10n.example.org= on ~/etc/hosts~, like this:
    #+BEGIN_EXAMPLE
    127.0.0.1 btr.example.org
    127.0.0.1 l10n.example.org
    #+END_EXAMPLE
    This way it can be accessed by typing =https://btr.example.org=
    and =https://l10n.example.org= on the browser location.


* Quick install

  An easier way to install is by using the script
  ~utils/docker-install.sh~ which automates the steps above, with
  certain conventions for directory names etc.
  #+BEGIN_EXAMPLE
  vim utils/docker-install.sh
  utils/docker-install.sh --bcl_domain=test.example.org
  or
  utils/docker-install.sh $(pwd)/settings.sh \
      --git_branch=test --bcl_domain=test.example.org
  #+END_EXAMPLE

  This script also installs [[https://github.com/docker-build/wsproxy][wsproxy]], which allows to run more that one
  containers with ports 80/443. For this to work, the variable =ports=
  on ~config~ is set to empty, so that docker does not forward the
  ports 80 and 443 to the containers. The HTTP request forward to the
  correct website container is handled by the *wsproxy* container,
  based on the domain name.

  *NOTE:* Although [[https://github.com/B-Translator/btr_server/blob/master/utils/docker-install.sh][utils/docker-install.sh]] is handy for making a quick
  installation, it is highly recommended to read and understand this
  script, because this will be helpful for maintaining the
  installation.  It is not so long and it is easy to understand.


* Change configuration

  To change the configuration of the server after it has been built,
  or in case of using a pre-built image, run:
  #+BEGIN_EXAMPLE
  docker/exec.sh install/config.sh
  #+END_EXAMPLE
  and give the new settings interactively.

  Another option is to edit the configuration settings file and give
  it as a argument to the script:
  #+BEGIN_EXAMPLE
  docker/enter.sh
  cp install/settings.sh .
  vim settings.sh
  install/config.sh settings.sh
  #+END_EXAMPLE

  It is also possible to run configuration scripts individually, to
  change only certain configurations. For example:
  #+BEGIN_EXAMPLE
  docker/exec.sh install/config/domain.sh
  docker/exec.sh install/config/languages.sh
  #+END_EXAMPLE
  These scripts can be found on [[https://github.com/B-Translator/btr_server/tree/master/install/config][install/config/]].


* Import projects

  There is a list of FOSS projects, like GNOME, KDE, LibreOffice,
  etc. that can be automatically imported by scripts (there is a
  script for each project). They can be imported like this:
  #+BEGIN_EXAMPLE
  docker/enter.sh

  /var/www/data/get.sh
  tail -f /var/www/data/nohup-get.out
  less -r /var/www/data/nohup-get.out

  /var/www/data/import.sh
  tail -f /var/www/data/nohup-import.out
  less -r /var/www/data/nohup-import.out
  #+END_EXAMPLE

  It is done from inside the Docker container. First we download all
  of them, and then they are imported. Downloading can take some time,
  and importing even more (many hours, and maybe days), so it is run
  with =nohup= and the output can be checked from the log file.

  We can also do it from outside the container (in case we want to
  build outomation scripts etc.) like this:
  #+BEGIN_EXAMPLE
  docker/exec.sh /var/www/data/get.sh
  docker/exec.sh tail -f /var/www/data/nohup-get.out

  docker/exec.sh /var/www/data/import.sh
  docker/exec.sh tail -f /var/www/data/nohup-import.out
  #+END_EXAMPLE

  Importing a single project can also be done from the web UI and with
  the drush commands *btr-project-add* and *btr-project-import*. For
  more details see: [[https://github.com/B-Translator/btr_server/blob/master/modules/custom/btrCore/data/README.org][/var/www/data/README.org]]


* Contacts

  - Email: info@btranslator.org

  - Follow on Twitter: https://twitter.com/b_translator

  - Discussion group/forum
    + Email: /btranslator@googlegroups.com/
    + Web: https://groups.google.com/forum/?fromgroups&hl=en#!forum/btranslator
    + Google+ Community: https://plus.google.com/u/0/communities/109327047119841706609

  - Chat/IRC: *#btranslator* on *irc.freenode.net*

  - Misc
    + Homepage: http://info.btranslator.org
    + Wiki: https://github.com/B-Translator/btr_server/wiki
    + Issues: https://github.com/B-Translator/btr_server/issues


* Sites

  Sites using B-Translator:
  - https://l10n.org.al - Albanian translations.

  To install and setup your site you would need some basic skills on
  Ubuntu server administration and Drupal administration.

Releases

Packages

Contributors

Languages