Skip to content

Commit fe3bec2

Browse files
authored
Translation (#13)
Merge translation branch with the main one.
2 parents e7a98fa + a3aedcf commit fe3bec2

40 files changed

+1110
-634
lines changed

build/entitlements.mac.plist

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>com.apple.security.cs.allow-jit</key>
6-
<true/>
75
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
86
<true/>
9-
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
10-
<true/>
117
</dict>
128
</plist>

package-lock.json

Lines changed: 267 additions & 235 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@
3030
"dexie-react-hooks": "^1.1.7",
3131
"dotenv": "^16.4.5",
3232
"electron-updater": "^6.1.7",
33+
"i18next": "^24.2.3",
34+
"i18next-fs-backend": "^2.6.0",
35+
"i18next-http-backend": "^3.0.2",
3336
"jszip": "^3.10.1",
3437
"lodash": "^4.17.21",
3538
"papaparse": "^5.4.1",
3639
"playwright": "^1.45.1",
40+
"react-i18next": "^15.4.1",
3741
"react-redux": "^9.1.2",
3842
"react-router-dom": "^6.23.1",
3943
"react-select": "^5.8.0",
Lines changed: 63 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react'
2+
import { useTranslation } from 'react-i18next'
23
import { MicroChevronLeft, MicroChevronRight } from './Icons'
34

45
const Pagination = ({
@@ -10,66 +11,70 @@ const Pagination = ({
1011
jumpToPage,
1112
setJumpToPage,
1213
itemsPerPage
13-
}) => (
14-
<div className="flex justify-between items-center mt-4 w-full max-w-4xl mx-auto text-sm">
15-
<div className="flex items-center">
16-
<form onSubmit={onJumpToPageSubmit} className="flex items-center">
17-
<label htmlFor="jumpToPage" className="mr-2">
18-
Jump to page:
19-
</label>
20-
<input
21-
type="number"
22-
id="jumpToPage"
23-
min="1"
24-
max={totalPages}
25-
value={jumpToPage}
26-
onChange={(e) => setJumpToPage(e.target.value)}
27-
className="px-2 py-1 border border-gray-300 rounded"
28-
/>
29-
<button type="submit" className="ml-2 px-4 py-2 bg-blue-500 text-white rounded">
30-
Go
31-
</button>
32-
</form>
33-
</div>
34-
<div className="flex items-center">
35-
<div>
36-
<label htmlFor="itemsPerPage" className="mr-2">
37-
Rows per page:
38-
</label>
39-
<select
40-
id="itemsPerPage"
41-
value={itemsPerPage}
42-
onChange={onItemsPerPageChange}
43-
className="px-2 py-1 border border-gray-300 rounded"
44-
>
45-
<option value={10}>10</option>
46-
<option value={20}>20</option>
47-
<option value={50}>50</option>
48-
</select>
49-
</div>
50-
<span className="mx-4">
51-
Page {currentPage} of {totalPages}
52-
</span>
53-
<div className="mx-2">
54-
<button
55-
onClick={() => onPageChange(currentPage - 1)}
56-
disabled={currentPage === 1}
57-
className="px-4 py-2 bg-blue-500 text-white rounded disabled:bg-gray-300"
58-
>
59-
<MicroChevronLeft />
60-
</button>
14+
}) => {
15+
const { t } = useTranslation()
16+
17+
return (
18+
<div className="flex justify-between items-center mt-4 w-full max-w-4xl mx-auto text-sm">
19+
<div className="flex items-center">
20+
<form onSubmit={onJumpToPageSubmit} className="flex items-center">
21+
<label htmlFor="jumpToPage" className="mr-2">
22+
{t('pagination.jumpToPage')}
23+
</label>
24+
<input
25+
type="number"
26+
id="jumpToPage"
27+
min="1"
28+
max={totalPages}
29+
value={jumpToPage}
30+
onChange={(e) => setJumpToPage(e.target.value)}
31+
className="px-2 py-1 border border-gray-300 rounded"
32+
/>
33+
<button type="submit" className="ml-2 px-4 py-2 bg-blue-500 text-white rounded">
34+
{t('pagination.go')}
35+
</button>
36+
</form>
6137
</div>
62-
<div className="mx-2">
63-
<button
64-
onClick={() => onPageChange(currentPage + 1)}
65-
disabled={currentPage === totalPages}
66-
className="px-4 py-2 bg-blue-500 text-white rounded disabled:bg-gray-300"
67-
>
68-
<MicroChevronRight />
69-
</button>
38+
<div className="flex items-center">
39+
<div>
40+
<label htmlFor="itemsPerPage" className="mr-2">
41+
{t('pagination.rowsPerPage')}
42+
</label>
43+
<select
44+
id="itemsPerPage"
45+
value={itemsPerPage}
46+
onChange={onItemsPerPageChange}
47+
className="px-2 py-1 border border-gray-300 rounded"
48+
>
49+
<option value={10}>10</option>
50+
<option value={20}>20</option>
51+
<option value={50}>50</option>
52+
</select>
53+
</div>
54+
<span className="mx-4">
55+
{t('pagination.page')} {currentPage} {t('pagination.of')} {totalPages}
56+
</span>
57+
<div className="mx-2">
58+
<button
59+
onClick={() => onPageChange(currentPage - 1)}
60+
disabled={currentPage === 1}
61+
className="px-4 py-2 bg-blue-500 text-white rounded disabled:bg-gray-300"
62+
>
63+
<MicroChevronLeft />
64+
</button>
65+
</div>
66+
<div className="mx-2">
67+
<button
68+
onClick={() => onPageChange(currentPage + 1)}
69+
disabled={currentPage === totalPages}
70+
className="px-4 py-2 bg-blue-500 text-white rounded disabled:bg-gray-300"
71+
>
72+
<MicroChevronRight />
73+
</button>
74+
</div>
7075
</div>
7176
</div>
72-
</div>
73-
)
77+
)
78+
}
7479

7580
export default Pagination
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"overviewTitle": "About FASTR DHIS2 Data Downloader",
3+
"welcomeText": "Welcome to the FASTR DHIS2 Data Downloader, your go-to solution for easily extracting data from DHIS2 data systems. Whether you are a health ministry official, researcher, NGOs, or donor agency, the FASTR DHIS2 Data Downloader is designed to facilitate a streamlined process for downloading DHIS2 data.",
4+
"features": {
5+
"title": "Features",
6+
"downloadingData": {
7+
"title": "Downloading Data from DHIS2",
8+
"description": "Download DHIS2 data by selecting date ranges, data elements/indicators, organization levels, units, and disaggregated dimensions. Data is downloaded in CSV format.",
9+
"requirements": "Using the FASTR DHIS2 Data Downloader requires:",
10+
"requirementsList": ["URL of the DHIS2 instance", "Valid username", "Valid password"],
11+
"note": "Note: The FASTR DHIS2 Data Downloader does not handle DHIS2 account registration. It can only access DHIS2 systems for which you have valid credentials. The Downloader will not transmit or store your DHIS2 credentials anywhere other than on your laptop."
12+
},
13+
"dataDictionary": {
14+
"title": "Data Dictionary",
15+
"description": "Search for data elements/indicators by name or JSON ID. Access additional metadata and download it as a CSV file."
16+
},
17+
"downloadHistory": {
18+
"title": "Managing Download History",
19+
"description": "Record successful downloads, add notes, and quickly re-download past records. Option to keep or erase history upon logging out."
20+
},
21+
"facilityInfo": {
22+
"title": "Accessing Facility Information",
23+
"description": "The facility table feature offers a list of all health facilities registered in the DHIS2 system, along with key attributes, which can be exported as a CSV file. Additionally, the facility map feature allows you to view all facilities with GPS coordinates in a map format."
24+
}
25+
},
26+
"faq": {
27+
"title": "Frequently Asked Questions (FAQ)",
28+
"q1": {
29+
"question": "Why Do I Need to Select a Chunk Size?",
30+
"answer": "Chunk size refers to how many periods of data are grouped together. For example, if you are downloading facility-level monthly out-patient visits from January to December 2021, and you select the 3 as the chunk size, which means the Downloader will group 3 months together as a single request and make four requests in total to finish the download. Selecting a chunk size helps split large datasets into manageable parts, ensuring faster processing, easier downloads, and reduced risk of system overload. Always select the appropriate chunk size based on your country's DHIS2 system situations."
31+
},
32+
"q2": {
33+
"question": "Why did the download fail, and how can I find out what went wrong?",
34+
"answer1": "The data downloader produces a log of errors. Here are some common errors with an explanation and suggestions for solutions.",
35+
"answer2": "Error: \"Cannot read properties of null (reading 'textContent')\"\nCause: This usually happens when the requested time periods or indicators are missing. This could mean there is no data stored in DHIS2 for a specific indicator in a specific month or time period. To troubleshoot:",
36+
"requirements": [
37+
"Make sure you’ve selected the correct time periods and data indicators before starting the download.",
38+
"This error won’t interrupt the data download process. When a request fails, the system will continue, and you can review any failed requests once the download is complete."
39+
],
40+
"answer3": "Error: \"HTTP Status 500 – Internal Server Error\"\nCause: This error usually means there’s an issue with the server, often due to a disconnection. To troubleshoot:",
41+
"serverIssues": [
42+
"Ensure all required data fields (like time periods and data elements/indicators) are selected.",
43+
"Verify that your login credentials are correct.",
44+
"Check that the server is up and not experiencing any issues."
45+
]
46+
},
47+
"q3": {
48+
"question": "Why do I need to change the filename even though it says the file will be replaced?",
49+
"answer": "The downloader splits large requests into smaller parts and then combines them into a single file. Even if it says it’s replacing an existing file with the same name, the Data Downloader actually adds new data to that file. To avoid confusion, give each new download a unique name to ensure the data is correctly added."
50+
},
51+
"q4": {
52+
"question": "How can I avoid download timeouts with large data requests?",
53+
"answer": "Downloads have a 1-hour time limit, meaning requests that take longer than 1 hour will automatically time out. To avoid this, split your requests into smaller batches to ensure each download is completed within the time frame. Each DHIS2 system operates uniquely, with variations in data download speeds. You may need to experiment to find the optimal data volume that can be requested in a single download."
54+
},
55+
"q5": {
56+
"question": "How much data can I download into an Excel file?",
57+
"answer": "Excel can handle around 1 million rows, so if you’re downloading large datasets (e.g., data from thousands of facilities across multiple months), you might reach Excel’s limit. To manage this, try downloading the data in smaller batches. If you exceed Excel’s capacity, you can still open the CSV file in statistical software to access the full dataset."
58+
}
59+
},
60+
"resources": {
61+
"title": "Additional Resources",
62+
"description": "Learn more about how to use the FASTR DHIS2 Data Downloader by visiting our Training Resources. The code is accessible via GitHub under BSD-2 License."
63+
},
64+
"team": {
65+
"title": "Our Team",
66+
"description": "The FASTR DHIS2 Data Downloader was developed by the Results and Learning team at the Global Financing Facility for Women, Children and Adolescents (GFF). The Frequent Assessments and System Tools for Resilience (FASTR) initiative, aims to enable rapid-cycle monitoring for strengthening PHC systems and improving RMNCAH-N outcomes through the timely and high-frequency analysis and use of data."
67+
},
68+
"contact": {
69+
"title": "Get In Touch",
70+
"contactText": "For support, feedback, or inquiries, contact us at:",
71+
"emailLabel": "Email",
72+
"email": "fastr@worldbank.org",
73+
"sendMessageTitle": "Send us a message",
74+
"messagePlaceholder": "Type your message here...",
75+
"sendButton": "Send Email"
76+
},
77+
"acknowledgements": {
78+
"title": "Acknowledgements",
79+
"description": "We would like to thank Damola Sheriff Olajide with the West African Health Organization who provided the software prototype for the FASTR DHIS2 Data Downloader."
80+
}
81+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"dataTypeLabel": "Data Type",
3+
"dataTypeOptions": {
4+
"all": "All Data Types",
5+
"dataElement": "Data Element",
6+
"indicator": "Indicator",
7+
"programIndicator": "Program Indicator",
8+
"dataSet": "DataSet"
9+
},
10+
"searchPlaceholder": "Search",
11+
"selectButton": "Select",
12+
"selectedItemsTitle": "Selected Items",
13+
"removeButton": "Remove"
14+
}

