From 1d2eaca2d313ce69ab0324b405399d85aaec1764 Mon Sep 17 00:00:00 2001 From: chrismclarke Date: Sat, 20 Jan 2024 18:59:35 -0800 Subject: [PATCH] feat: common weather data --- libs/data/index.ts | 1 + libs/data/weather.ts | 17 +++++++ libs/i18n/assets/debug.json | 24 +++++----- libs/i18n/assets/en.json | 28 +++++------- libs/i18n/assets/mw_ny.json | 24 +++++----- libs/i18n/assets/sw.json | 24 +++++----- libs/i18n/assets/tg.json | 24 +++++----- libs/i18n/assets/zm_ny.json | 24 +++++----- libs/i18n/src/hardcoded/data.ts | 16 ++++--- libs/i18n/src/types.ts | 2 +- libs/i18n/templates/_template.csv | 28 +++++------- libs/i18n/templates/_template.json | 71 ++++++++++++------------------ 12 files changed, 130 insertions(+), 153 deletions(-) create mode 100644 libs/data/weather.ts diff --git a/libs/data/index.ts b/libs/data/index.ts index 8e493817c..3fc67e060 100644 --- a/libs/data/index.ts +++ b/libs/data/index.ts @@ -1,3 +1,4 @@ export * from './crops'; export * from './days'; export * from './months'; +export * from './weather'; diff --git a/libs/data/weather.ts b/libs/data/weather.ts new file mode 100644 index 000000000..cfc8cff2e --- /dev/null +++ b/libs/data/weather.ts @@ -0,0 +1,17 @@ +// List of permissable weather names with labels +enum WeatherNameLabels { + clear = 'Clear', + cloudy = 'Cloudy', + rain_low = 'Light Rain', + rain_medium = 'Rain', + rain_high = 'Heavy Rain', +} + +// Extract list of available weather names +type IWeatherName = keyof typeof WeatherNameLabels; + +export const WEATHER_DATA = Object.entries(WeatherNameLabels).map(([name, label]) => ({ + name: name as IWeatherName, + label, + icon: `assets/svgs/weather/${name}.svg`, +})); diff --git a/libs/i18n/assets/debug.json b/libs/i18n/assets/debug.json index 806849a92..44136061a 100644 --- a/libs/i18n/assets/debug.json +++ b/libs/i18n/assets/debug.json @@ -41,21 +41,21 @@ "build housing": "•build housing•", "Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.": "•Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.•", "Calculated with the date range of Start of rains and End of the rains": "•Calculated with the date range of Start of rains and End of the rains•", - "Calendar Lists": "•Calendar Lists•", "Calendar Time": "•Calendar Time•", "Calender name": "•Calender name•", "Cancel": "•Cancel•", "Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day": "•Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day•", "Cassava": "•Cassava•", - "Categories": "•Categories•", "cattle": "•cattle•", "Chance of receiving the water requirement in the days to maturity for this crop variety": "•Chance of receiving the water requirement in the days to maturity for this crop variety•", "Chart": "•Chart•", "chemicals": "•chemicals•", "chicken": "•chicken•", + "Clear": "•Clear•", "Click on the button below to retry": "•Click on the button below to retry•", "Climate": "•Climate•", "Close": "•Close•", + "Cloudy": "•Cloudy•", "Collection not found": "•Collection not found•", "Collections": "•Collections•", "Compare different options and plans": "•Compare different options and plans•", @@ -66,18 +66,16 @@ "Cotton": "•Cotton•", "Cowpeas": "•Cowpeas•", "cowpeas": "•cowpeas•", + "Create Calendar": "•Create Calendar•", "Create calender ": "•Create calender •", "Create New": "•Create New•", "Create New Budget": "•Create New Budget•", - "Create new calender": "•Create new calender•", "Crop": "•Crop•", "crop": "•crop•", "Crop Info": "•Crop Info•", "Crop Information": "•Crop Information•", "Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates": "•Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates•", "Crop water requirement (mm)": "•Crop water requirement (mm)•", - "Crops": "•Crops•", - "Crops Seasonal calender": "•Crops Seasonal calender•", "Days": "•Days•", "Days to maturity": "•Days to maturity•", "Dec": "•Dec•", @@ -101,8 +99,8 @@ "End": "•End•", "End of Season": "•End of Season•", "End of season is defined as the last day in the season (1st October - 30th April) with more than 10mm of rainfall.": "•End of season is defined as the last day in the season (1st October - 30th April) with more than 10mm of rainfall.•", - "Enter the selected month's weather condition": "•Enter the selected month's weather condition•", "Enterprise": "•Enterprise•", + "Example Calendar": "•Example Calendar•", "Extension": "•Extension•", "Extra information": "•Extra information•", "Extreme": "•Extreme•", @@ -138,6 +136,7 @@ "guinea fowl": "•guinea fowl•", "Harvesting": "•Harvesting•", "harvesting": "•harvesting•", + "Heavy Rain": "•Heavy Rain•", "Here we can see information for a specific crop variety": "•Here we can see information for a specific crop variety•", "Hide Options": "•Hide Options•", "High": "•High•", @@ -169,6 +168,7 @@ "Length": "•Length•", "Length of Season": "•Length of Season•", "Length of season is defined as the total days from the start of the season until the end of the season as defined": "•Length of season is defined as the total days from the start of the season until the end of the season as defined•", + "Light Rain": "•Light Rain•", "Line": "•Line•", "Links": "•Links•", "Livelihood Info": "•Livelihood Info•", @@ -208,12 +208,12 @@ "New Budget": "•New Budget•", "New Profile": "•New Profile•", "Next": "•Next•", - "No available calendars": "•No available calendars•", "No outputs produce for consumption": "•No outputs produce for consumption•", + "No saved calendars": "•No saved calendars•", "Nov": "•Nov•", "November": "•November•", "Now you are ready to explore the crop information tool": "•Now you are ready to explore the crop information tool•", - "Number of Months Needed": "•Number of Months Needed•", + "Number of Months": "•Number of Months•", "Oct": "•Oct•", "October": "•October•", "onions": "•onions•", @@ -231,8 +231,7 @@ "Pigeon Peas": "•Pigeon Peas•", "pigeon peas": "•pigeon peas•", "pigs": "•pigs•", - "Please enter the required number of months": "•Please enter the required number of months•", - "Please select a start month": "•Please select a start month•", + "Please add the calender title": "•Please add the calender title•", "ploughing": "•ploughing•", "post-harvest handling": "•post-harvest handling•", "pot for storage": "•pot for storage•", @@ -271,8 +270,8 @@ "Save": "•Save•", "Save your budget": "•Save your budget•", "Saved Budgets": "•Saved Budgets•", + "Saved Calendars": "•Saved Calendars•", "Season Crops": "•Season Crops•", - "Season of 85": "•Season of 85•", "Seasonal Calendar": "•Seasonal Calendar•", "Seasonal forecast": "•Seasonal forecast•", "Seasonal Rainfall": "•Seasonal Rainfall•", @@ -287,7 +286,6 @@ "Select Country": "•Select Country•", "Select Enterprise": "•Select Enterprise•", "Select Language": "•Select Language•", - "Select start month": "•Select start month•", "Sep": "•Sep•", "September": "•September•", "Share": "•Share•", @@ -365,7 +363,6 @@ "Tuesday": "•Tuesday•", "Type": "•Type•", "Type other activity": "•Type other activity•", - "Update Crops": "•Update Crops•", "vaccinate": "•vaccinate•", "vaccine": "•vaccine•", "value addition": "•value addition•", @@ -378,7 +375,6 @@ "Weeding": "•Weeding•", "weeding": "•weeding•", "Weeks": "•Weeks•", - "wet,dry...": "•wet,dry...•", "What are the opportunities and risks?": "•What are the opportunities and risks?•", "What are the options for the farmer?": "•What are the options for the farmer?•", "What are the probabilities and risks?": "•What are the probabilities and risks?•", diff --git a/libs/i18n/assets/en.json b/libs/i18n/assets/en.json index 2c7293348..48c995b20 100644 --- a/libs/i18n/assets/en.json +++ b/libs/i18n/assets/en.json @@ -132,7 +132,6 @@ "Length": "Length", "Length of Season": "Length of Season", "Length of season is defined as the total days from the start of the season until the end of the season as defined": "Length of season is defined as the total days from the start of the season until the end of the season as defined", - "Rain": "Rain", "Seasonal Rainfall": "Seasonal Rainfall", "Seasonal Total Rainfall (mm)": "Seasonal Total Rainfall (mm)", "Seasonal rainfall is defined as the total rain recorded from the start of the season until the end of the season": "Seasonal rainfall is defined as the total rain recorded from the start of the season until the end of the season", @@ -226,6 +225,11 @@ "Oct": "Oct", "Nov": "Nov", "Dec": "Dec", + "Clear": "Clear", + "Cloudy": "Cloudy", + "Heavy Rain": "Heavy Rain", + "Light Rain": "Light Rain", + "Rain": "Rain", "All": "All", "Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.": "Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.", "Chance of receiving the water requirement in the days to maturity for this crop variety": "Chance of receiving the water requirement in the days to maturity for this crop variety", @@ -362,32 +366,24 @@ "Type": "Type", "Add": "Add", "Add Activity": "Add Activity", - "Calendar Lists": "Calendar Lists", "Calendar Time": "Calendar Time", "Calender name": "Calender name", - "Categories": "Categories", + "Create Calendar": "Create Calendar", "Create calender ": "Create calender ", - "Create new calender": "Create new calender", - "Crops": "Crops", - "Crops Seasonal calender": "Crops Seasonal calender", "Drying": "Drying", - "Enter the selected month's weather condition": "Enter the selected month's weather condition", + "Example Calendar": "Example Calendar", "Extra information": "Extra information", "Harvesting": "Harvesting", - "No available calendars": "No available calendars", - "Number of Months Needed": "Number of Months Needed", + "No saved calendars": "No saved calendars", + "Number of Months": "Number of Months", "Other": "Other", - "Please enter the required number of months": "Please enter the required number of months", - "Please select a start month": "Please select a start month", + "Please add the calender title": "Please add the calender title", "Preparation": "Preparation", + "Saved Calendars": "Saved Calendars", "Season Crops": "Season Crops", - "Season of 85": "Season of 85", "Select Activity": "Select Activity", - "Select start month": "Select start month", "Start Month ": "Start Month ", "Type other activity": "Type other activity", - "Update Crops": "Update Crops", "Weeding": "Weeding", - "weather condition": "weather condition", - "wet,dry...": "wet,dry..." + "weather condition": "weather condition" } \ No newline at end of file diff --git a/libs/i18n/assets/mw_ny.json b/libs/i18n/assets/mw_ny.json index b05a1da35..0664d49f6 100644 --- a/libs/i18n/assets/mw_ny.json +++ b/libs/i18n/assets/mw_ny.json @@ -41,21 +41,21 @@ "build housing": "kumanga makola", "Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.": "Kuwerengeredwa pogwiritsa ntchito FAO CLIMWAT 2.0 ya Cropwat ndi Cropwat 8.0 ndi uthenga wa zanyengo ya Nkhotakota Met Station.", "Calculated with the date range of Start of rains and End of the rains": "•Calculated with the date range of Start of rains and End of the rains•", - "Calendar Lists": "•Calendar Lists•", "Calendar Time": "•Calendar Time•", "Calender name": "•Calender name•", "Cancel": "thetsani", "Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day": "•Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day•", "Cassava": "Chinangwa", - "Categories": "•Categories•", "cattle": "ng'ombe", "Chance of receiving the water requirement in the days to maturity for this crop variety": "Mwayi olandira madzi amene mbewu imafunikira mu masiku amene mbewu imatenga kuti ikhwime pa mbewu zosiyanasiyana", "Chart": "Galafu", "chemicals": "mankhwala", "chicken": "nkhuku", + "Clear": "•Clear•", "Click on the button below to retry": "dinani pa batani pansipa kuti muyesenso", "Climate": "Nyengo", "Close": "Tsekani", + "Cloudy": "•Cloudy•", "Collection not found": "Kutolera sizikupezeka", "Collections": "•Collections•", "Compare different options and plans": "Siyanitsani zisankho ndi ma pulani osiyanasiyana", @@ -66,18 +66,16 @@ "Cotton": "•Cotton•", "Cowpeas": "•Cowpeas•", "cowpeas": "khobwe", + "Create Calendar": "•Create Calendar•", "Create calender ": "•Create calender •", "Create New": "•Create New•", "Create New Budget": "Pangani bajeti yatsopano", - "Create new calender": "•Create new calender•", "Crop": "•Crop•", "crop": "mbewu", "Crop Info": "Zokhudza mbeu", "Crop Information": "•Crop Information•", "Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates": "•Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates•", "Crop water requirement (mm)": "Kuchuluka kwa madzi amene mbewu imafuna", - "Crops": "•Crops•", - "Crops Seasonal calender": "•Crops Seasonal calender•", "Days": "Masiku", "Days to maturity": "Masiku omwe zimatenga kuti ziche", "Dec": "•Dec•", @@ -101,8 +99,8 @@ "End": "Pothera", "End of Season": "Mapeto a nyengo", "End of season is defined as the last day in the season (1st October - 30th April) with more than 10mm of rainfall.": "Mapeto a nyengo akutanthauza tsiku lomaliza mu nyengo (1 okotobala mpaka 30 epulo) lomwe kwagwa mvula yoposa 10mm", - "Enter the selected month's weather condition": "•Enter the selected month's weather condition•", "Enterprise": "bizinesi", + "Example Calendar": "•Example Calendar•", "Extension": "Ulangizi", "Extra information": "•Extra information•", "Extreme": "•Extreme•", @@ -138,6 +136,7 @@ "guinea fowl": "nkhanga", "Harvesting": "•Harvesting•", "harvesting": "kukolola", + "Heavy Rain": "•Heavy Rain•", "Here we can see information for a specific crop variety": "•Here we can see information for a specific crop variety•", "Hide Options": "Bisani Zipangizo", "High": "•High•", @@ -169,6 +168,7 @@ "Length": "kutalika", "Length of Season": "Kutalika kwa nyengo", "Length of season is defined as the total days from the start of the season until the end of the season as defined": "Lutalika kwa nyengo kutanthauza masiku onse kuyambira pachiyambi mpaka pamapeto a nyengo monga momwe zafotokozedwa", + "Light Rain": "•Light Rain•", "Line": "Mzere", "Links": "•Links•", "Livelihood Info": "Zokhudza njira zopezera ndalama", @@ -208,12 +208,12 @@ "New Budget": "•New Budget•", "New Profile": "Mbiri yatsopano", "Next": "pitani tsamba lina", - "No available calendars": "•No available calendars•", "No outputs produce for consumption": "Palibe zokolora zomwe zagwiritsidwa (zadyedwa) ntchito pakhomo", + "No saved calendars": "•No saved calendars•", "Nov": "•Nov•", "November": "•November•", "Now you are ready to explore the crop information tool": "•Now you are ready to explore the crop information tool•", - "Number of Months Needed": "•Number of Months Needed•", + "Number of Months": "•Number of Months•", "Oct": "•Oct•", "October": "•October•", "onions": "anyezi", @@ -231,8 +231,7 @@ "Pigeon Peas": "•Pigeon Peas•", "pigeon peas": "nandolo", "pigs": "nkhumba", - "Please enter the required number of months": "•Please enter the required number of months•", - "Please select a start month": "•Please select a start month•", + "Please add the calender title": "•Please add the calender title•", "ploughing": "kugalauza", "post-harvest handling": "kusamala zokolora", "pot for storage": "mphika wongula zinthu", @@ -271,8 +270,8 @@ "Save": "sungani", "Save your budget": "sungani bajeti yanu", "Saved Budgets": "bajeti zosungidwa", + "Saved Calendars": "•Saved Calendars•", "Season Crops": "•Season Crops•", - "Season of 85": "•Season of 85•", "Seasonal Calendar": "Kalendala ya nyengo", "Seasonal forecast": "ulosi wa nyengo", "Seasonal Rainfall": "Mvula ya mu nyengo", @@ -287,7 +286,6 @@ "Select Country": "Sankhani Dziko", "Select Enterprise": "sankhani mtundu wa bizinezi", "Select Language": "Sankhani chilankhulo", - "Select start month": "•Select start month•", "Sep": "•Sep•", "September": "•September•", "Share": "tumizani", @@ -365,7 +363,6 @@ "Tuesday": "Lachiwiri", "Type": "•Type•", "Type other activity": "•Type other activity•", - "Update Crops": "•Update Crops•", "vaccinate": "kupereka katemela", "vaccine": "katemera", "value addition": "kuwonjezera phindu", @@ -378,7 +375,6 @@ "Weeding": "•Weeding•", "weeding": "kupalira", "Weeks": "•Weeks•", - "wet,dry...": "•wet,dry...•", "What are the opportunities and risks?": "•What are the opportunities and risks?•", "What are the options for the farmer?": "Zisankho zomwe mulimi alinazo ndi ziti?", "What are the probabilities and risks?": "Kodi kuthera koti zikhoza kuchitika komanso ziopzezo zake ndi ziti?", diff --git a/libs/i18n/assets/sw.json b/libs/i18n/assets/sw.json index 733055c68..effff47c4 100644 --- a/libs/i18n/assets/sw.json +++ b/libs/i18n/assets/sw.json @@ -41,21 +41,21 @@ "build housing": "•build housing•", "Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.": "•Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.•", "Calculated with the date range of Start of rains and End of the rains": "•Calculated with the date range of Start of rains and End of the rains•", - "Calendar Lists": "•Calendar Lists•", "Calendar Time": "•Calendar Time•", "Calender name": "•Calender name•", "Cancel": "•Cancel•", "Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day": "•Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day•", "Cassava": "•Cassava•", - "Categories": "•Categories•", "cattle": "•cattle•", "Chance of receiving the water requirement in the days to maturity for this crop variety": "•Chance of receiving the water requirement in the days to maturity for this crop variety•", "Chart": "•Chart•", "chemicals": "•chemicals•", "chicken": "•chicken•", + "Clear": "•Clear•", "Click on the button below to retry": "Bofya kwenye kifungo chini ili ujaribu tena", "Climate": "•Climate•", "Close": "Funga", + "Cloudy": "•Cloudy•", "Collection not found": "•Collection not found•", "Collections": "•Collections•", "Compare different options and plans": "•Compare different options and plans•", @@ -66,18 +66,16 @@ "Cotton": "•Cotton•", "Cowpeas": "•Cowpeas•", "cowpeas": "•cowpeas•", + "Create Calendar": "•Create Calendar•", "Create calender ": "•Create calender •", "Create New": "•Create New•", "Create New Budget": "Unda bajeti mpya", - "Create new calender": "•Create new calender•", "Crop": "•Crop•", "crop": "•crop•", "Crop Info": "•Crop Info•", "Crop Information": "Maelezo ya Mazao", "Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates": "•Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates•", "Crop water requirement (mm)": "•Crop water requirement (mm)•", - "Crops": "•Crops•", - "Crops Seasonal calender": "•Crops Seasonal calender•", "Days": "Siku", "Days to maturity": "•Days to maturity•", "Dec": "•Dec•", @@ -101,8 +99,8 @@ "End": "•End•", "End of Season": "Mwisho wa Msimu", "End of season is defined as the last day in the season (1st October - 30th April) with more than 10mm of rainfall.": "Mwisho wa msimu hufafanuliwa kama siku ya mwisho msimu (1 Oktoba - 30 Aprili) na zaidi ya 10mm ya mvua.", - "Enter the selected month's weather condition": "•Enter the selected month's weather condition•", "Enterprise": "•Enterprise•", + "Example Calendar": "•Example Calendar•", "Extension": "•Extension•", "Extra information": "•Extra information•", "Extreme": "•Extreme•", @@ -138,6 +136,7 @@ "guinea fowl": "•guinea fowl•", "Harvesting": "•Harvesting•", "harvesting": "•harvesting•", + "Heavy Rain": "•Heavy Rain•", "Here we can see information for a specific crop variety": "•Here we can see information for a specific crop variety•", "Hide Options": "•Hide Options•", "High": "•High•", @@ -169,6 +168,7 @@ "Length": "•Length•", "Length of Season": "Muda wa Msimu", "Length of season is defined as the total days from the start of the season until the end of the season as defined": "Urefu wa msimu hufafanuliwa kama siku zote kutoka mwanzo wa msimu mpaka mwisho wa msimu kama ilivyoelezwa", + "Light Rain": "•Light Rain•", "Line": "•Line•", "Links": "•Links•", "Livelihood Info": "•Livelihood Info•", @@ -208,12 +208,12 @@ "New Budget": "•New Budget•", "New Profile": "•New Profile•", "Next": "•Next•", - "No available calendars": "•No available calendars•", "No outputs produce for consumption": "•No outputs produce for consumption•", + "No saved calendars": "•No saved calendars•", "Nov": "•Nov•", "November": "Novemba", "Now you are ready to explore the crop information tool": "•Now you are ready to explore the crop information tool•", - "Number of Months Needed": "•Number of Months Needed•", + "Number of Months": "•Number of Months•", "Oct": "•Oct•", "October": "Oktoba", "onions": "•onions•", @@ -231,8 +231,7 @@ "Pigeon Peas": "•Pigeon Peas•", "pigeon peas": "•pigeon peas•", "pigs": "•pigs•", - "Please enter the required number of months": "•Please enter the required number of months•", - "Please select a start month": "•Please select a start month•", + "Please add the calender title": "•Please add the calender title•", "ploughing": "•ploughing•", "post-harvest handling": "•post-harvest handling•", "pot for storage": "•pot for storage•", @@ -271,8 +270,8 @@ "Save": "Hifadhi", "Save your budget": "•Save your budget•", "Saved Budgets": "Bajeti zilizohifadhiwa", + "Saved Calendars": "•Saved Calendars•", "Season Crops": "•Season Crops•", - "Season of 85": "•Season of 85•", "Seasonal Calendar": "•Seasonal Calendar•", "Seasonal forecast": "•Seasonal forecast•", "Seasonal Rainfall": "Mvua ya msimu", @@ -287,7 +286,6 @@ "Select Country": "•Select Country•", "Select Enterprise": "Chagua Enterprise", "Select Language": "•Select Language•", - "Select start month": "•Select start month•", "Sep": "•Sep•", "September": "Septemba", "Share": "•Share•", @@ -365,7 +363,6 @@ "Tuesday": "•Tuesday•", "Type": "•Type•", "Type other activity": "•Type other activity•", - "Update Crops": "•Update Crops•", "vaccinate": "•vaccinate•", "vaccine": "•vaccine•", "value addition": "•value addition•", @@ -378,7 +375,6 @@ "Weeding": "•Weeding•", "weeding": "•weeding•", "Weeks": "Wiki", - "wet,dry...": "•wet,dry...•", "What are the opportunities and risks?": "•What are the opportunities and risks?•", "What are the options for the farmer?": "•What are the options for the farmer?•", "What are the probabilities and risks?": "•What are the probabilities and risks?•", diff --git a/libs/i18n/assets/tg.json b/libs/i18n/assets/tg.json index 14794590b..517e25907 100644 --- a/libs/i18n/assets/tg.json +++ b/libs/i18n/assets/tg.json @@ -41,21 +41,21 @@ "build housing": "сохтани манзил", "Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.": "•Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.•", "Calculated with the date range of Start of rains and End of the rains": "•Calculated with the date range of Start of rains and End of the rains•", - "Calendar Lists": "•Calendar Lists•", "Calendar Time": "•Calendar Time•", "Calender name": "•Calender name•", "Cancel": "Манъ кардан", "Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day": "•Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day•", "Cassava": "•Cassava•", - "Categories": "•Categories•", "cattle": "ҳайвон", "Chance of receiving the water requirement in the days to maturity for this crop variety": "•Chance of receiving the water requirement in the days to maturity for this crop variety•", "Chart": "•Chart•", "chemicals": "кимиёвӣ", "chicken": "чӯҷа", + "Clear": "•Clear•", "Click on the button below to retry": "Тугмаи поёнро зер кунед, то дубора такрор кунед", "Climate": "•Climate•", "Close": "Наздик", + "Cloudy": "•Cloudy•", "Collection not found": "•Collection not found•", "Collections": "•Collections•", "Compare different options and plans": "•Compare different options and plans•", @@ -66,18 +66,16 @@ "Cotton": "•Cotton•", "Cowpeas": "•Cowpeas•", "cowpeas": "гов", + "Create Calendar": "•Create Calendar•", "Create calender ": "•Create calender •", "Create New": "•Create New•", "Create New Budget": "Эҷоди буҷети нав", - "Create new calender": "•Create new calender•", "Crop": "•Crop•", "crop": "кишт", "Crop Info": "•Crop Info•", "Crop Information": "Маълумоти зироат", "Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates": "•Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates•", "Crop water requirement (mm)": "•Crop water requirement (mm)•", - "Crops": "•Crops•", - "Crops Seasonal calender": "•Crops Seasonal calender•", "Days": "Рӯзҳо", "Days to maturity": "•Days to maturity•", "Dec": "Кек", @@ -101,8 +99,8 @@ "End": "•End•", "End of Season": "Охири мавсим", "End of season is defined as the last day in the season (1st October - 30th April) with more than 10mm of rainfall.": "Анҷоми мавсим ҳамчун рӯзи охир дар мавсими (1 октябр - 30 апрел) бо зиёда аз 10 миллион боришот муайян карда мешавад.", - "Enter the selected month's weather condition": "•Enter the selected month's weather condition•", "Enterprise": "Корхона", + "Example Calendar": "•Example Calendar•", "Extension": "•Extension•", "Extra information": "•Extra information•", "Extreme": "•Extreme•", @@ -138,6 +136,7 @@ "guinea fowl": "Гвинея парранда", "Harvesting": "•Harvesting•", "harvesting": "гирдоварӣ", + "Heavy Rain": "•Heavy Rain•", "Here we can see information for a specific crop variety": "•Here we can see information for a specific crop variety•", "Hide Options": "•Hide Options•", "High": "•High•", @@ -169,6 +168,7 @@ "Length": "Дарозӣ", "Length of Season": "Мавсими мавсим", "Length of season is defined as the total days from the start of the season until the end of the season as defined": "Дарозии мавсим ҳамчун рӯзҳои умумии аз оғози мавсим то охири мавсим муайян карда мешавад", + "Light Rain": "•Light Rain•", "Line": "•Line•", "Links": "•Links•", "Livelihood Info": "•Livelihood Info•", @@ -208,12 +208,12 @@ "New Budget": "•New Budget•", "New Profile": "•New Profile•", "Next": "Баъдӣ", - "No available calendars": "•No available calendars•", "No outputs produce for consumption": "•No outputs produce for consumption•", + "No saved calendars": "•No saved calendars•", "Nov": "Ноябр", "November": "Ноябр", "Now you are ready to explore the crop information tool": "•Now you are ready to explore the crop information tool•", - "Number of Months Needed": "•Number of Months Needed•", + "Number of Months": "•Number of Months•", "Oct": "Окт окт", "October": "Октябр", "onions": "•onions•", @@ -231,8 +231,7 @@ "Pigeon Peas": "•Pigeon Peas•", "pigeon peas": "нахуд кабӯтар", "pigs": "хукҳо", - "Please enter the required number of months": "•Please enter the required number of months•", - "Please select a start month": "•Please select a start month•", + "Please add the calender title": "•Please add the calender title•", "ploughing": "шудгор кардан", "post-harvest handling": "Мавридҳои ҳосили пас аз", "pot for storage": "дег барои нигаҳдошт", @@ -271,8 +270,8 @@ "Save": "Пул захира кардан", "Save your budget": "•Save your budget•", "Saved Budgets": "Буҷетҳои захирашуда", + "Saved Calendars": "•Saved Calendars•", "Season Crops": "•Season Crops•", - "Season of 85": "•Season of 85•", "Seasonal Calendar": "•Seasonal Calendar•", "Seasonal forecast": "•Seasonal forecast•", "Seasonal Rainfall": "Боришоти мавсимӣ", @@ -287,7 +286,6 @@ "Select Country": "•Select Country•", "Select Enterprise": "Корхона интихоб кунед", "Select Language": "•Select Language•", - "Select start month": "•Select start month•", "Sep": "Сен", "September": "сентябр", "Share": "•Share•", @@ -365,7 +363,6 @@ "Tuesday": "•Tuesday•", "Type": "•Type•", "Type other activity": "•Type other activity•", - "Update Crops": "•Update Crops•", "vaccinate": "пайванд кардан", "vaccine": "ваксина", "value addition": "Илова", @@ -378,7 +375,6 @@ "Weeding": "•Weeding•", "weeding": "хишова", "Weeks": "Ҳониш", - "wet,dry...": "•wet,dry...•", "What are the opportunities and risks?": "•What are the opportunities and risks?•", "What are the options for the farmer?": "•What are the options for the farmer?•", "What are the probabilities and risks?": "•What are the probabilities and risks?•", diff --git a/libs/i18n/assets/zm_ny.json b/libs/i18n/assets/zm_ny.json index 28b6e2c29..797f5dc71 100644 --- a/libs/i18n/assets/zm_ny.json +++ b/libs/i18n/assets/zm_ny.json @@ -41,21 +41,21 @@ "build housing": "kumanga nyumba", "Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.": "Kuwerengela kusewenzetsa FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station.", "Calculated with the date range of Start of rains and End of the rains": "•Calculated with the date range of Start of rains and End of the rains•", - "Calendar Lists": "•Calendar Lists•", "Calendar Time": "•Calendar Time•", "Calender name": "•Calender name•", "Cancel": "kutseka", "Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day": "•Capacity of 100mm on 1st March reduces 0.5 with evaporation rate of 5mm per day•", "Cassava": "Chinangwa", - "Categories": "•Categories•", "cattle": "ng'ombe", "Chance of receiving the water requirement in the days to maturity for this crop variety": "Mpata wolandila madzi oyenera kuti mtundu wa mbeu iyi iche.", "Chart": "Zithunzi zazochita", "chemicals": "mankhwala", "chicken": "nkhuku", + "Clear": "•Clear•", "Click on the button below to retry": "dinizani pa batani pansipa kuti muyesenso", "Climate": "Nyengo", "Close": "Tsekani", + "Cloudy": "•Cloudy•", "Collection not found": "Zokonzedwa bwino sizikupezeka", "Collections": "•Collections•", "Compare different options and plans": "Linganizani Zosankha", @@ -66,18 +66,16 @@ "Cotton": "•Cotton•", "Cowpeas": "•Cowpeas•", "cowpeas": "nyemba", + "Create Calendar": "•Create Calendar•", "Create calender ": "•Create calender •", "Create New": "•Create New•", "Create New Budget": "Pangani bajeti yatsopano", - "Create new calender": "•Create new calender•", "Crop": "•Crop•", "crop": "zokolora", "Crop Info": "Zambiri za Mbeu", "Crop Information": "•Crop Information•", "Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates": "•Crop probabilities depend on when the season starts.\nHere you can see the probabilities of the season starting at different dates•", "Crop water requirement (mm)": "M'yeso wofunikira wa madzi ku mbeu iyi", - "Crops": "•Crops•", - "Crops Seasonal calender": "•Crops Seasonal calender•", "Days": "Masiku", "Days to maturity": "Masiku kuti iche", "Dec": "•Dec•", @@ -101,8 +99,8 @@ "End": "Tsirizani", "End of Season": "Kutha kwa nyengo", "End of season is defined as the last day in the season (1st October - 30th April) with more than 10mm of rainfall.": "Kutha kwa nyengo akutanthauza tsiku lomaliza mu nyengo (1 okotobala mpaka 30 epulo) lomwe kwagwa mvula yoposa 10mm", - "Enter the selected month's weather condition": "•Enter the selected month's weather condition•", "Enterprise": "malonda", + "Example Calendar": "•Example Calendar•", "Extension": "Kukuza", "Extra information": "•Extra information•", "Extreme": "•Extreme•", @@ -138,6 +136,7 @@ "guinea fowl": "nkhanga", "Harvesting": "•Harvesting•", "harvesting": "kukolola", + "Heavy Rain": "•Heavy Rain•", "Here we can see information for a specific crop variety": "•Here we can see information for a specific crop variety•", "Hide Options": "Bimphani zosankha", "High": "•High•", @@ -169,6 +168,7 @@ "Length": "kutalika", "Length of Season": "Kutalika kwa nyengo", "Length of season is defined as the total days from the start of the season until the end of the season as defined": "Kutalika kwa nyengo kutanthauza masiku onse kuyambira pachiyambi mpaka pamapeto a nyengo monga momwe zafotokozedwa", + "Light Rain": "•Light Rain•", "Line": "Mzere", "Links": "•Links•", "Livelihood Info": "Zambiri ya makhalidwe", @@ -208,12 +208,12 @@ "New Budget": "•New Budget•", "New Profile": "Profaelo yatsopano", "Next": "ina", - "No available calendars": "•No available calendars•", "No outputs produce for consumption": "Palibe zokolola zakudya pakhomo", + "No saved calendars": "•No saved calendars•", "Nov": "•Nov•", "November": "•November•", "Now you are ready to explore the crop information tool": "•Now you are ready to explore the crop information tool•", - "Number of Months Needed": "•Number of Months Needed•", + "Number of Months": "•Number of Months•", "Oct": "•Oct•", "October": "•October•", "onions": "anyezi", @@ -231,8 +231,7 @@ "Pigeon Peas": "•Pigeon Peas•", "pigeon peas": "nyamdolo", "pigs": "nkhumba", - "Please enter the required number of months": "•Please enter the required number of months•", - "Please select a start month": "•Please select a start month•", + "Please add the calender title": "•Please add the calender title•", "ploughing": "kugaula", "post-harvest handling": "kagwiridwe pambuyo po kolola", "pot for storage": "mphika posungira", @@ -271,8 +270,8 @@ "Save": "sungani", "Save your budget": "sungani bajeti yanu", "Saved Budgets": "bajeti zosungidwa", + "Saved Calendars": "•Saved Calendars•", "Season Crops": "•Season Crops•", - "Season of 85": "•Season of 85•", "Seasonal Calendar": "Kalenda ya Nyengo", "Seasonal forecast": "Uthenga wa zanyengo", "Seasonal Rainfall": "Mvula ya mu nyengo", @@ -287,7 +286,6 @@ "Select Country": "Sankhani dziko", "Select Enterprise": "sankhani makampani", "Select Language": "Sankhani Chilankhulidwe", - "Select start month": "•Select start month•", "Sep": "•Sep•", "September": "•September•", "Share": "gawani", @@ -365,7 +363,6 @@ "Tuesday": "Pa chiwiri", "Type": "•Type•", "Type other activity": "•Type other activity•", - "Update Crops": "•Update Crops•", "vaccinate": "katemera", "vaccine": "katemera", "value addition": "kuwonjezera phindu", @@ -378,7 +375,6 @@ "Weeding": "•Weeding•", "weeding": "kupalira", "Weeks": "•Weeks•", - "wet,dry...": "•wet,dry...•", "What are the opportunities and risks?": "•What are the opportunities and risks?•", "What are the options for the farmer?": "Kodi nizosankha zotani mam'limi?", "What are the probabilities and risks?": "Kodi pali m'pata wotani komanso ziophyezo?", diff --git a/libs/i18n/src/hardcoded/data.ts b/libs/i18n/src/hardcoded/data.ts index 72ad4b078..71b213511 100644 --- a/libs/i18n/src/hardcoded/data.ts +++ b/libs/i18n/src/hardcoded/data.ts @@ -4,32 +4,36 @@ import type { ITranslationEntry } from '../types'; const days: ITranslationEntry[] = DATA.DAY_NAMES.map((d, i) => ({ text: d.label, - tool: 'common_days' as any, + tool: 'common_days', context: `day_${i + 1}`, })); const days_short: ITranslationEntry[] = DATA.DAY_NAMES.map((d, i) => ({ text: d.labelShort, - tool: 'common_days' as any, + tool: 'common_days', context: `day_short_${i + 1}`, })); const months: ITranslationEntry[] = DATA.MONTH_NAMES.map((m, i) => ({ text: m.label, - tool: 'common_months' as any, + tool: 'common_months', context: `month_${pad(i + 1)}`, })); const months_short: ITranslationEntry[] = DATA.MONTH_NAMES.map((m, i) => ({ text: m.labelShort, - tool: 'common_months' as any, + tool: 'common_months', context: `month_short_${pad(i + 1)}`, })); const crops: ITranslationEntry[] = DATA.CROPS_DATA.map((c) => ({ text: c.label, - tool: 'common_crops' as any, + tool: 'common_crops', +})); +const weather: ITranslationEntry[] = Object.values(DATA.WEATHER_DATA).map(({ label }) => ({ + text: label, + tool: 'common_weather', })); -export const DATA_ENTRIES = [...crops, ...days, ...days_short, ...months, ...months_short]; +export const DATA_ENTRIES = [...crops, ...days, ...days_short, ...months, ...months_short, ...weather]; // pad leading 0 for 2-digit number, e.g 9 -> 09 function pad(n: number) { diff --git a/libs/i18n/src/types.ts b/libs/i18n/src/types.ts index 3fe308991..53c1f98a9 100644 --- a/libs/i18n/src/types.ts +++ b/libs/i18n/src/types.ts @@ -2,7 +2,7 @@ export interface ITranslationEntry { /** case-sensitive string representation for translation */ text: string; /** associated tool for context */ - tool: 'budget' | 'climate' | 'common'; + tool: string; /** additional context related to tool */ context?: string; } diff --git a/libs/i18n/templates/_template.csv b/libs/i18n/templates/_template.csv index 81693310d..3df31a7f8 100644 --- a/libs/i18n/templates/_template.csv +++ b/libs/i18n/templates/_template.csv @@ -132,7 +132,6 @@ tool,context,text "climate","chart","Length" "climate","chart","Length of Season" "climate","chart","Length of season is defined as the total days from the start of the season until the end of the season as defined" -"climate","chart","Rain" "climate","chart","Seasonal Rainfall" "climate","chart","Seasonal Total Rainfall (mm)" "climate","chart","Seasonal rainfall is defined as the total rain recorded from the start of the season until the end of the season" @@ -226,6 +225,11 @@ tool,context,text "common_months","month_short_10","Oct" "common_months","month_short_11","Nov" "common_months","month_short_12","Dec" +"common_weather",,"Clear" +"common_weather",,"Cloudy" +"common_weather",,"Heavy Rain" +"common_weather",,"Light Rain" +"common_weather",,"Rain" "crop-probability",,"All" "crop-probability",,"Calculated by using FAO CLIMWAT 2.0 for Cropwat and Cropwat 8.0 and climate data for Nkhotakota Met Station." "crop-probability",,"Chance of receiving the water requirement in the days to maturity for this crop variety" @@ -362,31 +366,23 @@ tool,context,text "resources",,"Type" "seasonal-calendar",,"Add" "seasonal-calendar",,"Add Activity" -"seasonal-calendar",,"Calendar Lists" "seasonal-calendar",,"Calendar Time" "seasonal-calendar",,"Calender name" -"seasonal-calendar",,"Categories" +"seasonal-calendar",,"Create Calendar" "seasonal-calendar",,"Create calender " -"seasonal-calendar",,"Create new calender" -"seasonal-calendar",,"Crops" -"seasonal-calendar",,"Crops Seasonal calender" "seasonal-calendar",,"Drying" -"seasonal-calendar",,"Enter the selected month's weather condition" +"seasonal-calendar",,"Example Calendar" "seasonal-calendar",,"Extra information" "seasonal-calendar",,"Harvesting" -"seasonal-calendar",,"No available calendars" -"seasonal-calendar",,"Number of Months Needed" +"seasonal-calendar",,"No saved calendars" +"seasonal-calendar",,"Number of Months" "seasonal-calendar",,"Other" -"seasonal-calendar",,"Please enter the required number of months" -"seasonal-calendar",,"Please select a start month" +"seasonal-calendar",,"Please add the calender title" "seasonal-calendar",,"Preparation" +"seasonal-calendar",,"Saved Calendars" "seasonal-calendar",,"Season Crops" -"seasonal-calendar",,"Season of 85" "seasonal-calendar",,"Select Activity" -"seasonal-calendar",,"Select start month" "seasonal-calendar",,"Start Month " "seasonal-calendar",,"Type other activity" -"seasonal-calendar",,"Update Crops" "seasonal-calendar",,"Weeding" -"seasonal-calendar",,"weather condition" -"seasonal-calendar",,"wet,dry..." \ No newline at end of file +"seasonal-calendar",,"weather condition" \ No newline at end of file diff --git a/libs/i18n/templates/_template.json b/libs/i18n/templates/_template.json index da110e680..a7d16c6eb 100644 --- a/libs/i18n/templates/_template.json +++ b/libs/i18n/templates/_template.json @@ -619,11 +619,6 @@ "tool": "climate", "context": "chart" }, - { - "text": "Rain", - "tool": "climate", - "context": "chart" - }, { "text": "Seasonal Rainfall", "tool": "climate", @@ -1046,6 +1041,26 @@ "tool": "common_months", "context": "month_short_12" }, + { + "text": "Clear", + "tool": "common_weather" + }, + { + "text": "Cloudy", + "tool": "common_weather" + }, + { + "text": "Heavy Rain", + "tool": "common_weather" + }, + { + "text": "Light Rain", + "tool": "common_weather" + }, + { + "text": "Rain", + "tool": "common_weather" + }, { "text": "All", "tool": "crop-probability" @@ -1590,10 +1605,6 @@ "text": "Add Activity", "tool": "seasonal-calendar" }, - { - "text": "Calendar Lists", - "tool": "seasonal-calendar" - }, { "text": "Calendar Time", "tool": "seasonal-calendar" @@ -1603,31 +1614,19 @@ "tool": "seasonal-calendar" }, { - "text": "Categories", + "text": "Create Calendar", "tool": "seasonal-calendar" }, { "text": "Create calender ", "tool": "seasonal-calendar" }, - { - "text": "Create new calender", - "tool": "seasonal-calendar" - }, - { - "text": "Crops", - "tool": "seasonal-calendar" - }, - { - "text": "Crops Seasonal calender", - "tool": "seasonal-calendar" - }, { "text": "Drying", "tool": "seasonal-calendar" }, { - "text": "Enter the selected month's weather condition", + "text": "Example Calendar", "tool": "seasonal-calendar" }, { @@ -1639,11 +1638,11 @@ "tool": "seasonal-calendar" }, { - "text": "No available calendars", + "text": "No saved calendars", "tool": "seasonal-calendar" }, { - "text": "Number of Months Needed", + "text": "Number of Months", "tool": "seasonal-calendar" }, { @@ -1651,11 +1650,7 @@ "tool": "seasonal-calendar" }, { - "text": "Please enter the required number of months", - "tool": "seasonal-calendar" - }, - { - "text": "Please select a start month", + "text": "Please add the calender title", "tool": "seasonal-calendar" }, { @@ -1663,21 +1658,17 @@ "tool": "seasonal-calendar" }, { - "text": "Season Crops", + "text": "Saved Calendars", "tool": "seasonal-calendar" }, { - "text": "Season of 85", + "text": "Season Crops", "tool": "seasonal-calendar" }, { "text": "Select Activity", "tool": "seasonal-calendar" }, - { - "text": "Select start month", - "tool": "seasonal-calendar" - }, { "text": "Start Month ", "tool": "seasonal-calendar" @@ -1686,10 +1677,6 @@ "text": "Type other activity", "tool": "seasonal-calendar" }, - { - "text": "Update Crops", - "tool": "seasonal-calendar" - }, { "text": "Weeding", "tool": "seasonal-calendar" @@ -1697,9 +1684,5 @@ { "text": "weather condition", "tool": "seasonal-calendar" - }, - { - "text": "wet,dry...", - "tool": "seasonal-calendar" } ] \ No newline at end of file