mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Changed how version information is stored and displayed
This commit is contained in:
parent
5b5c272909
commit
89bae8d25e
@ -13,7 +13,9 @@ class BaseController
|
|||||||
$this->Database = $databaseService->GetDbConnection();
|
$this->Database = $databaseService->GetDbConnection();
|
||||||
|
|
||||||
$applicationService = new ApplicationService();
|
$applicationService = new ApplicationService();
|
||||||
$container->view->set('version', $applicationService->GetInstalledVersion());
|
$versionInfo = $applicationService->GetInstalledVersion();
|
||||||
|
$container->view->set('version', $versionInfo->Version);
|
||||||
|
$container->view->set('releaseDate', $versionInfo->ReleaseDate);
|
||||||
|
|
||||||
$localizationService = new LocalizationService(CULTURE);
|
$localizationService = new LocalizationService(CULTURE);
|
||||||
$container->view->set('localizationStrings', $localizationService->GetCurrentCultureLocalizations());
|
$container->view->set('localizationStrings', $localizationService->GetCurrentCultureLocalizations());
|
||||||
|
@ -161,5 +161,6 @@ return array(
|
|||||||
'#1 batteries are due to be charged within the next #2 days' => '#1 Batterien müssen in den nächsten #2 Tagen geladen werden',
|
'#1 batteries are due to be charged within the next #2 days' => '#1 Batterien müssen in den nächsten #2 Tagen geladen werden',
|
||||||
'#1 batteries are overdue to be charged' => '#1 Batterien sind überfällig',
|
'#1 batteries are overdue to be charged' => '#1 Batterien sind überfällig',
|
||||||
'#1 habits are due to be done within the next #2 days' => '#1 Gewohnheiten stehen in den nächsten #2 Tagen an',
|
'#1 habits are due to be done within the next #2 days' => '#1 Gewohnheiten stehen in den nächsten #2 Tagen an',
|
||||||
'#1 habits are overdue to be done' => '#1 Gewohnheiten sind überfällig'
|
'#1 habits are overdue to be done' => '#1 Gewohnheiten sind überfällig',
|
||||||
|
'Released on' => 'Veröffentlicht am'
|
||||||
);
|
);
|
||||||
|
@ -13,14 +13,11 @@ class ApplicationService extends BaseService
|
|||||||
}
|
}
|
||||||
|
|
||||||
private $InstalledVersion;
|
private $InstalledVersion;
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function GetInstalledVersion()
|
public function GetInstalledVersion()
|
||||||
{
|
{
|
||||||
if ($this->InstalledVersion == null)
|
if ($this->InstalledVersion == null)
|
||||||
{
|
{
|
||||||
$this->InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/../version.txt'));
|
$this->InstalledVersion = json_decode(file_get_contents(__DIR__ . '/../version.json'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->InstalledVersion;
|
return $this->InstalledVersion;
|
||||||
|
4
version.json
Normal file
4
version.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"Version": "1.10.0",
|
||||||
|
"ReleaseDate": "2018-05-12"
|
||||||
|
}
|
@ -1 +0,0 @@
|
|||||||
1.9.2
|
|
@ -86,14 +86,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
grocy is a project by
|
grocy is a project by
|
||||||
<a href="https://berrnd.de" target="_blank">Bernd Bestel</a>
|
<a href="https://berrnd.de" target="_blank">Bernd Bestel</a><br>
|
||||||
|
Created with passion since 2017<br>
|
||||||
<br>
|
<br>
|
||||||
Created with passion since 2017
|
Version {{ $version }}<br>
|
||||||
<br>
|
{{ $L('Released on') }} {{ $releaseDate }} <time class="timeago timeago-contextual" datetime="{{ $releaseDate }}"></time><br>
|
||||||
Version {{ $version }}
|
|
||||||
<br>
|
|
||||||
Life runs on code
|
|
||||||
<br>
|
<br>
|
||||||
|
Life runs on code<br>
|
||||||
<a href="https://github.com/berrnd/grocy" target="_blank">
|
<a href="https://github.com/berrnd/grocy" target="_blank">
|
||||||
<i class="fa fa-github"></i>
|
<i class="fa fa-github"></i>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user