GithubHelp home page GithubHelp logo

lexik / lexiktranslationbundle Goto Github PK

View Code? Open in Web Editor NEW
413.0 32.0 252.0 2.31 MB

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.

License: MIT License

PHP 87.86% CSS 0.17% JavaScript 4.93% Twig 7.04%
symfony symfony-bundle bundle php

lexiktranslationbundle's Introduction

Overview

This Symfony bundle allows you to:

  • import translation files content into the database and provide a GUI to edit translations.
  • export translations from the database into files.
  • have an overview to check translation domains are completely translated.
  • add new translations in the database.

Build Status Latest Stable Version SensioLabsInsight

The idea is to:

  • write your translations files (xliff, yml or php) as usual for at least one language (the default language of your website for example).
  • load translations into the database by using a command line.
  • freely edit/add translation through an edition page.

The bundle overrides the translator service and provides a DatabaseLoader. Database translations content is loaded last so it overrides content from xliff, yml and php translations files. You can also export translations from the database into files in case you need to get translations files with the same content as the database.

Documentation

For installation and configuration refer to Resources/doc/index.md


Here is a little screen shot of the edition page :)

edition page screen

lexiktranslationbundle's People

Contributors

94noni avatar ahmedsamy avatar arendjantetteroo avatar bartmcleod avatar carlos-ea avatar cedric-g avatar cethy avatar ch3ric avatar cybermo avatar dinamic avatar donjohn avatar eugenekurasov avatar frne avatar garak avatar gilles-g avatar heyden7611 avatar jvasseur avatar knallcharge avatar mariosiska avatar multifinger avatar nicolasricci avatar nyholm avatar raziel057 avatar rvanlaak avatar sdieunidou avatar sergbass avatar shakaran avatar skysurfer0110 avatar toleillo avatar vworldat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lexiktranslationbundle's Issues

Incompatibility with LiipFunctionalTestBundle

As the title says, this extension does not play nice with LiipFunctionalBundle, which brings real life support for WebTestCase.
I tried by many ways to address the issue, without any luck.
Here is my stack trace:

root@nde:~/nde/site-steve/symfony/app# phpunit --group Controller
PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /root/nde/site-steve/symfony/app/phpunit.xml.dist

E

Time: 55 seconds, Memory: 49.50Mb

There was 1 error:

1) IC\Bundle\Core\GeographicalBundle\Tests\Controller\LanguageControllerTest::testLocale
PDOException: SQLSTATE[HY000]: General error: 1 no such table: lexik_trans_unit

/root/nde/site-steve/symfony/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php:618
/root/nde/site-steve/symfony/vendor/doctrine/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php:46
/root/nde/site-steve/symfony/vendor/doctrine/lib/Doctrine/ORM/Query.php:249
/root/nde/site-steve/symfony/vendor/doctrine/lib/Doctrine/ORM/AbstractQuery.php:607
/root/nde/site-steve/symfony/vendor/doctrine/lib/Doctrine/ORM/AbstractQuery.php:425
/root/nde/site-steve/symfony/vendor/bundles/Lexik/Bundle/TranslationBundle/Repository/TransUnitRepository.php:32
/root/nde/site-steve/symfony/vendor/bundles/Lexik/Bundle/TranslationBundle/Translation/Translator.php:93
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:1000
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:2080
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:60
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:1291
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/app/cache/test/appTestDebugProjectContainer.php:1307
/root/nde/site-steve/symfony/app/bootstrap.php.cache:190
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php:134
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/ContainerAwareEventDispatcher.php:116
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:98
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:71
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/HttpKernel.php:46
/root/nde/site-steve/symfony/app/bootstrap.php.cache:547
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php:82
/root/nde/site-steve/symfony/vendor/symfony/src/Symfony/Component/BrowserKit/Client.php:265
/root/nde/site-steve/symfony/src/bundle-core-geographical/IC/Bundle/Core/GeographicalBundle/Tests/Controller/LanguageControllerTest.php:28

My test case:

<?php

namespace IC\Bundle\Core\GeographicalBundle\Tests\Controller;

use Liip\FunctionalTestBundle\Test\WebTestCase;

/**
 * @group Controller
 */
class LanguageControllerTest extends WebTestCase
{
    public function setUp()
    {
        parent::setUp();

        $this->loadFixtures(array());
    }

    public function testLocale()
    {
        $client = static::createClient();

        $client->setServerParameter('Referer', '/foo');
        $client->followRedirects(false);

        $client->request('GET', '/language/en');

        $this->assertEquals('/foo', $client->getResponse()->getHeader('Location'));
    }
}