src/renderer/src/i18n/en/date.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"frequencyLabel": "Frequency",
3+
"frequencyOptions": {
4+
"year": "Year",
5+
"quarter": "Quarter",
6+
"month": "Month"
7+
},
8+
"startDateLabel": "Start Date",
9+
"endDateLabel": "End Date"
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"searchPlaceholder": "Search by Name or ID",
3+
"search": "Search",
4+
"exportAll": "Export All",
5+
"exportPage": "Export This Page",
6+
"type": "Type",
7+
"id": "JSON ID",
8+
"name": "Name",
9+
"description": "Description",
10+
"numerator": "Numerator",
11+
"numeratorName": "Numerator Name",
12+
"denominator": "Denominator",
13+
"denominatorName": "Denominator Name"
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"exportHistory": "Export History",
3+
"delete": "Delete",
4+
"reDownload": "Re-download",
5+
"noHistory": "No download history available.",
6+
"edit": "Edit",
7+
"save": "Save",
8+
"pass": "Pass",
9+
"noteUpdateSuccess": "Note {{id}} updated successfully.",
10+
"noteUpdateFail": "Failed to update note: {{error}}",
11+
"paramsPassed": "Parameters passed for row {{id}}.",
12+
"finishedDownloading": "Finished downloading from {{url}}",
13+
"noSelectedRedownload": "No worker or no URLs selected for redownload.",
14+
"errorProcessingDownloads": "Error processing downloads:"
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"title": "Welcome!",
3+
"dhis2UrlLabel": "DHIS2 URL",
4+
"dhis2UrlTooltip": "Enter the DHIS2 Link without the last forward slash, e.g., <code>https://your-dhis2.com</code> instead of <code>https://your-dhis2.com/</code>.",
5+
"usernameLabel": "Username",
6+
"passwordLabel": "Password",
7+
"connectButton": "Connect",
8+
"dhis2UrlPlaceholder": "DHIS2 URL",
9+
"usernamePlaceholder": "Username",
10+
"passwordPlaceholder": "Password"
11+
}

0 commit comments

Comments
 (0)