This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Fabien Potencier e83f5f4f03 merged branch aerialls/xliff_fix (PR #3664)
Commits
-------

93d2a4f [Translation] Ignore xliff entries with no "target" node

Discussion
----------

[Translation] Ignore xliff entries with no "target" node

This PR will ignore some entries with no "target" node when a xliff file is loaded.

```xml
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file source-language="en" datatype="plaintext" original="file.ext">
    <body>
      <trans-unit id="1">
        <source>foo</source>
        <target>bar</target>
      </trans-unit>
      <trans-unit id="2">
        <source>extra</source>
      </trans-unit>
    </body>
  </file>
</xliff>
```
Before:

```php
array(
    'foo'   => 'bar',
    'extra' => ''
);
```

After:

```php
array(
    'foo' => 'bar'
);
```

---------------------------------------------------------------------------

by fabpot at 2012-03-21T17:35:51Z

Wouldn't it be better to throw an exception for such cases? A `trans-unit` without a `target` is useless anyway, no?

---------------------------------------------------------------------------

by aerialls at 2012-03-21T20:25:19Z

I'm using transifex (https://www.transifex.net/home/) and when a user doesn't translate an entry, transifex fills up a `trans-unit` node without a `target` children.
2012-03-21 22:27:33 +01:00
src/Symfony merged branch aerialls/xliff_fix (PR #3664) 2012-03-21 22:27:33 +01:00
tests merged branch aerialls/xliff_fix (PR #3664) 2012-03-21 22:27:33 +01:00
.gitignore Added vendor directory to .gitignore 2010-06-24 10:44:28 +02:00
.travis.yml also test PHP 5.3.2, since this is the official lowest supported PHP version 2011-12-26 01:15:21 +01:00
autoload.php.dist fixed code coverage raport generation 2012-03-16 15:28:27 +01:00
CHANGELOG-2.0.md updated CHANGELOG for 2.0.11 2012-02-24 22:59:05 +01:00
CHANGELOG-2.1.md [Console] Stop parsing options after encountering "--" token 2012-03-16 15:53:13 -04:00
check_cs [Check CS] don't replace 'else if' on twig files (closes #2961) 2011-12-27 16:10:32 +01:00
composer.json fixed typos in composer file 2012-03-15 11:15:25 +01:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.0.10 2012-02-06 10:49:11 +01:00
LICENSE Updated LICENSE files copyright 2012-02-22 10:10:37 +01:00
phpunit.xml.dist Ignore destructive memcached tests by default 2012-02-24 13:37:42 +01:00
README.md set travis-ci icon to master 2011-11-23 11:36:09 +01:00
resources-clean.xlf [Translation] Ignore xliff entries with no "target" node 2012-03-21 14:55:53 +01:00
UPGRADE-2.1.md Changelog and upgrading changes. 2012-03-14 21:00:04 +05:45
vendors.php fixed code coverage raport generation 2012-03-16 15:28:27 +01:00

README

Build Status

What is Symfony2?

Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Requirements

Symfony2 is only supported on PHP 5.3.2 and up.

Installation

The best way to install Symfony2 is to download the Symfony Standard Edition available at http://symfony.com/download.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony2 can help speed up your development and take the quality of your work to the next level, read the official Symfony2 documentation.

Contributing

Symfony2 is an open source, community-driven project. If you'd like to contribute, please read the Contributing Code part of the documentation. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section.