2017 © Pedro Peláez
 

symfony-bundle translation-editor-bundle

Web based UI to manage Symfony2 translations

image

servergrove/translation-editor-bundle

Web based UI to manage Symfony2 translations

  • Wednesday, August 15, 2012
  • by pgodel
  • Repository
  • 10 Watchers
  • 110 Stars
  • 1,964 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 34 Forks
  • 4 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

TranslationEditorBundle

The TranslationEditorBundle is a Symfony2 bundle that provides web base UI to manage Symfony2 translations., (*1)

The following command line tools are provided:, (*2)

  • Import translation files, (*3)

    ./app/console locale:editor:import [--dry-run] [filename], (*4)

Import translation files into MongoDB. If no files is specified, the command will search for files in translations directories in src/, (*5)

  • Export to translation files, (*6)

    ./app/console locale:editor:export [--dry-run] [filename], (*7)

Export translations to translation files from MongoDB. If no files is specified, the command will search for files in translations directories in src/, (*8)

Screenshot

, (*9)

Installation:

Download or clone the bundle. If you use deps file add it like this:, (*10)

[TranslationEditorBundle]
    git=git://github.com/servergrove/TranslationEditorBundle.git
    target=/bundles/ServerGrove/Bundle/TranslationEditorBundle

Then run ./bin/vendors install, (*11)

Add ServerGrove namespace to app/autoload.php:, (*12)

$loader->registerNamespaces(array(
    ...
    'ServerGrove' => __DIR__.'/../vendor/bundles',
    ...
));

Enable it in your app/AppKernel.php (we recommend that you do it only for the dev environments), (*13)

public function registerBundles()
{
    ...

    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
        ...
        $bundles[] = new ServerGrove\Bundle\TranslationEditorBundle\ServerGroveTranslationEditorBundle();
    }

    ...
}

Configuration:

We recommend that you only enable this bundle for the development environments, so only add the configuration in config_dev.yml, (*14)

The collection parameter allows you to define the collection that will contain the translations for the project, so you can have multiple Symfony2 projects in the same mongodb server., (*15)

The mongodb parameters defines the mongodb server to connect to., (*16)

parameters:
    translation_editor.collection: mytranslations
    translation_editor.mongodb: mongodb://localhost:27017

# enable bundle extension
server_grove_translation_editor: ~

Add the routing configuration to app/config/routing_dev.yml, (*17)

SGTranslationEditorBundle:
    resource: "@ServerGroveTranslationEditorBundle/Resources/config/routing.yml"
    prefix:   /

Usage:

  1. Import translation files into mongodb, (*18)

    ./app/console locale:editor:import, (*19)

  2. Load editor in browser, edit your translations, (*20)

    http://your-project.url/translations/editor, (*21)

  3. Export changes to translation files, (*22)

    ./app/console locale:editor:export, (*23)

WARNING

PLEASE Backup your translation files before using the editor. Use a source control system like git, even svn is ok. We are not responsible for lost information., (*24)

TODO

  • Support for nested yml format
  • Support for xliff files
  • Import strings from twig files
  • Ability to edit key
  • Add Google Translate API interface
  • Add Search capabilities

Pull requests are welcome! We open sourced this bundle hoping people find it useful. Please contribute back any enhancements., (*25)

Notice: This bundle has been developed with very short time availability so it does not contain tests, comments, etc, so don't look at it to see how things are done. Instead of complaining of the ugly code, please contribute pull requests with enhancements :), (*26)

More information:

The Versions

15/08 2012

dev-master

9999999-dev http://github.com/servergrove/TranslationEditorBundle

Web based UI to manage Symfony2 translations

  Sources   Download

MIT

The Requires

 

translations symfony2 editor locale