mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Finished migration to use gettext (this now closes #161)
This commit is contained in:
@@ -11,13 +11,13 @@ if ($db->quantity_units()->count() === 0)
|
||||
{
|
||||
// Create 2 default quantity units
|
||||
$newRow = $db->quantity_units()->createRow(array(
|
||||
'name' => $localizationService->Localize('Piece'),
|
||||
'name_plural' => $localizationService->Localize('Pieces')
|
||||
'name' => $localizationService->__n(1, 'Piece', 'Pieces'),
|
||||
'name_plural' => $localizationService->__n(2, 'Piece', 'Pieces')
|
||||
));
|
||||
$newRow->save();
|
||||
$newRow = $db->quantity_units()->createRow(array(
|
||||
'name' => $localizationService->Localize('Pack'),
|
||||
'name_plural' => $localizationService->Localize('Packs')
|
||||
'name' => $localizationService->__n(1, 'Pack', 'Packs'),
|
||||
'name_plural' => $localizationService->__n(2, 'Pack', 'Packs')
|
||||
));
|
||||
$newRow->save();
|
||||
}
|
||||
@@ -26,7 +26,7 @@ if ($db->locations()->count() === 0)
|
||||
{
|
||||
// Create a default location
|
||||
$newRow = $db->locations()->createRow(array(
|
||||
'name' => $localizationService->Localize('Fridge')
|
||||
'name' => $localizationService->__t('Fridge')
|
||||
));
|
||||
$newRow->save();
|
||||
}
|
||||
|
@@ -9,5 +9,5 @@ $db = $this->DatabaseService->GetDbConnection();
|
||||
|
||||
$defaultShoppingList = $this->Database->shopping_lists()->where('id = 1')->fetch();
|
||||
$defaultShoppingList->update(array(
|
||||
'name' => $localizationService->Localize('Shopping list')
|
||||
'name' => $localizationService->__t('Shopping list')
|
||||
));
|
||||
|
2
migrations/0067.sql
Normal file
2
migrations/0067.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE quantity_units
|
||||
ADD plural_forms TEXT;
|
Reference in New Issue
Block a user