Commit 3b21c4a8 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fix: Incorrect location for "datasets.common" i18n key

parent 33d24773
......@@ -6,13 +6,38 @@ const getPrefix = (path) => path.substring(path.indexOf('./src/') + './src/'.len
fg([`./src/**/translations.json`, `./src/translations.json`])
.then((entries) => entries.sort((a, b) => getPrefix(a).localeCompare(getPrefix(b))))
.then((entries) => entries.map((path) => getTranslations(path)))
.then((content) => fs.writeFileSync(`locales/en/translations.json`, `{\n${content}}`));
.then((entries) => {
let result = {};
entries.forEach((path) => {
result = { ...result, ...getTranslations(path) };
});
return result;
})
.then((content) => fs.writeFileSync(`locales/en/translations.json`, JSON.stringify(content, null, 2)))
.then(() => {
const content = fs.readFileSync(`locales/en/translations.json`);
JSON.parse(content);
}).catch((error) => {
console.log('Error reading resulting locales/en/translations.json', error);
process.exit(-1);
});
const getTranslations = (path) => {
const prefix = getPrefix(path);
console.log('Loading translations of module', prefix);
const fileContent = fs.readFileSync(path, 'utf8');
try {
const i18n = JSON.parse(fileContent);
return prefix !== '/' ? _(`"${prefix}": ${fileContent}\n`).value() : fileContent.substr(1, fileContent.length - 2);
if (prefix === '/') {
return i18n;
} else {
const moduleI18n = {};
moduleI18n[prefix] = i18n;
return moduleI18n;
}
} catch (error) {
console.log(`Invalid JSON in ${path}`, error);
process.exit(-1);
}
};
{
"public": {
"p": {
"welcome": {
......@@ -171,7 +170,7 @@
"name": "Name",
"shortName": "Short name"
},
"partners" : {
"partners": {
"partners": "Data providers",
"acronym": "Acronym",
"title": "Title",
......@@ -338,2105 +337,2073 @@
"warningMessage": "Accession data cannot be exported. There are more than {{value, number}} entries."
}
},
"datasets": {
"common": {
"modelName": "Dataset",
"modelName_plural": "Datasets",
"stats": "C&E Dataset",
"stats_plural": "C&E Datasets",
"creator": {
"role": {
"MANAGER": "Data manager",
"COLLECTOR": "Data collector",
"DIGITIZER": "Data digitizer",
"CURATOR": "Data curator"
},
"roledesc": {
"MANAGER": "Responsible of the planning and execution of the germplasm characterization and evaluation activity which resulted in the dataset. Oversees the collection and management of characterization and evaluation data, and has final sign-off on publication.",
"COLLECTOR": "Records germplasm characterization or evaluation data in the field.",
"DIGITIZER": "Digitizes data.",
"CURATOR": "Organizes and validates data and metadata in correct format, ensures quality of both."
}
}
}
},
"status": {
"inReview": "In review",
"inProgress": "Draft",
"published": "Published"
}
,"accessions": {
"public": {
"c": {
"accessionCard": {
"addToMyList": "Add to my list"
},
"accessions": {
"public": {
"c": {
"accessionCard": {
"addToMyList": "Add to my list"
},
"pdciTable": {
"pdciScore": "PDCI score of this accession is {{score, number}} of 10.0.",
"readPDCI": "Read about Passport Data Completeness Index",
"pdciInstitute": "Average PDCI score for this institute is {{score, number}}."
}
},
"pdciTable": {
"pdciScore": "PDCI score of this accession is {{score, number}} of 10.0.",
"readPDCI": "Read about Passport Data Completeness Index",
"pdciInstitute": "Average PDCI score for this institute is {{score, number}}."
"f": {
"crop": "Crop",
"filtersTitle": "Filter accessions",
"seqNumber": "Sequential number",
"subtaxon": "Subtaxon",
"originOfMaterial": "Origin of material",
"elevation": "Elevation",
"status": "Status",
"historic": "Historic records",
"available": "Available for distribution",
"mlsStatus": "Included in MLS",
"sgsv": "Backed up in SGSV",
"images": "Accessions with images",
"climate": "Climate at origin"
},
"p": {
"display": {
"title": "Accession details",
"subTitle": "Passport data and everything else",
"removeFromMyList": "Remove {{accessionNumber}} from my list",
"addToMyList": "Add {{accessionNumber}} to my list",
"holdingInstitute": "Holding institute",
"historic": "Historic accession",
"isHistoric": "This is a historic record of an accession",
"DOI": "DOI",
"loadChanges": "Show changes",
"acquisitionDate": "Acquisition Date",
"availability": "Availability for distribution",
"ITPGRFAMLS": "ITPGRFA MLS",
"donorInstitute": "Donor institute",
"donorAccessionNumber": "Donor accession number",
"safetyDuplicationInstitute": "Safety duplication institute",
"accessionURL": "Accession URL",
"scientificName": "Scientific name",
"cropName": "Crop",
"providedCropName": "Provided crop name",
"accessionNames": "Accession names",
"collectingInformation": "Collecting information",
"remarks": "Remarks",
"pdci": "Passport Data Completeness Index",
"metadata": "Metadata",
"permanentURL": "Permanent URL",
"associatedDatasets": "Associated Datasets",
"associatedSubsets": "Associated Subsets",
"relatedResources": "Related resources",
"imageGallery": "Image gallery",
"MCPD": "MCPD",
"zip": "ZIP",
"climateAtCollection": "Climate at origin",
"additionalInfo": "Bioclimatic variables",
"partner": "Data provider",
"climateSimilar": {
"title": "Accessions with similar climatic properties",
"intro": "Georeferenced accesions in Genesys are linked to their climate data based on worldclim.org datasets. Genesys will try to find similar georeferenced accessions that match the basic climatic parameters: annual mean temperature, seasonality and rainfall.",
"view": "List accessions"
}
},
"browse": {
"title": "Accession browser",
"subTitle": "Explore curated sets of accessions"
},
"map": {
"andMore": "And {{otherMore}} more",
"kml": "KML",
"filterAccessions": "Filter accessions",
"pick": "Show climate",
"stopPick": "Cancel",
"noClimateData": "No climate data available for selected location"
}
}
},
"f": {
"crop": "Crop",
"filtersTitle": "Filter accessions",
"seqNumber": "Sequential number",
"subtaxon": "Subtaxon",
"originOfMaterial": "Origin of material",
"elevation": "Elevation",
"status": "Status",
"historic": "Historic records",
"available": "Available for distribution",
"mlsStatus": "Included in MLS",
"sgsv": "Backed up in SGSV",
"images": "Accessions with images",
"climate": "Climate at origin"
"tab": {
"data": "Accessions",
"overview": "Overview",
"map": "Map"
},
"climate": {
"bio1": "Annual mean temperature [°C]",
"bio2": "Mean diurnal range (mean of monthly (max temp - min temp))",
"bio3": "Isothermality (bio2/bio7) (* 100)",
"bio4": "Temperature seasonality (standard deviation *100)",
"bio5": "Max temperature of warmest month [°C]",
"bio6": "Min temperature of coldest month [°C]",
"bio7": "Temperature annual range (bio5-bio6) [°C]",
"bio8": "Mean temperature of wettest quarter [°C]",
"bio9": "Mean temperature of driest quarter [°C]",
"bio10": "Mean temperature of warmest quarter [°C]",
"bio11": "Mean temperature of coldest quarter [°C]",
"bio12": "Annual precipitation [mm]",
"bio13": "Precipitation of wettest month [mm]",
"bio14": "Precipitation of driest month [mm]",
"bio15": "Precipitation seasonality (coefficient of variation)",
"bio16": "Precipitation of wettest quarter [mm]",
"bio17": "Precipitation of driest quarter [mm]",
"bio18": "Precipitation of warmest quarter [mm]",
"bio19": "Precipitation of coldest quarter [mm]",
"monthlyPrecipitation": "Monthly precipitation",
"precipitation": "Precipitation",
"monthlyTemp": "Monthly temperature",
"tMin": "Minimal temperature",
"tMean": "Mean temperature",
"tMax": "Maximal temperature",
"label": {
"prec": "Monthly precipitation [mm]",
"tmin": "Minimum temperature [°C]",
"tmean": "Mean temperature [°C]",
"tmax": "Maximum temperature [°C]"
},
"rcp26": {
"diff1": "2050 RCP26 Change in temperature [°C]",
"bio1": "2050 RCP26 Annual mean temperature [°C]",
"bio5": "2050 RCP26 Max temperature of warmest month [°C]",
"bio6": "2050 RCP26 Min temperature of coldest month [°C]",
"bio12": "2050 RCP26 Annual precipitation [mm]",
"bio13": "2050 RCP26 Precipitation of wettest month [mm]",
"bio14": "2050 RCP26 Precipitation of driest month [mm]"
},
"rcp85": {
"diff1": "2050 RCP85 Change in temperature [°C]",
"bio1": "2050 RCP85 Annual mean temperature [°C]",
"bio5": "2050 RCP85 Max temperature of warmest month [°C]",
"bio6": "2050 RCP85 Min temperature of coldest month [°C]",
"bio12": "2050 RCP85 Annual precipitation [mm]",
"bio13": "2050 RCP85 Precipitation of wettest month [mm]",
"bio14": "2050 RCP85 Precipitation of driest month [mm]"
},
"month": {
"1": "Jan",
"2": "Feb",
"3": "Mar",
"4": "Apr",
"5": "May",
"6": "Jun",
"7": "Jul",
"8": "Aug",
"9": "Sep",
"10": "Oct",
"11": "Nov",
"12": "Dec"
}
},
"p": {
"display": {
"title": "Accession details",
"subTitle": "Passport data and everything else",
"removeFromMyList": "Remove {{accessionNumber}} from my list",
"addToMyList": "Add {{accessionNumber}} to my list",
"holdingInstitute": "Holding institute",
"historic": "Historic accession",
"isHistoric": "This is a historic record of an accession",
"DOI": "DOI",
"loadChanges": "Show changes",
"acquisitionDate": "Acquisition Date",
"availability": "Availability for distribution",
"ITPGRFAMLS": "ITPGRFA MLS",
"donorInstitute": "Donor institute",
"donorAccessionNumber": "Donor accession number",
"safetyDuplicationInstitute": "Safety duplication institute",
"accessionURL": "Accession URL",
"scientificName": "Scientific name",
"cropName": "Crop",
"providedCropName": "Provided crop name",
"accessionNames": "Accession names",
"collectingInformation": "Collecting information",
"remarks": "Remarks",
"pdci": "Passport Data Completeness Index",
"metadata": "Metadata",
"permanentURL": "Permanent URL",
"associatedDatasets": "Associated Datasets",
"associatedSubsets": "Associated Subsets",
"relatedResources": "Related resources",
"imageGallery": "Image gallery",
"MCPD": "MCPD",
"zip": "ZIP",
"climateAtCollection": "Climate at origin",
"additionalInfo": "Bioclimatic variables",
"partner": "Data provider",
"climateSimilar": {
"title": "Accessions with similar climatic properties",
"intro": "Georeferenced accesions in Genesys are linked to their climate data based on worldclim.org datasets. Genesys will try to find similar georeferenced accessions that match the basic climatic parameters: annual mean temperature, seasonality and rainfall.",
"view": "List accessions"
"climateDescription": {
"temp": "Derived from the monthly temperature values in order to generate more biologically meaningful variables. They represent annual or quarterly trends.",
"prec": "Derived from the monthly rainfall values in order to generate more biologically meaningful variables. They represent annual or quarterly trends."
},
"model": {
"modelName": "Accession",
"modelName_plural": "Accessions",
"menu": "Accessions",
"stats": "Accession record",
"stats_plural": "Accession records",
"acceNumb": "Accession number",
"countryOfOrigin": "Origin of material",
"instituteCode": "Institute code",
"institute": {
"country": {
"iso3": "Country of holding institute"
}
},
"browse": {
"title": "Accession browser",
"subTitle": "Explore curated sets of accessions"
},
"map": {
"andMore": "And {{otherMore}} more",
"kml": "KML",
"filterAccessions": "Filter accessions",
"pick": "Show climate",
"stopPick": "Cancel",
"noClimateData": "No climate data available for selected location"
}
}
},
"tab": {
"data": "Accessions",
"overview": "Overview",
"map": "Map"
},
"climate": {
"bio1": "Annual mean temperature [°C]",
"bio2": "Mean diurnal range (mean of monthly (max temp - min temp))",
"bio3": "Isothermality (bio2/bio7) (* 100)",
"bio4": "Temperature seasonality (standard deviation *100)",
"bio5": "Max temperature of warmest month [°C]",
"bio6": "Min temperature of coldest month [°C]",
"bio7": "Temperature annual range (bio5-bio6) [°C]",
"bio8": "Mean temperature of wettest quarter [°C]",
"bio9": "Mean temperature of driest quarter [°C]",
"bio10": "Mean temperature of warmest quarter [°C]",
"bio11": "Mean temperature of coldest quarter [°C]",
"bio12": "Annual precipitation [mm]",
"bio13": "Precipitation of wettest month [mm]",
"bio14": "Precipitation of driest month [mm]",
"bio15": "Precipitation seasonality (coefficient of variation)",
"bio16": "Precipitation of wettest quarter [mm]",
"bio17": "Precipitation of driest quarter [mm]",
"bio18": "Precipitation of warmest quarter [mm]",
"bio19": "Precipitation of coldest quarter [mm]",
"monthlyPrecipitation": "Monthly precipitation",
"precipitation": "Precipitation",
"monthlyTemp": "Monthly temperature",
"tMin": "Minimal temperature",
"tMean": "Mean temperature",
"tMax": "Maximal temperature",
"label": {
"prec": "Monthly precipitation [mm]",
"tmin": "Minimum temperature [°C]",
"tmean": "Mean temperature [°C]",
"tmax": "Maximum temperature [°C]"
},
"rcp26": {
"diff1": "2050 RCP26 Change in temperature [°C]",
"bio1": "2050 RCP26 Annual mean temperature [°C]",
"bio5": "2050 RCP26 Max temperature of warmest month [°C]",
"bio6": "2050 RCP26 Min temperature of coldest month [°C]",
"bio12": "2050 RCP26 Annual precipitation [mm]",
"bio13": "2050 RCP26 Precipitation of wettest month [mm]",
"bio14": "2050 RCP26 Precipitation of driest month [mm]"
},
"rcp85": {
"diff1": "2050 RCP85 Change in temperature [°C]",
"bio1": "2050 RCP85 Annual mean temperature [°C]",
"bio5": "2050 RCP85 Max temperature of warmest month [°C]",
"bio6": "2050 RCP85 Min temperature of coldest month [°C]",
"bio12": "2050 RCP85 Annual precipitation [mm]",
"bio13": "2050 RCP85 Precipitation of wettest month [mm]",
"bio14": "2050 RCP85 Precipitation of driest month [mm]"
},
"month": {
"1": "Jan",
"2": "Feb",
"3": "Mar",
"4": "Apr",
"5": "May",
"6": "Jun",
"7": "Jul",
"8": "Aug",
"9": "Sep",
"10": "Oct",
"11": "Nov",
"12": "Dec"
}
},
"climateDescription": {
"temp": "Derived from the monthly temperature values in order to generate more biologically meaningful variables. They represent annual or quarterly trends.",
"prec": "Derived from the monthly rainfall values in order to generate more biologically meaningful variables. They represent annual or quarterly trends."
},
"model": {
"modelName": "Accession",
"modelName_plural": "Accessions",
"menu": "Accessions",
"stats": "Accession record",
"stats_plural": "Accession records",
"acceNumb": "Accession number",
"countryOfOrigin": "Origin of material",
"instituteCode": "Institute code",
"institute": {
"country": {
"iso3": "Country of holding institute"
"taxonomy": "Taxonomy",
"genus": "Genus",
"species": "Species",
"doi": "DOI",
"sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage",
"lastModifiedDate": "Last updated",
"createdDate": "First uploaded",
"alias": {
"OTHERNUMB": "Other identifier",
"ACCENAME": "Accession name",
"DONORNUMB": "Donor accession number",
"COLLNUMB": "Collecting number"
},
"available": {
"0": "Not available for distribution",
"1": "Available for distribution",
"true": "Available for distribution",
"false": "Not available for distribution",
"null": "Availability not provided"
},
"sgsv": {
"0": "Not in SGSV",
"1": "Backed up in SGSV",
"true": "Backed up in SGSV",
"false": "Not in SGSV"
},
"mlsStatus": {
"0": "Not declared in the Multi-lateral system of ITPGRFA",
"1": "Accession is part of the Multi-lateral system of ITPGRFA",
"true": "Accession is part of the Multi-lateral system of ITPGRFA",
"false": "Not declared in the Multi-lateral system of ITPGRFA",
"null": "Status not provided"
},
"coll": {
"collCode": "Collecting institute code",
"collNumb": "Collecting number",
"collDate": "Collecting date of sample",
"collMissId": "Collecting mission identifier",
"collName": "Collecting institute name",
"collSite": "Location of collecting site",
"collSrc": "Collecting source"
},
"geo": {
"latitude": "Latitude of collecting site",
"longitude": "Longitude of collecting site",
"uncertainty": "Coordinate uncertainty",
"datum": "Geodetic datum",
"method": "Georeferencing method",
"elevation": "Elevation of collecting site",
"climate": {
"bio1": "Annual mean temperature [°C]",
"bio2": "Mean diurnal range (mean of monthly (max temp - min temp))",
"bio3": "Isothermality (bio2/bio7) (* 100)",
"bio4": "Temperature seasonality (standard deviation *100)",
"bio5": "Max temperature of warmest month [°C]",
"bio6": "Min temperature of coldest month [°C]",
"bio7": "Temperature annual range (bio5-bio6) [°C]",
"bio8": "Mean temperature of wettest quarter [°C]",
"bio9": "Mean temperature of driest quarter [°C]",
"bio10": "Mean temperature of warmest quarter [°C]",
"bio11": "Mean temperature of coldest quarter [°C]",
"bio12": "Annual precipitation [mm]",
"bio13": "Precipitation of wettest month [mm]",
"bio14": "Precipitation of driest month [mm]",
"bio15": "Precipitation seasonality (coefficient of variation)",
"bio16": "Precipitation of wettest quarter [mm]",
"bio17": "Precipitation of driest quarter [mm]",
"bio18": "Precipitation of warmest quarter [mm]",
"bio19": "Precipitation of coldest quarter [mm]"
}
},
"storage": {
"10": "Seed collection",
"11": "Short term seed collection",
"12": "Medium term seed collection",
"13": "Long term seed collection",
"20": "Field collection",
"30": "In vitro collection",
"40": "Cryopreserved collection",
"50": "DNA collection",
"99": "Other"
},
"sampleStatus": {
"100": "Wild",
"110": "Natural",
"120": "Semi-natural/wild",
"130": "Semi-natural/sown",
"200": "Weedy",
"300": "Traditional cultivar/Landrace",
"400": "Breeding/Research Material",
"410": "Breeders Line",
"411": "Synthetic population",
"412": "Hybrid",
"413": "Founder stock/base population",
"414": "Inbred line",
"415": "Segregating population",
"416": "Clonal selection",
"420": "Genetic stock",
"421": "Mutant",
"422": "Cytogenetic stocks",
"423": "Other genetic stocks",
"500": "Advanced/improved cultivar",
"600": "GMO",
"999": "Other"
},
"collectingSource": {
"10": "Wild habitat",
"11": "Forest or woodland",
"12": "Shrubland",
"13": "Grassland",
"14": "Desert or tundra",
"15": "Aquatic habitat",
"20": "Field or cultivated habitat",
"21": "Field",
"22": "Orchard",
"23": "Backyard, kitchen or home garden (urban, peri-urban or rural)",
"24": "Fallow land",
"25": "Pasture",
"26": "Farm store",
"27": "Threshing floor",
"28": "Park",
"30": "Market or shop",
"40": "Institute, Experimental station, Research organization, Genebank",
"50": "Seed company",
"60": "Weedy, disturbed or ruderal habitat",
"61": "Roadside",
"62": "Field margin",
"99": "Other"
}
},
"taxonomy": "Taxonomy",
"genus": "Genus",
"species": "Species",
"doi": "DOI",
"sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage",
"lastModifiedDate": "Last updated",
"createdDate": "First uploaded",
"alias": {
"OTHERNUMB": "Other identifier",
"ACCENAME": "Accession name",
"DONORNUMB": "Donor accession number",
"COLLNUMB": "Collecting number"
},
"available": {
"true": "Available for distribution",
"false": "Not available for distribution",
"1": "Available for distribution",
"0": "Not available for distribution",
"null": "Availability not provided"
},
"sgsv": {
"true": "Backed up in SGSV",
"false": "Not in SGSV",
"1": "Backed up in SGSV",
"0": "Not in SGSV"
},
"mlsStatus": {
"true": "Accession is part of the Multi-lateral system of ITPGRFA",
"false": "Not declared in the Multi-lateral system of ITPGRFA",
"1": "Accession is part of the Multi-lateral system of ITPGRFA",
"0": "Not declared in the Multi-lateral system of ITPGRFA",
"null": "Status not provided"
},
"coll": {
"collCode": "Collecting institute code",
"collNumb": "Collecting number",
"collDate": "Collecting date of sample",
"collMissId": "Collecting mission identifier",
"collName": "Collecting institute name",
"collSite": "Location of collecting site",
"collSrc": "Collecting source"
},
"geo": {