mirror of
https://github.com/grocy/grocy.git
synced 2026-04-08 05:36:15 +02:00
remove acpu from localisation
This commit is contained in:
parent
e8e46f253c
commit
2666cb7a41
|
|
@ -50,39 +50,34 @@ class LocalizationService
|
||||||
{
|
{
|
||||||
$culture = $this->Culture;
|
$culture = $this->Culture;
|
||||||
|
|
||||||
if (!(apcu_exists("grocy_LocalizationService_".$culture."_Pot") &&
|
|
||||||
apcu_exists("grocy_LocalizationService_".$culture."_Po") &&
|
|
||||||
apcu_exists("grocy_LocalizationService_".$culture."_PoUserStrings") &&
|
|
||||||
apcu_exists("grocy_LocalizationService_".$culture."_PotMain")
|
|
||||||
))
|
|
||||||
{
|
|
||||||
|
|
||||||
$Pot = null;
|
$Pot = null;
|
||||||
$PotMain = null;
|
$PotMain = null;
|
||||||
|
|
||||||
if (GROCY_MODE === 'dev')
|
if (GROCY_MODE === 'dev')
|
||||||
{
|
{
|
||||||
$PotMain = Translations::fromPoFile(__DIR__ . '/../localization/strings.pot');
|
$this->PotMain = Translations::fromPoFile(__DIR__ . '/../localization/strings.pot');
|
||||||
|
|
||||||
$Pot = Translations::fromPoFile(__DIR__ . '/../localization/chore_period_types.pot');
|
$this->Pot = Translations::fromPoFile(__DIR__ . '/../localization/chore_period_types.pot');
|
||||||
$Pot = $Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/chore_assignment_types.pot'));
|
$this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/chore_assignment_types.pot'));
|
||||||
$Pot = $Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/component_translations.pot'));
|
$this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/component_translations.pot'));
|
||||||
$Pot = $Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/demo_data.pot'));
|
$this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/demo_data.pot'));
|
||||||
$Pot = $Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/stock_transaction_types.pot'));
|
$this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/stock_transaction_types.pot'));
|
||||||
$Pot = $Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/strings.pot'));
|
$this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/strings.pot'));
|
||||||
$Pot = $Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/userfield_types.pot'));
|
$this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/userfield_types.pot'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$PoUserStrings = new Translations();
|
$this->PoUserStrings = new Translations();
|
||||||
$PoUserStrings->setDomain('grocy/userstrings');
|
$this->PoUserStrings->setDomain('grocy/userstrings');
|
||||||
|
|
||||||
$Po = Translations::fromPoFile(__DIR__ . "/../localization/$culture/chore_period_types.po");
|
$this->Po = Translations::fromPoFile(__DIR__ . "/../localization/$culture/chore_period_types.po");
|
||||||
$Po = $Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/chore_assignment_types.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/chore_assignment_types.po"));
|
||||||
$Po = $Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/component_translations.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/component_translations.po"));
|
||||||
$Po = $Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/demo_data.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/demo_data.po"));
|
||||||
$Po = $Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/stock_transaction_types.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/stock_transaction_types.po"));
|
||||||
$Po = $Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/strings.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/strings.po"));
|
||||||
$Po = $Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/userfield_types.po"));
|
$this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/userfield_types.po"));
|
||||||
|
|
||||||
$quantityUnits = null;
|
$quantityUnits = null;
|
||||||
try
|
try
|
||||||
|
|
@ -105,12 +100,7 @@ class LocalizationService
|
||||||
|
|
||||||
$PoUserStrings[] = $translation;
|
$PoUserStrings[] = $translation;
|
||||||
}
|
}
|
||||||
$Po = $Po->mergeWith($PoUserStrings);
|
$this->Po = $this->Po->mergeWith($PoUserStrings);
|
||||||
}
|
|
||||||
apcu_store("grocy_LocalizationService_".$culture."_Po", $Po);
|
|
||||||
apcu_store("grocy_LocalizationService_".$culture."_Pot", $Pot);
|
|
||||||
apcu_store("grocy_LocalizationService_".$culture."_PoUserStrings", $PoUserStrings);
|
|
||||||
apcu_store("grocy_LocalizationService_".$culture."_PotMain", $PotMain);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->Pot = apcu_fetch("grocy_LocalizationService_".$culture."_Pot");
|
$this->Pot = apcu_fetch("grocy_LocalizationService_".$culture."_Pot");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user