Skip to content

Commit

Permalink
Merge branch '1-0-0' into 'main'
Browse files Browse the repository at this point in the history
1-1-0

See merge request fluxlabs/flux-eco/ui-transformer!7
  • Loading branch information
mstuder committed Apr 26, 2022
2 parents e373b79 + 9499535 commit c39b0c5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## [1.1.0]
- fix return values: success: true

## [1.0.0]
- added functional usage

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flux-eco/ui-transformer",
"description": "Component for flux-capacitor apps developed by fluxlabs ag",
"version": "1.0.0",
"version": "1.1.0",
"type": "flux-app",
"keywords": [
"flux-eco",
Expand Down
3 changes: 2 additions & 1 deletion src/Adapters/Actor/ActorClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static function new() {

public function getLanguageCode(): string {
//todo
return 'en';
return 'de';
}

}
5 changes: 2 additions & 3 deletions src/Adapters/Outbounds.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace FluxEco\UiTransformer\Adapters;

use FluxEco\UiTransformer\{Adapters, Adapters\Configs\UserInterfaceEnv, Core\Ports};
use FluxEco\UiTransformer\{Adapters, Core\Ports};

class Outbounds implements Ports\Configs\Outbounds
{
Expand Down Expand Up @@ -81,8 +81,7 @@ private function getPageDefinitions(string $path) : array
foreach ($directoryItems as $directoryNameItem) {
$itemPath = $path . "/" . $directoryNameItem;
if ($directoryNameItem === self::PAGE_SCHEMA_FILE_NAME) {
$projectionName = yaml_parse(file_get_contents($itemPath))['projectionName'];
$pageDefinitionFiles[$projectionName] = $itemPath;
$pageDefinitionFiles[pathinfo($path, PATHINFO_BASENAME)] = $itemPath;
continue;
}
if (is_dir($itemPath)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getPages() : array
{
$data = $this->userInterfaceService->getPages();
$total = count($data);
$result = ['data' => $data, 'status' => 'success', 'total' => $total];
$result = ['data' => $data, 'success' => true, 'total' => $total];
return $result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function assertTranslationExists(string $key) : void
$translationsPath = $translations;
foreach ($keyParts as $keyPart) {
if (array_key_exists($keyPart, $translationsPath) === false) {
throw new \RuntimeException('No Translation found for ' . $key . ' in ' . $this->getLanguageKey() . ' translation file');
throw new \RuntimeException('No Translation found for ' . $key);
}
$translationsPath = $translationsPath[$keyPart];
}
Expand Down

0 comments on commit c39b0c5

Please sign in to comment.