joomla-projects/com_localise — pull request #190 by infograf768 (2014-08-13 09:18:42+00:00)
Title: Proposing core translations only when a xx-XX.xml file is present in the xx-XX folder

Make sure you have a xx-XX (or any tag of a language not installed or for which no xml has yet been created in a core folder (administrator should contain some of them as com_localise copies the languages if its folder into admin lang package).
Filter in the languages view by this language (I used here da-DK) and by administrator, make sure list is set to 20 only (because of the memory limit issue): no language should show.
Then swicth to the translations view:
It will propose all core files for xx-XX (da-DK in my test case) to translate.
This is very wrong.

Go back to languages and Purge database.
Patch with this PR.
Switch again to translations.

Test for an existing installed language AND for a language for which you have created an xml in the language view. All should be fine.

Because of code style changes, this PR looks complex, but it just checks if an xx-XX.xml exists each time we have a "foreach ($tags as $tag)"
```
foreach ($tags as $tag)
{
if (JFile::exists($path . '/' . $tag . '/' . $tag . '.xml'))
{
```
or
```
if (JFile::exists($client_folder . '/' . $tag . '/' . $tag . '.xml'))
```