Commit 6e1a1487 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov Committed by Matija Obreza

i18n

- src/translations.json for application strings
- translations for common components
- translations split into modules, a script compiles one translation file
- i18n for user module
- i18n for requests module
- i18n for list module
- i18n for accessions module
- i18n for repository module
- i18n for subsets
- i18n for institutes module
- i18n for crop module
parent 59af41c0
const fg = require('fast-glob');
const _ = require('lodash');
const fs = require('fs');
fg([`./src/**/translations.json`, `./src/translations.json`])
.then((entries) => entries.map((path) => getTranslations(path)))
.then((content) => fs.writeFileSync(`locales/en/translations.json`, `{\n${content}}`));
const getTranslations = (path) => {
const prefix = path.substring(path.indexOf('./src/') + './src/'.length, path.indexOf('/translations.json'));
console.log('Loading translations of module', prefix);
const fileContent = fs.readFileSync(path, 'utf8');
return prefix !== '/' ? _(`"${prefix}": ${fileContent}\n`).value() : fileContent.substr(1, fileContent.length - 2);
};
{
"action": {
"add": "Add {{what, lowercase}}",
"applyFilters": "Apply filters",
"approve": "Approve and publish",
"back": "Back",
"backTo": "Back to {{where, lowercase}}",
"cancel": "Cancel",
"delete": "Delete",
"deleteData": "Delete data",
"edit": "Edit",
"login": "Login",
"logout": "Logout",
"nextStep": "Next step",
"reject": "Reject",
"remove": "Remove",
"reset": "Reset",
"return": "Return",
"save": "Save",
"saveChanges": "Save changes",
"search": "Search",
"viewDetails": "View details"
"sendToReview": "Send to review",
"unpublish": "Unpublish"
},
"label": {
"item": "Item",
"item_plural": "Items",
"list": "List",
"list_plural": "Lists",
"prettyNumber": "{{value, number}}"
"csv": {
"autoDetect": "Auto-detect ",
"autoDetectLabel": "Auto-detect CSV settings",
"comma": "Comma",
"configuration": "CSV configuration",
"escapeCharacter": "Escape character",
"other": "Other",
"quoteCharacter": "Quote character",
"semicolon": "Semicolon",
"separator": "Separator character",
"space": "Space",
"tab": "Tab",
"typeYourEscapeCharacter": "Type your escape character",
"typeYourQuoteCharacter": "Type your quote character",
"typeYourSeparator": "Type your separator"
},
"f": {
"dateSearch": "Date search",
"fromIncluding": "From including",
"lastModifiedDate": "Last modified date",
"textSearch": "Text search"
},
"message": {
"confirmDelete": "Deleting the {{what, lowercase}} record is only possible when there is no associated data."
"fileUploader": {
"chooseFiles": "Choose files to upload",
"dragFiles": "Drag files here \n or",
"release": "Release to upload"
},
"label": {
"dateNotProvided": "Date not provided",
"description": "Description",
"either": "Either",
"itemEditorWarn": "Don't use the ItemsEditor for more than 100 items!",
"lastUpdated": "Last updated",
"no": "No",
"prettyNumber": "{{value, number}}",
"sortBy": "Sort By",
"stepsForDataPublication": "Steps for data publication completion",
"title": "Title",
"yes": "Yes"
},
"paginate": {
"numberOfItems": "{{count, number}} {{what, lowercase}}",
......
{
"Genesys PGR": "Genesys PGR",
"Not found": "Not found",
"Nothing matches your request": "Nothing matches your request",
"footer": {
"About Genesys": "About Genesys",
"Contact Us": "Contact us",
"Copyright policy": "Copyright policy",
"Disclaimer": "Disclaimer",
"Privacy policy": "Privacy policy",
"Report an issue": "Report an issue",
"Source code": "Source code",
"Terms and Conditions of Use": "Terms and Conditions of Use",
"Translate Genesys": "Translate Genesys",
"copyright": "© {{from}} - {{to}} Data providers and the Crop Trust"
},
"label": {
"crop": "Crop",
"crop_plural": "Crops",
"metadata": "Record metadata",
"subset": "Subset",
"subset_plural": "Subsets",
"accession": "Accession",
"accession_plural": "Accessions",
"institute": "Institute",
"institute_plural": "Institutes"
},
"m": {
"crop": {
"helper": "Contact helpdesk@genesys-pgr.org to register additional crops."
}
},
"menu": {
"Accessions": "Accessions",
"Controlled vocabularies": "Controlled vocabularies",
"Crops": "Crops",
"Datasets": "Datasets",
"Descriptor lists": "Crop descriptors",
"Descriptors": "Descriptors",
"Home": "Home",
"My Dashboard": "My dashboard",
"My profile": "My profile",
"My List": "My List",
"Partners": "Partners",
"Subsets": "Subsets",
"Institutes": "Institutes",
"Admin": "Administration",
"login": "Login",
"register": "Registration"
},
"content": {
"menu": {
"about": "About Genesys",
"contact": "Contact us",
"what-is-genesys": "What is Genesys?",
"history-of-genesys": "History of Genesys",
"newsletter": "Genesys Newsletter",
"faq": "Frequently asked questions",
"how-to-use-genesys": "How to use Genesys?",
"disclaimer": "Disclaimer",
"terms": "Terms and Conditions of Use",
"copying": "Copyright policy",
"privacy": "Privacy policy"
}
},
"p": {
"crop": {
"subtitle": "List of crops registered with Genesys",
"title": "Crops"
},
"dashboard": {
"title": "My Dashboard",
"subtitle": "Manage data published on Genesys",
"profile": {
"title": "User profile",
"password": {
"disable to change pass": "You can't set your password if you use Google auth",
"title": "Password change",
"New password": "New password",
"Old password": "Old password",
"Confirm password": "Confirm password"
"public": {
"p": {
"welcome": {
"About Genesys PGR": "About the Genesys PGR",
"Bookmark this page": "Bookmark this page",
"Contribute to Genesys": "Contribute to Genesys",
"Subscribe to Newsletter": "Subscribe to Newsletter",
"search": {
"placeholder": "Search Genesys...",
"suggestion0": "Try 'maize' or 'wild triticum'",
"suggestion1": "How about 'rice'",
"suggestion2": "What is 'MARDI' up to?",
"suggestion3": "'IRGC 1000' maybe",
"suggestion4": "Try 'leaf shape'",
"suggestion5": "Anything on 'cassava'?",
"suggestion6": "Maybe 'drought'"
}
}
},
"admin": {
"users": {
"list": "Registered user accounts",
"profile": {
"information": "User profile information",
"edit": {
"title": "Update user profile",
"fullName": "Full name",
"email": "E-mail address",
"roles": "User roles"
}
}
},
"repository": {
"file": {
"formTitle": "Update file metadata",
"form": {
"title": "Title",
"description": "Description",
"subject": "Subject",
"rightsHolder": "Rights Holder",
"originalUrl": "Original URL",
"license": "License",
"extent": "Extent",
"creator": "Creator",
"contentType": "Content Type",
"bibliographicCitation": "Bibliographic Citation",
"accessRights": "Access Rights"
}
"search": {
"group": {
"descriptor": "Descriptors",
"accession": "Accessions",
"crop": "Crops",
"partner": "Data providers",
"dataset": "Datasets"
}
},
"prettyF": {
"NOT": "Excluding {{what}}",
"accessions": {
"crop": "Crop",
"acceNumb": "Accession number",
"seqNo": "Sequential number",
"sampStat": "Biological status",
"storage": "Storage",
"geo": {
"latitude": "Latitude",
"longitude": "Longitude",
"elevation": "Elevation"
},
"folder": {
"createDialogTitle": "Create new folder",
"createBtn": "Create new folder",
"updateDialogTitle": "Update folder metadata",
"updateBtn": "Edit folder",
"form": {
"title": "Title",
"description": "Description",
"name": "Folder name"
"holder": {
"code": "Holder",
"country": {
"iso3": "Holder country",
"region": "Holder region"
}
},
"lastModifiedDate": {
"": "Last updated",
"ge": "Updated after",
"le": "Updated before"
},
"taxa": {
"genus": "Genus",
"species": "Species",
"subtaxa": "Subtaxa"
},
"origin": {
"iso3": "Origin"
},
"taxonomy": {
"genus": "Genus",
"species": "Species",
"subtaxa": "Subtaxon"
},
"sgsv": "Svalbard",
"mlsStatus": "MLS",
"available": "Available",
"historic": "Historic"
},
"subsets": {
"title": "Title",
"crop": "Crop",
"institutes": "Institute code",
"description": "Description"
},
"wiews": {
"code": "Institute code",
"accessions": "Accessions in Genesys",
"country": {
"iso3": "Country code"
}
},
"users": {
"role": "Role",
"enabled": "Active",
"expired": "Exptired",
"locked": "Locked",
"email": "E-mail address",
"uuid": "UUID"
}
}
},
"stats": {
"Accessions": "Accession record",
"Accessions_plural": "Accession records",
"Phenotypic datasets": "C&E Dataset",
"Phenotypic_plural datasets": "C&E Datasets",
"Subsets": "Subset",
"Subsets_plural": "Subsets",
"Institutes": "Institute",
"Institutes_plural": "Institutes"
"dashboard": {
"p": {
"dashboard": {
"title": "My Dashboard",
"subtitle": "Manage data published on Genesys"
}
}
},
"welcome": {
"About Genesys PGR": "About the Genesys PGR",
"Bookmark this page": "Bookmark this page",
"Contribute to Genesys": "Contribute to Genesys",
"Subscribe to Newsletter": "Subscribe to Newsletter",
"search": {
"placeholder": "Search Genesys...",
"suggestion0": "Try 'maize' or 'wild triticum'",
"suggestion1": "How about 'rice'",
"suggestion2": "What is 'MARDI' up to?",
"suggestion3": "'IRGC 1000' maybe",
"suggestion4": "Try 'leaf shape'",
"suggestion5": "Anything on 'cassava'?",
"suggestion6": "Maybe 'drought'"
"common": {
"Genesys PGR": "Genesys PGR",
"Not found": "Not found",
"Nothing matches your request": "Nothing matches your request",
"label": {
"metadata": "Record metadata"
},
"footer": {
"About Genesys": "About Genesys",
"Contact Us": "Contact us",
"Copyright policy": "Copyright policy",
"Disclaimer": "Disclaimer",
"Privacy policy": "Privacy policy",
"Report an issue": "Report an issue",
"Source code": "Source code",
"Terms and Conditions of Use": "Terms and Conditions of Use",
"Translate Genesys": "Translate Genesys",
"copyright": "© {{from}} - {{to}} Data providers and the Crop Trust"
},
"menu": {
"Controlled vocabularies": "Controlled vocabularies",
"Datasets": "Datasets",
"Descriptor lists": "Crop descriptors",
"Descriptors": "Descriptors",
"Home": "Home",
"My Dashboard": "My dashboard",
"My profile": "My profile",
"Partners": "Partners",
"Admin": "Administration",
"login": "Login",
"register": "Registration"
}
},
"dataset": {
"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."
"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."
}
}
}
},
"search": {
"group": {
"descriptor": "Descriptors",
"accession": "Accessions",
"crop": "Crops",
"partner": "Data providers",
"dataset": "Datasets"
"geo": {
"common": {
"location": "Location",
"latitude": "Latitude",
"longitude": "Longitude",
"address": "Address",
"country": "Country"
}
},
"f": {
"NOT": "Excluding {{what}}",
"accessions": {
"crop": "Crop",
"acceNumb": "Accession number",
"seqNo": "Sequential number",
"sampStat": "Biological status",
"storage": "Storage",
"geo": {
"latitude": "Latitude",
"longitude": "Longitude",
"elevation": "Elevation"
},
"holder": {
"code" : "Holder",
"country": {
"iso3": "Holder country",
"region": "Holder region"
}
},
"lastModifiedDate": {
"": "Last updated",
"ge": "Updated after",
"le": "Updated before"
},
"taxa": {
"genus": "Genus",
"species": "Species",
"subtaxa": "Subtaxa"
},
"origin": {
"iso3": "Origin"
},
"taxonomy": {
"genus": "Genus",
"species": "Species",
"subtaxa": "Subtaxon"
}
,"accessions": {
"public": {
"c": {
"accessionCard": {
"addToMyList": "Add to my list"
},
"sgsv": "Svalbard",
"mlsStatus": "MLS",
"available": "Available",
"historic": "Historic"
"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}}."
}
},
"subsets": {
"title": "Title",
"crop": "Crop",
"institutes": "Institute code",
"description": "Description"
"f": {
"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"
},
"wiews": {
"code": "Institute code",
"accessions": "Accessions in Genesys",
"country": {
"iso3": "Country code"
"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",
"DOI": "DOI",
"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 name",
"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"
},
"browse": {
"title": "Accession browser",
"subTitle": "Explore curated sets of accessions"
}
},
"users": {
"role": "Role",
"enabled": "Active",
"expired": "Exptired",
"locked": "Locked",
"email": "E-mail address",
"uuid": "UUID"
}
},
"subset": {
"creator": {
"role": {
"MANAGER": "Data manager",
"DIGITIZER": "Data digitizer",
"COLLECTOR": "Data collector",
"CURATOR": "Data curator"
}
}
"tab": {
"data": "Accessions",
"overview": "Overview",