|
5 | 5 | <img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
|
6 | 6 | alt="Get it on F-Droid"
|
7 | 7 | width="200">
|
8 |
| -</a> |
| 8 | +</a> |
9 | 9 | <a href="https://apps.apple.com/us/app/drinkable/id6480014126?itsct=apps_box_badge&itscg=30200" style="display: inline-block; overflow: hidden; border-radius: 13px; width: 250px; height: 83px;"><img src="https://tools.applemediaservices.com/api/badges/download-on-the-app-store/black/en-us?size=250x83&releaseDate=1711929600" alt="Download on the App Store" style="border-radius: 13px; width: 170px; height: 75px; padding-left: 11px;"></a>
|
10 | 10 |
|
11 | 11 | 
|
@@ -70,7 +70,72 @@ Once Android Studio launches, you can build your app through the standard Androi
|
70 | 70 |
|
71 | 71 | ## Contributing
|
72 | 72 |
|
73 |
| -### Translation |
| 73 | +### Add Ingredient |
| 74 | + |
| 75 | +Locate `src/data/ingredient-data.ts` |
| 76 | + |
| 77 | +Add ingredient to the end of the list. Example: |
| 78 | + |
| 79 | +```json |
| 80 | +{ id: '165', translation: 'chocolate-sauce', spiritType: SpiritType.None } |
| 81 | +``` |
| 82 | + |
| 83 | +Id - Id should be unique. Just add one from the previous row |
| 84 | + |
| 85 | +Translation - This is the translation key and will used in the translation files found here `src/locales/en/ingedients.json` |
| 86 | + |
| 87 | +SpiritType - Specifies what type of spirit the ingredient is. Use any of these |
| 88 | + |
| 89 | + None |
| 90 | + Gin |
| 91 | + Vodka |
| 92 | + Rum |
| 93 | + WiskeyScotch |
| 94 | + Tequila |
| 95 | + CognacBrandy |
| 96 | + |
| 97 | +### Add Cocktail |
| 98 | + |
| 99 | +Locate `src/data/cocktail-data.ts` |
| 100 | + |
| 101 | +Add cocktail to the end of the list. Example |
| 102 | + |
| 103 | +```json |
| 104 | +{ |
| 105 | + id: '191', |
| 106 | + imageSrc: 'images/salted_toffee_martini.jpg', |
| 107 | + isImagePortrait: false, |
| 108 | + translation: 'salted-toffee-martini', |
| 109 | + category: DrinkCategory.Cocktail, |
| 110 | + ingredientGroups: [ |
| 111 | + { amount: '60', ingredientId: '6', unit: Unit.ML }, |
| 112 | + { amount: '30', ingredientId: '164', unit: Unit.ML }, |
| 113 | + { amount: '15', ingredientId: '22', unit: Unit.ML }, |
| 114 | + { amount: '', ingredientId: '165', unit: '' } |
| 115 | + ], |
| 116 | + tags: [] |
| 117 | +} |
| 118 | +``` |
| 119 | + |
| 120 | +Id - Id should be unique. Just add one from the previous row |
| 121 | + |
| 122 | +ImageSrc - Where the image is located. images directory is found at `static/images/`. Add a new image if needed |
| 123 | + |
| 124 | +isImagePortrait - Set to true if image is portrait. Scales the image differntly in the app |
| 125 | + |
| 126 | +Translation - This is the translation key and will used in the translation files found here `src/locales/en/cocktails.json` and here `src/locales/en/instructions.json` |
| 127 | + |
| 128 | +Category - Specifies what cocktail category. Use any of these |
| 129 | + |
| 130 | + Cocktail |
| 131 | + Shot |
| 132 | + Other |
| 133 | + Ingredient |
| 134 | + Mocktail |
| 135 | + |
| 136 | +IngredientGroups - Specify a list of ingredients. Fill in amount ingredientId and unit. You will find the ingredients and ingredientIds in `src/data/ingredient-data.ts`. Use Metric here and the app will automatically convert to either imperial or metric. |
| 137 | + |
| 138 | +### Add Translation |
74 | 139 |
|
75 | 140 | If you want to add a new language to the app follow these steps. The best experience is to clone the repo and run the web code.
|
76 | 141 |
|
|
0 commit comments