Skip to content

Allow for missing whitelines. #4339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

clemens-tolboom
Copy link
Contributor

The Gettext specification allows for 'whitespace is optional' between message string.

For this to work PoFileLoader needs to save found messages on more places while processing. Thus a new method is introduced.

For the tests to work PoFileDumper was changed slightly to only emit white-lines when necessary.

I added more documentation from the GNU gettext documentation to make the code more understandable.

When [BUG] PoFileLoader pluralhandling uses interval instead of index. this patch needs some small rework.

(this is part of [WIP]: Allow Drupal to use Translate component)

@travisbot
Copy link

This pull request passes (merged fb6cf3e into 58b9245).

@stof
Copy link
Member

stof commented May 19, 2012

you need to rebase your branch. github tells us it cannot be merged automatically

if ($newLine) {
$output .= "\n";
}
else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CS issue here

fabpot added a commit that referenced this pull request May 19, 2012
Commits
-------

fb6cf3e Allow for missing whitelines.

Discussion
----------

Allow for missing whitelines.

The Gettext specification allows for 'whitespace is optional' between message string.

For this to work PoFileLoader needs to save found messages on more places while processing. Thus a new method is introduced.

For the tests to work PoFileDumper was changed slightly to only emit white-lines when necessary.

I added more documentation from the GNU gettext documentation to make the code more understandable.

When [[BUG] PoFileLoader pluralhandling uses interval instead of index.](#4336) this patch needs some small rework.

(this is part of [[WIP]: Allow Drupal to use Translate component)](#4249)

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

by travisbot at 2012-05-19T12:44:19Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1374295) (merged fb6cf3e into 58b9245).

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

by stof at 2012-05-19T13:19:29Z

you need to rebase your branch. github tells us it cannot be merged automatically
@fabpot fabpot merged commit fb6cf3e into symfony:master May 19, 2012
@stealth35
Copy link
Contributor

@clemens-tolboom using substr at the end should be better, on each loop you have and cond and a variable assign, (you also and a concat OP)

@clemens-tolboom
Copy link
Contributor Author

@stealth35 ic ... what should one do with a (this) closed PR?

@fabpot
Copy link
Member

fabpot commented Jul 1, 2012

@clemens-tolboom Just create a new one and reference this one.

@clemens-tolboom clemens-tolboom deleted the pofileloader-better-whitelines branch December 23, 2013 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants