Commit 571e1eaa authored by Matija Obreza's avatar Matija Obreza

Merge branch '402-i18n' into 'master'

Resolve "i18n"

Closes #402

See merge request !318
parents dab5265b eab4fc9f
Pipeline #7459 passed with stages
in 7 minutes and 59 seconds
const fg = require('fast-glob');
const _ = require('lodash');
const fs = require('fs');
const getPrefix = (path) => path.substring(path.indexOf('./src/') + './src/'.length, path.indexOf('/translations.json'));
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}}`));
const getTranslations = (path) => {
const prefix = getPrefix(path);
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}}",
"approve": "Approve",
"backTo": "Back to {{where, lowercase}}",
"backToDashboard": "Back to dashboard",
"cancel": "Cancel",
"close": "Close",
"collapse": "Collapse",
"delete": "Delete",
"download": "Download",
"edit": "Edit",
"login": "Login",
"logout": "Logout",
"publish": "Publish",
"saveChanges": "Save changes",
"search": "Search",
"viewDetails": "View details"
"unpublish": "Unpublish",
"un-publish": "Un-publish",
"viewDetails": "View details",
"applyFilters": "Apply filters",
"back": "Back",
"backToList": "Back to list",
"create": "Create",
"deleteData": "Delete data",
"manage": "Manage",
"nextStep": "Next step",
"openSidebar": "Open sidebar",
"read": "Read",
"reject": "Reject",
"remove": "Remove",
"reset": "Reset",
"return": "Return",
"save": "Save",
"show": "Show",
"sendToReview": "Send to review",
"view": "View",
"write": "Write",
"acceptAndPublish": "ACCEPT AND PUBLISH"
},
"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",
"keyword": "Keyword search",
"fromIncluding": "From including",
"lastModifiedDate": "Last modified date",
"textSearch": "Text search"
},
"label": {
"item": "Item",
"item_plural": "Items",
"list": "List",
"list_plural": "Lists"
"list_plural": "Lists",
"created": "Created",
"dateNotProvided": "Date not provided",
"description": "Description",
"either": "Either",
"filters": "Filters",
"from": "From",
"itemEditorWarn": "Don't use the ItemsEditor for more than 100 items!",
"lastModified": "Last modified",
"lastUpdated": "Last updated",
"modified": "Modified",
"no": "No",
"prettyNumber": "{{value, number}}",
"registered": "Registered",
"sortBy": "Sort By",
"status": "Status",
"stepsForDataPublication": "Steps for data publication completion",
"title": "Title",
"to": "To",
"untitled": "Untitled",
"UUID": "UUID",
"version": "Version {{version, numeric}}",
"yes": "Yes",
"basicMarkdown": "Basic markdown supported",
"fullMarkdown": "Full markdown supported",
"previewMarkdown": "Preview markdown"
},
"message": {
"confirmDelete": "Deleting the {{what, lowercase}} record is only possible when there is no associated data."
},
"paginate": {
"numberOfItems": "{{count}} {{what, lowercase}}"
"numberOfItems": "{{count}} {{what, lowercase}}",
"estimatedNumberOfItems": "About {{count, number}} {{what, lowercase}}"
},
"permissions": {
"label": "Permissions",
"managePermissions": "Manage permissions",
"class": "Class",
"objectID": "Object ID",
"owner": "Owner",
"inheritsPermissions": "inheritsPermissions",
"effectivePermissions": "Effective permissions",
"sid": "Sid"
},
"snackbar": {
"resettingFilters": "Resetting filters...",
"applyingFilters": "Applying filters..."
},
"sort": {
"title": "Title",
"version": "Version",
"owner": "Owner",
"createdDate": "Created date",
"latestEdit": "Latest edit",
"lastModifiedDateAsc": "Last modified date (oldest first)",
"lastModifiedDateDesc": "Last update (newest first)"
},
"status": {
"published": "Published",
"inReview": "In review",
"inProgress": "In progress"
}
}
{
"Genesys Catalog": "Genesys Catalog",
"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"
"common": {
"menu": {
"dashboard": "My Dashboard",
"profile": "My profile",
"home": "Home"
},
"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"
}
},
"dashboard": {
"action": {
"submitSelected": "Submit selected",
"unpublishSelected": "Unpublish selected",
"approveSelected": "Approve selected",
"deleteSelected": "Delete selected"
},
"c": {
"topSection": {
"dataPublication": "Data publication",
"newInData": "New in the data publication process?",
"seeTour": "SEE GUIDED TOUR",
"catalog": "CATALOG"
},
"bottomSection": {
"allFields": "* All fields marked with * are required."
}
},
"f": {
"selectOwner": "Select owner"
},
"crop": "Crop",
"owner": "Owner",
"modified": "Modified",
"status": "Status"
},
"public": {
"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"
},
"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": "Expired",
"locked": "Locked",
"email": "E-mail address",
"uuid": "UUID"
}
}
},
"Genesys Catalog": "Genesys Catalog",
"label": {
"crop": "Crop",
"crop_plural": "Crops",
......@@ -26,81 +127,23 @@
"partner": "Data provider",
"partner_plural": "Data providers",
"vocabulary": "Controlled vocabulary",
"vocabulary_plural": "Controlled vocabularies",
"metadata": "Record metadata"
},
"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": "Descriptor lists",
"Descriptors": "Descriptors",
"Home": "Home",
"My Dashboard": "My dashboard",
"My profile": "My profile",
"Partners": "Data providers",
"Data providers": "Data providers"
"vocabulary_plural": "Controlled vocabularies"
},
"p": {
"crop": {
"subtitle": "List of crops registered with Genesys",
"title": "Crops"
},
"dashboard": {
"title": "My Dashboard",
"subtitle": "Manage data published on Genesys"
},
"dataset": {
"title": "Dataset details"
},
"datasets": {
"title": "Datasets",
"subtitle": "Datasets published by Genesys data providers"
},
"descriptorlists": {
"title": "Descriptor lists",
"subtitle": "Compilations of crop descriptors"
},
"descriptors": {
"title": "Descriptor definitions",
"subtitle": "Genesys Catalog of published descriptor definitions"
},
"partner": {
"address": "Address",
"countries": "Countries",
"email": "Contact email",
"phone": "Phone number",
"urls": "Websites",
"wiewsCodes": "FAO WIEWS codes"
},
"partners": {
"title": "Genesys Data providers",
"subtitle": "Data providers in the Catalog of Phenotypic Datasets"
},
"userprofile": {
"title": "User profile",
"subtitle": "You can see and update your profile information here"
},
"vocab": {
"subtitle": "Commonly used controlled vocabularies",
"title": "Vocabularies"
"welcome": {
"title": "Genesys Catalog"
},
"editPartner": {
"name": {
"new": "New data provider",
"label": "Data provider name",
"placeholder": "Data provider name"
},
"description": {
"placeholder": "Data provider introduction text (markdown)"
},
"websites": "Data provider websites"
"login": {
"title": "Welcome to Genesys",
"subtitle": "Log in to manage datasets"
}
},
"stats": {
......@@ -145,8 +188,7 @@
"DIGITIZER": "Digitizes data.",
"CURATOR": "Organizes and validates data and metadata in correct format, ensures quality of both."
}
},
"contact": "Data provider contact information"
}
},
"search": {
"group": {
......@@ -191,15 +233,6 @@
"name": "Name",
"shortName": "Short name"
},
"partners" : {
"partners": "Data providers",
"acronym": "Acronym",
"title": "Title",
"description": "Description",
"ICRISAT": "ICRISAT",
"international": "International",
"partnerDescription": "Data provider description"
},
"descriptorList": {
"_text": "Keywords",
"description": "Description",
......@@ -228,7 +261,7 @@
"accessions": {
"crops": "Crop name",
"institute": {
"code" : "Institute code"
"code": "Institute code"
},
"orgCty": {
"iso3": "ORIGCTY"
......@@ -292,12 +325,888 @@
"selectPartner": {
"label": {
"Data provider": "Data provider",
"Partner": "Data provider",
"Select partner": "Select data provider",
"Select Partner": "Select data provider",
"Select owner": "Select owner"
}
}
},
"accessions": {
"common": {
"modelName": "Accession",
"modelName_plural": "Accessions",
"menu": "Accessions",
"stats": "Accession record",
"stats_plural": "Accession records",
"acceNumb": "Accession number",
"countryOfOrigin": "Country of origin",
"instituteCode": "Institute code",
"taxonomy": "Taxonomy",
"genus": "Genus",
"species": "Species",
"doi": "DOI",
"sampStat": "Biological status of accession",
"storageType": "Type of germplasm storage",
"alias": {
"OTHERNUMB": "Other identifier",
"ACCENAME": "Accession name",
"DONORNUMB": "Donor accession number",
"COLLNUMB": "Collecting number"
},
"available": {
"true": "Available for distribution",
"false": "Not available for distribution",
"null": "Availability not provided"
},
"mlsStatus": {
"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"
},
"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"
},
"select": "Select data provider"
"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"
},
"overview": {
"institute code": "Holding Institute",
"institute country code3": "Country of holding institute",
"crop shortName": "Crop",
"cropName": "Provided crop name",
"sampStat": "Biological status of accession",
"taxonomy genus": "Genus",
"taxonomy genusSpecies": "Species",
"countryOfOrigin code3": "Country of Origin",
"donorCode": "FAO WIEWS code of donor institute",
"mlsStatus": "ITGPRFA Multi-lateral system",
"available": "Available for distribution",
"duplSite": "Site of safety duplication",
"breederCode": "Breeder code",
"sgsv": "Safety duplicated in Svalbard",
"storage": "Type of Germplasm storage"
}
}
},
"crop": {
"admin": {
"c": {
"cropForm": {
"cropCode": "Crop code",
"cropTitle": "Crop title",
"back": "Back to crop list"
}
},
"p": {
"edit": {
"onDelete": {
"message": "Delete crop '{{cropName, lowercase}}'?",
"description": "Note, deleting any crop causes mayhem."
}
}
}
},
"common": {
"modelName": "Crop",
"modelName_plural": "Crops",
"subtitle": "List of crops registered with Genesys",
"title": "Crops"
},
"public": {
"c": {
"cropSelector": {
"helper": "Contact helpdesk@genesys-pgr.org to register additional crops."