symphonycms/symphony-2 — pull request #864 by eKoeS (2011-10-24 22:35:06+00:00)
Title: Markup-less Heaven for translators

As discussed in #667 (and as a direct consequence of that issue), Nils and I agreed to make translatable strings free from any form or markup, so to make the translator's life easier.

The first purpose of this pull request is to let you see what's changed (GitHub has a pretty good diff viewer) and discuss all those cases that you would've treated differently.

The second purpose is: if we all agree, let's include that into the core.

Short summary:

### A: Strings with links

```
__('Data source updated at %1$s. Create another? View all Data sources')
```

becomes:

```
__('Data source updated at %s.', array(DateTimeObj::getTimeAgo(__SYM_TIME_FORMAT__)))
. ' '
. __('Create another?')
. ' '
. __('View all Data sources')
. ''
```

### B: Strings with code

```
__('Failed to delete %s. Please check permissions.', array($this->_context[1]))
```

becomes:

```
__('Failed to delete %s. Please check permissions.', array('' . $this->_context[1] . '')
```

### C: Strings with translatable terms wrapped into markup

```
__('Use {$param} syntax to filter by page parameters.')
```

becomes:

```
__('Use %s syntax to filter by page parameters.', array(' {' . __('$param') . '}')
```