routing prefix

Currently if one choose prefix 'translator' the functionality will be available at the '/translator/translation/grid' uri. I think this is not correct as additional prefix is being applied there.

IMHO the routing prefix defined at the app/config/routing_dev.yml should be the only prefix the bundle uses. This mean that if I choose 'translator' as the prefix, the functionality should be available at '/translator/grid' uri.

Furthermore, the "/grid" part could be removed and use only "/translator".

Any thoughts on these changes?

ISO "ID" replace ID Column

Hello,

When a "managed_locale" is equivalent to "ID" (for indonesia), the back-office no longer works (save button doesn't work, and the first column "ID" no longer displays the keys, but the translations for this language).

So I cannot use this ISO code without changing vendor behaviour? Or can you do something?

If you have a donation platform, my customer is willing to do it ;)

Keeping all translations synchronized

What are the best practices for keeping translations synchronized between all environments?

I have used this bundle to allow copywriter to correct existing and add missing translations on PROD site. How would you suggest to keep PROD/TEST/DEV environment translations in sync?

Lets suppose that PROD env will have correct texts, TEST will not matter and DEV can have new keys/domains etc.

Should I export PROD translations to files just before deploy. Merge them with DEV translations and do IMPORT from files to DB once Ill deploy?

Is there any simpler method?
How do you work with your translations across multiple domains/databases?

Import fails when two keys have the same value in different case

When trying to import the files in db with the import task, I've the following message :

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Groups-SonataUserBundle' for key 'key_domain_idx'

It's because the SonataUserBundle translation file has two same keys with different case : "Groups" and "groups".

The constrainst reject the insertion.

Adding a new translation in Xliff file

Hello,

I already have a app/Resources/translations/messages.en.xliff file.
When I tried to add a new translation through the backend, it was automatically added to a new messages.en.yml file.

It would be a good thing to add new translations to existing file as a first choice.
And if this file does not exist, to a new one with yml extension by default if you want.

Regards,

Class not found in Symfony 2.5.2

After installing the bundle with composer and registering it in AppKernel.php, I get the following error when I try to update de database schema:

MappingException: The class 'Lexik\Bundle\TranslationBundle\Entity\TransUnit' was not found in the chain configured namespaces...

I'm using 1.4 branch. Any ideas?

textarea instead of input type text?

Hello,

I'm using your translation bundle.
But I have translations that have multiple lines.
With , we lose the information about lines.

Is it possible to have <textarea> instead?

Thanks for the bundle though =)

Claude

Symfony 2.2 support

Within the current stable version only symfony 2.1.* is supported.

Symfony 2.2 stable has been around for a while.

Propel datagrid search

It seems to be impossible to search translations by domain or key. Is this functionality working for anybody? Or am I missing something?

Search returns the same data as I would not use any string in domain or key input field. Searching in translation columns is working fine.

Label translation in Form

After installing this bundle, I was able to display the translated texts in twig but I can not display the translated labels of forms.
Do you know this problem ?
For eg:

{% trans_default_domain "customer_registration" %}
{% extends 'MySiteBundle::base.html.twig' %}

{% block title %}{{ parent() }} - {{'contact_page.title.text'|trans }} {% endblock %}

{% block content_body %}
<div class="padding">
    <form action="{{ path('my_route') }}" method="post" {{ form_enctype(form) }} id="customer-registration-form">
        {{ form_errors(form) }}

        {{ form_label(form.companyName) }} {{ form_widget(form.companyName) }}
        {{ form_label(form.adress) }} {{ form_widget(form.adress) }}
        {{ form_label(form.postalCode) }} {{ form_widget(form.postalCode) }}
        {{ form_label(form.city) }} {{ form_widget(form.city) }}
        {{ form_label(form.contactPersonName) }} {{ form_widget(form.contactPersonName) }}
        {{ form_label(form.tel) }} {{ form_widget(form.tel) }}
        {{ form_label(form.email) }} {{ form_widget(form.email) }}
        {{ form_label(form.vatNumber) }} {{ form_widget(form.vatNumber) }}

        {{ form_rest(form) }}

        <input type="submit" value="Submit" />
    </form>
</div>
{% endblock %}

Windows support

While trying to import existing translations into the database I noticed that the filepath was not correct.

real path:

D:\projects\mysite\tags\2.0\src\My\SiteBundle\Resources\translations

path inserted:

..\D:projectsmysitetags2.0srcMySiteBundle/Resources/translations

Note: I'm using Windows 7 if that matters.

[Feature request] Deploying the bundle in dev environment only

I've made some minor changes on the bundle to be able to run the bundle in development environment only.
The changes are pretty much only assets management in the twig-files... No backwards compatibility breaks.

Is there any interest to have me write documentation that and make a PR with the changes?

Installation problem with symfony 2.4.2

the command php composer.phar update lexik/translation-bundle

outputs

Problem 1
- Installation request for lexik/translation-bundle v1.4.0 -> satisfiable by lexik/translation-bundle[v1.4.0].
- Conclusion: remove symfony/symfony v2.4.2
- lexik/translation-bundle v1.4.0 requires symfony/framework-bundle >=2.1,<2.3-dev -> satisfiable by symfony/framework-bundle[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9]

Is there any way to install LexikTranslationBundle with symfony 2.4.2?

Thx

Pagination - Number rows per page

Hi everybody,

Is there a way to change the number of rows per page? There is no parameter to change it.
The only way to do this is to override the bundle?

Thanks

Editing a row disabled when escaping

In the backend, when you edit a row, then press ESC to cancel changes, and try to edit it again : the edition seems to be disabled.
I have to edit another row, and go back to the one I want to edit.

Compatibility with Symfony 2.1

I'm trying to setup LexikTranslationBundle with Symfony 2.1 (dev-master) and I always get the following exception:

 ErrorException: Warning: Invalid argument supplied for foreach() in /myapp/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php line 145

142. protected function initialize()
143. {
144.     foreach ($this->loaderIds as $id => $aliases) {
145.         foreach ($aliases as $alias) {
146.             $this->addLoader($alias, $this->container->get($id));
147.         }
148.     }
149. }

Here's the full stack trace

My code is working without problems when using translation from files.

The problem only manifests itself when rendering templates (I am able to access /translation/list) so I'm guessing this isn't some mis-configuration on my side. I looked into the code but I couldn't find out what the loaderIds array represents nor when it is populated.

Any ideas on what might be going on here? If you point me in the right direction and I'm able to fix it, I can create a PR to add compatibility with Symfony 2.1.

Absolute path stored

When importing translations from files, the full path is stored in the lexik_translation_file table:

2, validators, fr_FR, xliff, /home/dalexandre/Dev/PoniesPukeRainbows/FrontBundle/Resources/translations,b9db3a6402c21b242a751dba85f1a401

I think this is not a good idea to store an absolute path, maybe I want to work on my translation localy and then share my DB with the prod or with my co-workers.

Thx to %kernel.root_dir%, it could be possible to store only a relative path?

Blue "Register" button frozen

Hi !!

I'm end user. My developper is "fsanter" on depot_fadou.

Sometime Lexik record ok but far from 3 days, it dont want.

After clear_cache, I think they are 3 ways to records

  1. Double clic a box, change and double clic once more.
  2. Double clic, change one or more on the same row. Clic Blue "Register" button.
  3. Double clic, change one or more on the same row may be another column. Clic all Blue "Register" button.

Wrong or OK ?

Anyway : sometimes record, sometimes dont want.
Nothing recorded far from 2 days.
Seems like a synchronization problem, such as cache .. I dont know.

My config is HP Pavillion Windows_7 adsl to www.fadou.com.
Same with ACER 5220 windows_XP

Today unable to record nothing, blue button always frozen.

Lexik is a great tool.
I'll try to use it for 45 languanges on the same grid.

Best reg.
Pat.

2 week ago we had "ID" problem with an "ID" language index

Working with windows environement

When working under windows OS (we have our reasons... called unity :x) the path folder parsing can sometimes go wild...

function getFileRelativePath of FileManager.php
if $filePath is windows formatted the explode('/', $filePath) can't work

i wrote
$filePathParts = explode('/', preg_replace('#\\#','/',$filePath));

to quick fix my case but i guess a clean pathname type detection could be much better :)

(i wrote in english but I can explain in french if needed)

Database loader problem

When we want to update your bundle, composer tell something about symfony/icu
After updating everything, it seems that the database loader is not called anymore
And the only locale that is used is the default 'en'

screen

Add translations to cache files

Hi there,

I created 2 controller actions to import and export the translations files from the interface. I only want to manage the app translations so it executes this import : lexik:translations:import -g and the export without argument/options

I'm having trouble when adding new translation as it creates them in the cache files instead of in the app/Resources/translation files

Here is the DB before creating a key
image

Here is after :
image

and the new keys :
image

Can't override manually your translator service for tests env

Hi,

For Behat tests suite, i'm used to disable every translation to run my tests against keys instead of translated string.

