diff --git a/README.md b/README.md
index 13ba48366..b6c1ee71a 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
-You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.5) with **ALL** its features and **ALL** concepts totally open-source and free!
+You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.6) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@@ -127,12 +127,12 @@ Component Builder is mapped as a component in itself on my local development env
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015
+ *Last Build*: 19th April, 2018
-+ *Version*: 2.7.5
++ *Version*: 2.7.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
-+ *Line count*: **183282**
++ *Line count*: **183307**
+ *Field count*: **1013**
-+ *File count*: **1199**
++ *File count*: **1200**
+ *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
diff --git a/admin/README.txt b/admin/README.txt
index 13ba48366..b6c1ee71a 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
-You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.5) with **ALL** its features and **ALL** concepts totally open-source and free!
+You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.7.6) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@@ -127,12 +127,12 @@ Component Builder is mapped as a component in itself on my local development env
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015
+ *Last Build*: 19th April, 2018
-+ *Version*: 2.7.5
++ *Version*: 2.7.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
-+ *Line count*: **183282**
++ *Line count*: **183307**
+ *Field count*: **1013**
-+ *File count*: **1199**
++ *File count*: **1200**
+ *Folder count*: **193**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php
index 9c0e3df60..b9c17d696 100644
--- a/admin/helpers/compiler/a_Get.php
+++ b/admin/helpers/compiler/a_Get.php
@@ -204,7 +204,14 @@ class Get
*
* @var array
*/
- public $languages = array('en-GB' => array());
+ public $languages = array();
+
+ /**
+ * The Main Languages
+ *
+ * @var string
+ */
+ public $langTag = 'en-GB';
/**
* The Multi Languages bucket
@@ -642,6 +649,10 @@ class Get
$this->params = JComponentHelper::getParams('com_componentbuilder');
// set the minfy switch of the JavaScript
$this->minify = (isset($config['minify']) && $config['minify'] != 2) ? $config['minify'] : $this->params->get('minify', 0);
+ // set the global language
+ $this->langTag = $this->params->get('language', $this->langTag);
+ // setup the main language array
+ $this->languages[$this->langTag] = array();
// check if we have Tidy enabled
$this->tidy = extension_loaded('Tidy');
// set the field type builder
@@ -4516,8 +4527,8 @@ class Get
$query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a'));
if (ComponentbuilderHelper::checkArray($values))
{
- $query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.entranslation', 'a.components', 'a.published')));
- $query->where($this->db->quoteName('a.entranslation') . ' IN (' . implode(',', array_map(function($a)
+ $query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.source', 'a.components', 'a.published')));
+ $query->where($this->db->quoteName('a.source') . ' IN (' . implode(',', array_map(function($a)
{
return $this->db->quote($a);
}, $values)) . ')');
@@ -4525,7 +4536,7 @@ class Get
$this->db->execute();
if ($this->db->getNumRows())
{
- return $this->db->loadAssocList('entranslation');
+ return $this->db->loadAssocList('source');
}
}
return false;
@@ -4543,7 +4554,7 @@ class Get
$counterInsert = 0;
$counterUpdate = 0;
$today = JFactory::getDate()->toSql();
- foreach ($this->languages['en-GB'] as $area => $placeholders)
+ foreach ($this->languages[$this->langTag] as $area => $placeholders)
{
foreach ($placeholders as $placeholder => $string)
{
@@ -4630,7 +4641,7 @@ class Get
// add the new lang placeholder to the db
$this->newLangStrings[$counterInsert] = array();
$this->newLangStrings[$counterInsert][] = $this->db->quote(json_encode(array($this->componentID))); // 'components'
- $this->newLangStrings[$counterInsert][] = $this->db->quote($string); // 'entranslation'
+ $this->newLangStrings[$counterInsert][] = $this->db->quote($string); // 'source'
$this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'published'
$this->newLangStrings[$counterInsert][] = $this->db->quote($today); // 'created'
$this->newLangStrings[$counterInsert][] = $this->db->quote((int) $this->user->id); // 'created_by'
@@ -4668,7 +4679,7 @@ class Get
$query = $this->db->getQuery(true);
$continue = false;
// Insert columns.
- $columns = array('components', 'entranslation', 'published', 'created', 'created_by', 'version', 'access');
+ $columns = array('components', 'source', 'published', 'created', 'created_by', 'version', 'access');
// Prepare the insert query.
$query->insert($this->db->quoteName('#__componentbuilder_language_translation'));
$query->columns($this->db->quoteName($columns));
@@ -4763,7 +4774,7 @@ class Get
$query->from($this->db->quoteName('#__componentbuilder_language_translation', 'a'));
$query->select($this->db->quoteName(array('a.id', 'a.translation', 'a.components')));
// get all string that are not linked to this component
- $query->where($this->db->quoteName('a.entranslation') . ' NOT IN (' . implode(',', array_map(function($a)
+ $query->where($this->db->quoteName('a.source') . ' NOT IN (' . implode(',', array_map(function($a)
{
return $this->db->quote($a);
}, $values)) . ')');
diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php
index e6991f340..4ae4c32a7 100644
--- a/admin/helpers/compiler/e_Interpretation.php
+++ b/admin/helpers/compiler/e_Interpretation.php
@@ -1270,7 +1270,7 @@ class Interpretation extends Fields
$method[] = "\t\t\$lang = JFactory::getLanguage();";
$method[] = "\t\t\$extension = 'com_users';";
$method[] = "\t\t\$base_dir = JPATH_SITE;";
- $method[] = "\t\t\$language_tag = 'en-GB';";
+ $method[] = "\t\t\$language_tag = '".$this->langTag."';";
$method[] = "\t\t\$reload = true;";
$method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " load the user regestration model";
@@ -1351,7 +1351,7 @@ class Interpretation extends Fields
$method[] = "\t\t\$lang = JFactory::getLanguage();";
$method[] = "\t\t\$extension = 'com_users';";
$method[] = "\t\t\$base_dir = JPATH_ADMINISTRATOR;";
- $method[] = "\t\t\$language_tag = 'en-GB';";
+ $method[] = "\t\t\$language_tag = '".$this->langTag."';";
$method[] = "\t\t\$reload = true;";
$method[] = "\t\t\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
$method[] = "\t\t// load the user model";
@@ -6092,7 +6092,7 @@ class Interpretation extends Fields
{
ksort($this->langContent['admin']);
// load to global languages
- $this->languages['en-GB']['admin'] = $this->langContent['admin'];
+ $this->languages[$this->langTag]['admin'] = $this->langContent['admin'];
// remove tmp array
unset($this->langContent['admin']);
@@ -6145,7 +6145,7 @@ class Interpretation extends Fields
{
ksort($this->langContent['site']);
// load to global languages
- $this->languages['en-GB']['site'] = $this->langContent['site'];
+ $this->languages[$this->langTag]['site'] = $this->langContent['site'];
// remove tmp array
unset($this->langContent['site']);
@@ -6173,7 +6173,7 @@ class Interpretation extends Fields
{
ksort($this->langContent['sitesys']);
// load to global languages
- $this->languages['en-GB']['sitesys'] = $this->langContent['sitesys'];
+ $this->languages[$this->langTag]['sitesys'] = $this->langContent['sitesys'];
// remove tmp array
unset($this->langContent['sitesys']);
@@ -6196,7 +6196,7 @@ class Interpretation extends Fields
{
ksort($this->langContent['adminsys']);
// load to global languages
- $this->languages['en-GB']['adminsys'] = $this->langContent['adminsys'];
+ $this->languages[$this->langTag]['adminsys'] = $this->langContent['adminsys'];
// remove tmp array
unset($this->langContent['adminsys']);
diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php
index ee6805652..a5bfa1b87 100644
--- a/admin/helpers/compiler/f_Infusion.php
+++ b/admin/helpers/compiler/f_Infusion.php
@@ -1078,26 +1078,26 @@ class Infusion extends Interpretation
// check the admin lang is set
if ($this->setLangAdmin())
{
- $values[] = array_values($this->languages['en-GB']['admin']);
- $mainLangLoader['admin'] = count($this->languages['en-GB']['admin']);
+ $values[] = array_values($this->languages[$this->langTag]['admin']);
+ $mainLangLoader['admin'] = count($this->languages[$this->langTag]['admin']);
}
// check the admin system lang is set
if ($this->setLangAdminSys())
{
- $values[] = array_values($this->languages['en-GB']['adminsys']);
- $mainLangLoader['adminsys'] = count($this->languages['en-GB']['adminsys']);
+ $values[] = array_values($this->languages[$this->langTag]['adminsys']);
+ $mainLangLoader['adminsys'] = count($this->languages[$this->langTag]['adminsys']);
}
// check the site lang is set
if (!$this->removeSiteFolder && $this->setLangSite())
{
- $values[] = array_values($this->languages['en-GB']['site']);
- $mainLangLoader['site'] = count($this->languages['en-GB']['site']);
+ $values[] = array_values($this->languages[$this->langTag]['site']);
+ $mainLangLoader['site'] = count($this->languages[$this->langTag]['site']);
}
// check the site system lang is set
if (!$this->removeSiteFolder && $this->setLangSiteSys())
{
- $values[] = array_values($this->languages['en-GB']['sitesys']);
- $mainLangLoader['sitesys'] = count($this->languages['en-GB']['sitesys']);
+ $values[] = array_values($this->languages[$this->langTag]['sitesys']);
+ $mainLangLoader['sitesys'] = count($this->languages[$this->langTag]['sitesys']);
}
$values = array_unique(ComponentbuilderHelper::mergeArrays($values));
// get the other lang strings if there is any
@@ -1118,8 +1118,8 @@ class Infusion extends Interpretation
$tag = trim($tag);
foreach ($areas as $area => $languageStrings)
{
- // only log messages for none en-GB translations
- if ('en-GB' !== $tag)
+ // only log messages for none $this->langTag translations
+ if ($this->langTag !== $tag)
{
$langStringNr = count($languageStrings);
$langStringSum = $this->bcmath('mul', $langStringNr, 100);
@@ -1132,12 +1132,12 @@ class Infusion extends Interpretation
if ($percentage < $this->percentageLanguageAdd)
{
// dont add
- $this->langNot[$area . ' ' . $tag] = '' . $mainLangLoader[$area] . '(total en-GB strings) only ' . $langStringNr . '' . $stringNAme . ' = ' . $percentage;
+ $this->langNot[$area . ' ' . $tag] = '' . $mainLangLoader[$area] . '(total '.$this->langTag.' strings) only ' . $langStringNr . '' . $stringNAme . ' = ' . $percentage;
continue;
}
}
// show if it was added as well
- $this->langSet[$area . ' ' . $tag] = '' . $mainLangLoader[$area] . '(total en-GB strings) and ' . $langStringNr . '' . $stringNAme . ' = ' . $percentage;
+ $this->langSet[$area . ' ' . $tag] = '' . $mainLangLoader[$area] . '(total '.$this->langTag.' strings) and ' . $langStringNr . '' . $stringNAme . ' = ' . $percentage;
}
// set naming convention
$p = 'admin';
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index c9e95f13d..2e118ab76 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -4786,10 +4786,6 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_CREATED_DATE_DESC="The date this Langu
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_DETAILS="Details"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_EDIT="Editing the Language Translation"
-COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION="Entranslation"
-COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_HINT="Automatically generated!"
-COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL="English String"
-COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_MESSAGE="Error! Please English translated string here."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ERROR_UNIQUE_ALIAS="Another Language Translation has the same alias."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ID="Id"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_LANGUAGE="Language"
@@ -4803,6 +4799,10 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PERMISSION="Permissions"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Language Translation to customise the alias."
+COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE="Source"
+COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_HINT="Automatically generated!"
+COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL="Source String"
+COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_MESSAGE="Error! Please source translated string here."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_STATUS="Status"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION="Translation"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION="The translation strings."
diff --git a/admin/layouts/language_translation/details_fullwidth.php b/admin/layouts/language_translation/details_fullwidth.php
index ab232d359..7d8bcca3f 100644
--- a/admin/layouts/language_translation/details_fullwidth.php
+++ b/admin/layouts/language_translation/details_fullwidth.php
@@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
- 'entranslation',
+ 'source',
'translation',
'components'
);
diff --git a/admin/models/forms/language_translation.xml b/admin/models/forms/language_translation.xml
index 49080cd7a..8cf765254 100644
--- a/admin/models/forms/language_translation.xml
+++ b/admin/models/forms/language_translation.xml
@@ -85,18 +85,18 @@
filter="unset"
/>
-
+
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml
index 004a44475..e6e3ef180 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -339,4 +339,21 @@