2017 © Pedro Peláez
 

library bsb-doctrine-translator

BsbDoctrineTranslator is a ZF2 module that provides tools to manage translations stored with doctrine.

image

bushbaby/bsb-doctrine-translator

BsbDoctrineTranslator is a ZF2 module that provides tools to manage translations stored with doctrine.

  • Friday, April 3, 2015
  • by bushbaby
  • Repository
  • 1 Watchers
  • 0 Stars
  • 526 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

BsbDoctrineTranslator

WARNING! very much work in progress - do not use in production!, (*1)

Set of tools to manage translation from a doctrine database., (*2)

Installation

as zf2 project

BsbDoctrineTranslator works with Composer. To install it into your project, just add the following line into your composer.json file:, (*3)

"require": {
    "bushbaby/bsb-doctrine-translator": "~1.0.0@dev"
}

Then update your project by runnning composer.phar update., (*4)

Finally enable the module by adding BsbDoctrineTranslator in your application.config.php file., (*5)

as standalone

For development purposes you might want to install BsbDoctrineTranslator standalone. Clone the project somewhere on your computer, (*6)

git clone git@github.com:bushbaby/BsbDoctrineTranslator.git BsbDoctrineTranslator
cd BsbDoctrineTranslator
curl -sS https://getcomposer.org/installer | php
git checkout develop
./composer.phar install
phpunit

Configuration

To configure the module just copy the bsb_doctrine_translator.local.php.dist (you can find this file in the config folder of BsbDoctrineTranslator) into your config/autoload folder, and override what you want., (*7)

Commandline Tool

Commands

The source scanner provides the ability to detect any translate(message, domain, locale) translatePlural(message, plural, number, domain, locale) invokations in PHP source., (*8)

scan-source accepts these arguments, (*9)

--locale 
--domain 
--file=path/to/file
--kind=all|singular|plural defaults to all

To list detected messages, (*10)

scan-source list 

Export detected messages, (*11)

scan-source export > exported.txt

The comparison component provides the ability to compare message defined in source to the actual translation in the database, (*12)

Provides the ability to compare the message found in source to messages stored in database

compare untranslated

Features (some planned), (*13)

  • Warn against missing printf tokens in plural messages
  • Warn against conflicting singular and plural message (since these should never be the same)
  • Find messages without a translation
  • Remove messages defined in database but not detected in source
  • Add messages defined in source but not present in database
  • Exporting to various formats
  • Change a translation
  • Detect a translation invokation that has moved due to refactoring
  • Detect a change of message refactoring
  • Display the source context of a message

The Versions

03/04 2015

dev-master

9999999-dev https://github.com/bushbaby/BsbDoctrineTranslator

BsbDoctrineTranslator is a ZF2 module that provides tools to manage translations stored with doctrine.

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 doctrine module translation i18n

03/04 2015

dev-develop

dev-develop https://github.com/bushbaby/BsbDoctrineTranslator

BsbDoctrineTranslator is a ZF2 module that provides tools to manage translations stored with doctrine.

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 doctrine module translation i18n

03/04 2015

1.0.0-alpha2

1.0.0.0-alpha2 https://github.com/bushbaby/BsbDoctrineTranslator

BsbDoctrineTranslator is a ZF2 module that provides tools to manage translations stored with doctrine.

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 doctrine module translation i18n

07/01 2014