friendica/friendica — pull request #631 by fabrixxm (2013-02-27 14:56:37+00:00)
Title: Per addon translation

Move addons translation strings out of main strings.php file to per-addon strings.php

Friendica will load strings from `view/[lang]/strings.php` and, for every enabled plugin, will load `addon/[addon name]/lang/[lang]/strings.php`.

To be translated, addons must come with a specific folder structure:

addon/
addonname/
addonname.php
lang/
[langcode]/
strings.php

`run_xgettext.sh` tool is updated to exclude addon folders when launched normally.
A new option

-a plugin_name

will run xgettext in `addon/[plugin_name]/` folder and will create `addon/[plugin_name]/lang/C/messages.po` file

This pull request come with:
- updated `run_xgettext.sh`
- update `po2php.php` script. Adds definition check to plural select function
- updated `util/messages.po` , without addons strings
- updated `view/[lang]/strings.php`, with a check for already defined plural_select_[lang] function