To do that, i'm overloading the translator class in the config_test.yml with:

parameters:
    translator.class: 'FQCN\Of\My\CustomTranslatorService\WhoDoesntTranslate'

Right after clearing the cache and dumping the container, I got this :

 translator         |  n/a          |  alias for "lexik_translation.translator"                                                   
 translator.default | container | FQCN\Of\My\CustomTranslatorService\WhoDoesntTranslate

The problem here is that your service is always used even if the default is set.

I can't find any option to disable your bundle via the config ( https://github.com/lexik/LexikTranslationBundle/blob/master/DependencyInjection/Configuration.php#L21 ).

What's the solution please ?

Silex Question

Hi Cedric

How can use your bundle in Silex? Is this posible making any changes?

Thanks

UI toggle all locales with one checkbox

Hi,

Just want to know if a feature than toggle all locales columns with one checkbox could be useful here ?

fyi, we use this bundles with more than 20 locales (en, en_GB, en_US, etc etc) and checking/unchecking all those locales is so boring :)

thanks

ng-Table Missing ng-table.map file

Hello.

I did a fresh install of this bundle. Everything is working great, but I think that ng-table.map file is missing at Resources/public/ng-table/ directory.
bundles/lexiktranslation/ng-table/ng-table.map 404 (Not Found)

BTW this file was oryginally missing at ngTable repo and was fixed by esvit/ng-table#8

textareas in editing ui

The user interface of translations texts should use textareas instead of simple input texts, otherwise it's impossible to insert newlines.

exception on doctrine:schema:update

[Doctrine\DBAL\DBALException]
An exception occurred while executing 'ALTER TABLE lexik_trans_unit_translations ADD CONSTRAINT FK_B0AA394493CB796C FOREIGN KEY (file_id) REFERENCES lexik_translation_file (id)'

I deleted all lexik tables and ran the command doctrine: schema:update again… same…

any idea?

Button "invalidate cache" dont work

Hello,

I have a strange issue on branch 1.4.4
After click on the button "invalidate cache", it appear that json files (/i18n/front/fr.json) is not regenerated.
Is there a way to do that ?

thanks

[usability] paginator stays on bottom

In the translation grid, when you click on paginator links, you stay on the bottom of page. So, user can't be aware that page changed. After page refreshed via ajax, user should be pointed to an anchor in the top of the grid.
Of course, this happens only if you got enough translations to scroll your page (but I think this case happens most of times)

Bundle on a specific server

Hi,

Your bundle is just what I'm looking for, and it works perfectly great.

But I actually want to have it only on a specific server (reserved for translating) and not on a prod server (on which I just want the exported translations file from your bundle's export command). Both server are running the same application.

I've successfully tried to extends your controllers so that on the prod server, I have a 403 (depending on the value of a parameter).
But it still used the database translation loader (and so none of my translations files are used).

So is there a way to disabled your bundle only on a specific server?

Many thanks,

Incorrect domain after import

After using lexik:translations:import without arguments all the translations were added to the interface, including the ones from the vendors folder, the domain shown at the interface does not seem right to me.

The domain of the translations can be one of the following:

  • messages
  • validators
  • etc

The translation domains I'm shown at the interface are the names of the bundles from where they were imported. This does not seem right, because it has no value of informing the translator whether the given text is a validator error or a simple message.

The domain for my bundles are correctly shown. This ticket is for importing the translations from the bundles inside the vendors folder.

how to?

create a new domain?

add a language?

does it necessarily have to be managed through import or can it be made by editing the grid or new page?

Thx

cache:warmup on linux requires mongodb?

I don't have mongodb installed, nor do I need it. Everything is stored within the mysql database.
I have configured PHPCR as I'm trying out the symfony-cmf.

Consider the following output:

windows 7:

D:\vagrant\vms\pwn\projects\mysite\tags\2.0>php app\console cache:warmup -e=prod --no-debug
Warming up the cache for the prod environment with debug false

vagrant box running ubuntu:

vagrant@precise32:/vagrant/projects/mysite/tags/2.0$ php app/console cache:warmup -e=prod --no-debug
PHP Fatal error:  Class 'Doctrine\ODM\MongoDB\DocumentRepository' not found in /vagrant/projects/mysite/tags/2.0/vendor/lexik/translation-bundle/Lexik/Bundle/TranslationBundle/Document/FileRepository.php on line 13

Here's the stack generated by capifony while trying to issue deployment:

PHP Fatal error:  Class 'Doctrine\ODM\MongoDB\DocumentRepository' not found in /home/mysite/v2/shared/vendor/lexik/translation-bundle/Lexik/Bundle/TranslationBundle/Document/TransUnitRepository.php on line 16
PHP Stack trace:
PHP   1. {main}() /home/mysite/v2/releases/20130415130816/app/console:0
PHP   2. Symfony\Component\Console\Application->run($input = class Symfony\Component\Console\Input\ArgvInput { private $tokens = array (0 => 'cache:warmup', 1 => '-e=prod', 2 => '--no-debug'); private $parsed = NULL; protected $definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = array (...); private $requiredCount = 0; private $hasAnArrayArgument = FALSE; private $hasOptional = FALSE; private $options = array (...); private $shortcuts = array (...) }; protected $options = array (); protected $arguments = array (); protected $interactive = TRUE }, $output = *uninitialized*) /home/mysite/v2/releases/20130415130816/app/console:22
PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun($input = class Symfony\Component\Console\Input\ArgvInput { private $tokens = array (0 => 'cache:warmup', 1 => '-e=prod', 2 => '--no-debug'); private $parsed = NULL; protected $definition = class Symfony\Component\Console\Input\InputDefinition { private $arguments = array (...); private $requiredCount = 0; private $hasAnArrayArgument = FALSE; private $hasOptional = FALSE; private $options = array (...); private $shortcuts = array (...) }; protected $options = array (); protected $arguments = array (); protected $interactive = TRUE }, $output = class Symfony\Component\Console\Output\ConsoleOutput { private $stderr = class Symfony\Component\Console\Output\StreamOutput { private $stream = resource(46) of type (stream); private ${Symfony\Component\Console\Output\Output}:verbosity = 1; private ${Symfony\Component\Console\Output\Output}:formatter = class Symfony\Component\Console\Formatter\OutputFormatter { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}:stream = resource(40) of type (stream); private ${Symfony\Component\Console\Output\Output}:verbosity = 1; private ${Symfony\Component\Console\Output\Output}:formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private $decorated = TRUE; private $styles = array (...); private $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } } }) /home/mysite/v2/shared/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:106
PHP   4. Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() /home/mysite/v2/shared/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:68
PHP   5. Symfony\Component\HttpKernel\Kernel->boot() /home/mysite/v2/shared/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:83
PHP   6. Symfony\Component\HttpKernel\Kernel->initializeContainer() /home/mysite/v2/releases/20130415130816/app/bootstrap.php.cache:378
PHP   7. Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp($cacheDir = '/home/mysite/v2/releases/20130415130816/app/cache/prod') /home/mysite/v2/releases/20130415130816/app/bootstrap.php.cache:601
PHP   8. Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer->warmUp($cacheDir = '/home/mysite/v2/releases/20130415130816/app/cache/prod') /home/mysite/v2/shared/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php:47
PHP   9. Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getAllMetadata() /home/mysite/v2/shared/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php:69
PHP  10. Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain->getAllClassNames() /home/mysite/v2/shared/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:111
PHP  11. Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver->getAllClassNames() /home/mysite/v2/shared/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php:132
PHP  12. require_once() /home/mysite/v2/shared/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php:194
    command finished in 8635ms

Missing ng-table.map

Wouldn't it be better to propose using the 'dev-master' version in the readme, since everyone new to this bundle will have to face the issue of a missing ng-table.map file using version '~2.0'.

Although it's not really a bug, it is annoying.

Handle Http "&" special character inside the translations

We have a very annoying problem :

When you do a translation that contain the "&" character and you save, the text which come after is deleted ! for example:

When you save this translation:
"plop plop & BLOB"

Translation saved on the database will be as follows:
"plop plop"

The "& BLOB" is deleted

This happens because of the Http Request considers that the text "BLOB" is a new variable because of the "&" is a variable separator in Http.

We have put a temporary solution that replaces all the "&" in real time (on JavaScript KeyUp) by a defined key (eg: ##AND##) and replace it with the true value on the server side.

We can improve this solution and include it in the Angular app to always scroll the contents of the translation and replace special characters just before send it to the server.

[export] checking if translation is from vendore is not working properly

Hello,

I've found that in Command/ExportTranslationsCommand.php, the way you check if the translation is from a vendor, is not working properly.

I replaced line89 by:
$onlyUpdated = false !== strpos($file->getPath(), 'vendor/');

And line 99 by:
$outputPath = false !== strpos($file->getPath(), 'vendor/') ? sprintf('%s/Resources/translations', $rootDir) : sprintf('%s/%s', $rootDir, $file->getPath());

And now it's working properly.

Best regards.
Claude

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.