2017 © Pedro Peláez
 

symfony-bundle translation-bundle

provide various tools to ease translation management

image

liip/translation-bundle

provide various tools to ease translation management

  • Tuesday, December 5, 2017
  • by dbu
  • Repository
  • 39 Watchers
  • 25 Stars
  • 7,564 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 14 Forks
  • 27 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

UNMAINTAINED

This bundle is no longer maintained. Feel free to fork it if needed., (*1)

LiipTranslationBundle

Build Status, (*2)

This Bundle provides various tools to ease translations management of a Sf2 app. Here is a small presentation of the bundle., (*3)

Introduction

This bundle adds a new layer on top of existing translation mechanisms. This allows your customers to edit and override any translations directly from the website., (*4)

Separation of concern

Using such a tool allows a clear separation between "key" and "value". Developers are responsible for defining new keys and removing old keys, while client/customer are responsible for translating the website., (*5)

Key values on steroid

The current basic key-value system could be better. We extend it and allow developers to complete keys with metadata (like it's possible with XLiFF)., (*6)

Extend your keys with information like maxbytes, comment, description, urls, screenshot, etc... Anything that could help translators., (*7)

A "value" is the translation for a "key" in a given locale, it's also possible to complete it with metadata (comments, update date, validity, etc...), (*8)

Storage layer

The intermediate storage is currently available for:, (*9)

  • Propel (database)
  • YAML (file or in Git)

but adding a new persistence implementation is very easy (you just have to implement a small interface), (*10)

Symfony compatibility

This bundle works on any Symfony versions 2.3+. Unit and functional tests have been written to ensure this compatibility., (*11)

Features

Translation interface in the backend

  • Edit through a contextual popup
  • Fast inline editing
  • Possibility to view various translated column at the same time (en, fr, pt, etc...)
  • Filter by locale, domain, date
  • Filter for untranslated key
  • Search by key name or translation value
  • Display help messages from the developers

Import/Export

Useful to provide files to an external agency, or to transfer translations from a staging environment to production, (*12)

  • Export translation to a YAML file
  • Export based on the current list filter
  • Export/import multi domain/language with a zip file
  • Review change interface to handle collision at import time

New translation keys insertion

  • Developers can provide context information to a translation keys (maxsize, description, comment, url, etc..)
  • Symfony command for developers to insert new complex keys into Xliff

Security

  • Rights management (restricted to given locale or given domain)

Installation

  1. Via composer, (*13)

      composer require liip/translation-bundle master-dev

Configuration

Include the bundle in your AppKernel.php:, (*14)

public function registerBundles()
{
    $bundles = array(
        // ...
        new Liip\TranslationBundle\LiipTranslationBundle(),
        // ...
    );
    // ...
}

In your config.yml add the given Bundle specific configuration, for example:, (*15)

liip_translation:
    locale_list: [en_JP, en_US, en, fr_CH, fr]
    security:
        by_domain: false
        by_locale: true
    persistence:
        class: Liip\TranslationBundle\Persistence\YamlFilePersistence
        options:
            folder: "%kernel.root_dir%/data/translations"
    interface:
        default_filters:
          domain: ['messages']
          languages: ['en', 'fr']

Also load the routes:, (*16)

_liip_translation:
    resource: "@LiipTranslationBundle/Resources/config/routing.yml"
    prefix: /translation

Alternatively you can load the translation and import interface routes separately:, (*17)

_liip_translation_interface:
    resource: "@LiipTranslationBundle/Resources/config/routing_translation_interface.yml"

_liip_translation_import_interface:
    resource: "@LiipTranslationBundle/Resources/config/routing_import_interface.yml"

Security

Access to translation management can be restricted by domains or by locales. By default, those restrictions are disabled, you can turn them on in the config, with:, (*18)

liip_translation:
    ...
    security:
        by_domain: false
        by_locale: true

You can activate one or both restrictions together. Once this have been activated, you have to attribute associated roles to your users. The existing roles are:, (*19)

ROLE_TRANSLATOR_ADMIN
    ROLE_TRANSLATOR_ALL_DOMAINS
        ROLE_TRANSLATOR_DOMAIN_XXX
    ROLE_TRANSLATOR_ALL_LOCALES
        ROLE_TRANSLATOR_LOCALE_XXX

!! Warning, if you use security by domain, you have to explicitly list the domains. Example:, (*20)

    security:
        by_domain: true
        domain_list: [messages, validators, forms]

Contributing

Pull requests are welcome. Please see our CONTRIBUTING guide., (*21)

This bundle is fully tested with PHPUnit, the tests suite can be run using the following commands :, (*22)

      git clone git@github.com:liip/LiipTranslationBundle.git && cd LiipTranslationBundle
      composer install --dev
      phpunit

Thanks to everyone who has contributed already., (*23)

The Versions

15/06 2015

0.1.0

0.1.0.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

24/03 2015

0.0.11

0.0.11.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

08/01 2015

0.0.10

0.0.10.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

07/11 2013

0.0.9

0.0.9.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

29/10 2013

0.0.8

0.0.8.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

12/10 2013

0.0.7

0.0.7.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

10/10 2013

0.0.6

0.0.6.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

08/10 2013

0.0.5

0.0.5.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

07/10 2013

0.0.4

0.0.4.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

04/10 2013

0.0.3

0.0.3.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

04/10 2013

0.0.2

0.0.2.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n

26/09 2013

0.0.1

0.0.1.0

provide various tools to ease translation management

  Sources   Download

MIT

The Requires

 

The Development Requires

translation i18n