mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Add pluralization of demo and default quantity units
This commit is contained in:
@@ -224,11 +224,17 @@ return array(
|
||||
'Tinned food cupboard' => 'Konservenschrank',
|
||||
'Fridge' => 'Kühlschrank',
|
||||
'Piece' => 'Stück',
|
||||
'Pieces' => 'Stücke',
|
||||
'Pack' => 'Packung',
|
||||
'Packs' => 'Packungen',
|
||||
'Glass' => 'Glas',
|
||||
'Glasses' => 'Gläser',
|
||||
'Tin' => 'Dose',
|
||||
'Tins' => 'Dosen',
|
||||
'Can' => 'Becher',
|
||||
'Cans' => 'Becher',
|
||||
'Bunch' => 'Bund',
|
||||
'Bunches' => 'Bunde',
|
||||
'Gummy bears' => 'Gummibärchen',
|
||||
'Crisps' => 'Chips',
|
||||
'Eggs' => 'Eier',
|
||||
|
@@ -159,11 +159,17 @@ return array(
|
||||
'Tinned food cupboard' => 'Konservenschrank',
|
||||
'Fridge' => 'Kühlschrank',
|
||||
'Piece' => 'Pezzo',
|
||||
'Pieces' => 'Pezzi',
|
||||
'Pack' => 'Pacco',
|
||||
'Packs' => 'Pacchi',
|
||||
'Glass' => 'Bicchiere',
|
||||
'Glasses' => 'Bicchieri',
|
||||
'Tin' => 'Scatola',
|
||||
'Tins' => 'Scatole',
|
||||
'Can' => 'Lattina',
|
||||
'Cans' => 'Lattine',
|
||||
'Bunch' => 'Cespo',
|
||||
'Bunches' => 'Cespi',
|
||||
'Gummy bears' => 'Caramelle',
|
||||
'Crisps' => 'Patatine',
|
||||
'Eggs' => 'Uova',
|
||||
|
@@ -11,11 +11,13 @@ if ($db->quantity_units()->count() === 0)
|
||||
{
|
||||
// Create 2 default quantity units
|
||||
$newRow = $db->quantity_units()->createRow(array(
|
||||
'name' => $localizationService->Localize('Piece')
|
||||
'name' => $localizationService->Localize('Piece'),
|
||||
'name_plural' => $localizationService->Localize('Pieces')
|
||||
));
|
||||
$newRow->save();
|
||||
$newRow = $db->quantity_units()->createRow(array(
|
||||
'name' => $localizationService->Localize('Pack')
|
||||
'name' => $localizationService->Localize('Pack'),
|
||||
'name_plural' => $localizationService->Localize('Packs')
|
||||
));
|
||||
$newRow->save();
|
||||
}
|
||||
|
@@ -25,10 +25,10 @@ class DemoDataGeneratorService extends BaseService
|
||||
INSERT INTO locations (name) VALUES ('{$localizationService->Localize('Candy cupboard')}'); --3
|
||||
INSERT INTO locations (name) VALUES ('{$localizationService->Localize('Tinned food cupboard')}'); --4
|
||||
|
||||
INSERT INTO quantity_units (name) VALUES ('{$localizationService->Localize('Glass')}'); --4
|
||||
INSERT INTO quantity_units (name) VALUES ('{$localizationService->Localize('Tin')}'); --5
|
||||
INSERT INTO quantity_units (name) VALUES ('{$localizationService->Localize('Can')}'); --6
|
||||
INSERT INTO quantity_units (name) VALUES ('{$localizationService->Localize('Bunch')}'); --7
|
||||
INSERT INTO quantity_units (name, name_plural) VALUES ('{$localizationService->Localize('Glass')}', '{$localizationService->Localize('Glasses')}'); --4
|
||||
INSERT INTO quantity_units (name, name_plural) VALUES ('{$localizationService->Localize('Tin')}', '{$localizationService->Localize('Tins')}'); --5
|
||||
INSERT INTO quantity_units (name, name_plural) VALUES ('{$localizationService->Localize('Can')}', '{$localizationService->Localize('Cans')}'); --6
|
||||
INSERT INTO quantity_units (name, name_plural) VALUES ('{$localizationService->Localize('Bunch')}', '{$localizationService->Localize('Bunches')}'); --7
|
||||
|
||||
DELETE FROM sqlite_sequence WHERE name = 'products'; --Just to keep IDs in order as mentioned here...
|
||||
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock, min_stock_amount) VALUES ('{$localizationService->Localize('Cookies')}', 3, 3, 3, 1, 8); --1
|
||||
|
Reference in New Issue
Block a user