Skip to content

Commit

Permalink
Merge branch '1.0' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjeev Papnoi committed Apr 17, 2020
2 parents 506826c + 808343c commit 2e0c912
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 288 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ CHANGELOG for 1.0.x

This changelog references any relevant changes introduced in 1.0 minor versions.

* 1.0.6 (2020-04-17)
* **Misc. Updates:**
* Change processing function and removed unnecessary code for speed up..

* 1.0.5 (2020-03-17)
* **Misc. Updates:**
* Added Missing translations.
Expand Down
2 changes: 1 addition & 1 deletion UIComponents/Dashboard/Homepage/Items/Articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Articles");
return "Articles";
}

public static function getRouteName() : string
Expand Down
2 changes: 1 addition & 1 deletion UIComponents/Dashboard/Homepage/Items/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Categories");
return "Categories";
}

public static function getRouteName() : string
Expand Down
2 changes: 1 addition & 1 deletion UIComponents/Dashboard/Homepage/Items/Folders.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Folders");
return "Folders";
}

public static function getRouteName() : string
Expand Down
2 changes: 1 addition & 1 deletion UIComponents/Dashboard/Homepage/Items/SpamSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Spam Settings");
return "Spam Settings";
}

public static function getRouteName() : string
Expand Down
4 changes: 2 additions & 2 deletions UIComponents/Dashboard/Homepage/Sections/Knowledgebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ class Knowledgebase extends HomepageSection
{
public static function getTitle() : string
{
return self::dynamicTranslation("Knowledgebase");
return "Knowledgebase";
}

public static function getDescription() : string
{
return self::dynamicTranslation("Knowledgebase is a source of rigid and complex information which helps Customers to help themselves");
return "Knowledgebase is a source of rigid and complex information which helps Customers to help themselves";
}

public static function getRoles() : array
Expand Down
48 changes: 1 addition & 47 deletions UIComponents/Dashboard/Navigation/Knowledgebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Knowledgebase");
return "Knowledgebase";
}

public static function getRouteName() : string
Expand All @@ -39,50 +39,4 @@ public function getChildrenRoutes() : array
{
return [];
}

public static function dynamicTranslation($data) : string
{
$request = Request::createFromGlobals();
$path = $request->getPathInfo();
$locale = explode("/", $path);
$translator = new Translator($locale[1]);

switch($locale[1])
{
case 'en':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.en.yml", 'en');
break;
case 'es':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.es.yml", 'es');
break;
case 'fr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.fr.yml", 'fr');
break;
case 'da':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.da.yml", 'da');
break;
case 'de':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.de.yml", 'de');
break;
case 'it':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.it.yml", 'it');
break;
case 'ar':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.ar.yml", 'ar');
break;
case 'tr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.tr.yml", 'tr');
break;
}

return $translator->trans($data);
}
}
48 changes: 1 addition & 47 deletions UIComponents/Dashboard/Search/Articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Articles");
return "Articles";
}

public static function getRouteName() : string
Expand All @@ -34,50 +34,4 @@ public function getChildrenRoutes() : array
{
return [];
}

public static function dynamicTranslation($data) : string
{
$request = Request::createFromGlobals();
$path = $request->getPathInfo();
$locale = explode("/", $path);
$translator = new Translator($locale[1]);

switch($locale[1])
{
case 'en':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.en.yml", 'en');
break;
case 'es':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.es.yml", 'es');
break;
case 'fr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.fr.yml", 'fr');
break;
case 'da':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.da.yml", 'da');
break;
case 'de':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.de.yml", 'de');
break;
case 'it':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.it.yml", 'it');
break;
case 'ar':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.ar.yml", 'ar');
break;
case 'tr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.tr.yml", 'tr');
break;
}

return $translator->trans($data);
}
}
48 changes: 1 addition & 47 deletions UIComponents/Dashboard/Search/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Categories");
return "Categories";
}

public static function getRouteName() : string
Expand All @@ -34,50 +34,4 @@ public function getChildrenRoutes() : array
{
return [];
}

public static function dynamicTranslation($data) : string
{
$request = Request::createFromGlobals();
$path = $request->getPathInfo();
$locale = explode("/", $path);
$translator = new Translator($locale[1]);

switch($locale[1])
{
case 'en':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.en.yml", 'en');
break;
case 'es':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.es.yml", 'es');
break;
case 'fr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.fr.yml", 'fr');
break;
case 'da':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.da.yml", 'da');
break;
case 'de':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.de.yml", 'de');
break;
case 'it':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.it.yml", 'it');
break;
case 'ar':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.ar.yml", 'ar');
break;
case 'tr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.tr.yml", 'tr');
break;
}

return $translator->trans($data);
}
}
48 changes: 1 addition & 47 deletions UIComponents/Dashboard/Search/Customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Customers");
return "Customers";
}

public static function getRouteName() : string
Expand All @@ -34,50 +34,4 @@ public function getChildrenRoutes() : array
{
return [];
}

public static function dynamicTranslation($data) : string
{
$request = Request::createFromGlobals();
$path = $request->getPathInfo();
$locale = explode("/", $path);
$translator = new Translator($locale[1]);

switch($locale[1])
{
case 'en':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.en.yml", 'en');
break;
case 'es':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.es.yml", 'es');
break;
case 'fr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.fr.yml", 'fr');
break;
case 'da':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.da.yml", 'da');
break;
case 'de':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.de.yml", 'de');
break;
case 'it':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.it.yml", 'it');
break;
case 'ar':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.ar.yml", 'ar');
break;
case 'tr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.tr.yml", 'tr');
break;
}

return $translator->trans($data);
}
}
48 changes: 1 addition & 47 deletions UIComponents/Dashboard/Search/Folders.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function getIcon() : string

public static function getTitle() : string
{
return self::dynamicTranslation("Folders");
return "Folders";
}

public static function getRouteName() : string
Expand All @@ -34,50 +34,4 @@ public function getChildrenRoutes() : array
{
return [];
}

public static function dynamicTranslation($data) : string
{
$request = Request::createFromGlobals();
$path = $request->getPathInfo();
$locale = explode("/", $path);
$translator = new Translator($locale[1]);

switch($locale[1])
{
case 'en':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.en.yml", 'en');
break;
case 'es':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.es.yml", 'es');
break;
case 'fr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.fr.yml", 'fr');
break;
case 'da':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.da.yml", 'da');
break;
case 'de':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.de.yml", 'de');
break;
case 'it':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.it.yml", 'it');
break;
case 'ar':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.ar.yml", 'ar');
break;
case 'tr':
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml',__DIR__."/../../../../../../translations/messages.tr.yml", 'tr');
break;
}

return $translator->trans($data);
}
}
Loading

0 comments on commit 2e0c912

Please sign in to comment.