-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement Open Data page * Add styles * Update text * Add translations - initial changes * Finalize translations * Update tranlation --------- Co-authored-by: ani-kalpachka <[email protected]>
- Loading branch information
1 parent
626952b
commit 2be4d49
Showing
8 changed files
with
119 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"swagger-text": "За да осигури пълна прозрачност на дейноста си, освен отворен код, Подкрепи.бг предоставя също и отворени данни. Целта е всеки при интерес да може да достъпи анонимизирани данни, показващи движенията на даренията и сумите по сметките, свързани с кампаниите. За да достъпите тези данни, можете да използвате UI като потребител или директно през публичните методи на API. Описанието на API поддържаме чрез Swagger на този адрес:", | ||
"ethical-use": "За етичното използване на отворените данни сме избрали да използваме лиценз", | ||
"rights": ", според който имате право да:", | ||
"share": "Споделяте - да копирате и повторно да разпространявате материала на всякакъв носител или във всякакъв формат.", | ||
"adapt": "Адаптирате - да преработвате, преобразувате и доразвивате материала.", | ||
"note": "Забележка: Ако спазвате условията на лиценза, лицензодателят не може да отмени тези свободи.", | ||
"terms": "При следните условия:", | ||
"acknowledgment": "Признание - Вие сте длъжни да посочите като автор на данните Подкрепи.бг, да дадете електронна препратка към лиценза и да укажете дали сте внесли промени. Можете да направите това по всеки разумен начин, но не по начин, който предполага, че лицензодателят одобрява Вас или използването от Ваша страна на материала.", | ||
"non-commercial-use": "Некомерсиално ползване - Вие нямате право да използвате данните за", | ||
"commercial-purposes": "търговски цели", | ||
"money-gathering": "в смисъла на събирането на пари за данните във вид на файл или за достъп до тях.", | ||
"additional-restrictions": "Без допълнителни ограничения - Вие нямате право да прилагате правни условия или", | ||
"technological-measures": "технологични мерки", | ||
"legal-restrictions": ", които създават правни ограничения за други лица да извършват разрешеното от лиценза." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"swagger-text": "To ensure full transparency of operations, in addition to the open source code, Podkrepi.bg provides also open data. The motivation is for everyone who is interested to be able to access anonymized data for the transactions of donations and amounts between the accounts related to the campaigns. To access the data you can use the UI as regular user or directly through the public methods of the API. The API description is supported using Swagger on the following url:", | ||
"ethical-use": "For the ethical use of our open data we chose to use", | ||
"rights": " according to which you are free to:", | ||
"share": "Share - copy and redistribute the material in any medium or format.", | ||
"adapt": "Adapt - rework, transform and further develop the material.", | ||
"note": "Note: The licensor cannot revoke these freedoms as long as you follow the license terms.", | ||
"terms": "Under the following conditions:", | ||
"acknowledgment": "Acknowledgment - You must give appropriate credit and mention Podkrepi.bg as data owner, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.", | ||
"non-commercial-use": "Non-commercial use - You have no right to use the data for", | ||
"commercial-purposes": "commercial purposes", | ||
"money-gathering": "in the sense of charging money for the data in file form or for access to it.", | ||
"additional-restrictions": "No additional restrictions - You have no right to apply legal terms or", | ||
"technological-measures": "technological measures", | ||
"legal-restrictions": "which create legal restrictions on others doing what the license allows." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Typography } from '@mui/material' | ||
import { styled } from '@mui/material/styles' | ||
|
||
import theme from 'common/theme' | ||
|
||
export const Text = styled(Typography)(() => ({ | ||
margin: theme.spacing(3, 0), | ||
})) | ||
|
||
export const UnorderedList = styled('ul')(() => ({ | ||
listStyleType: 'disc', | ||
margin: theme.spacing(0, 5), | ||
})) | ||
|
||
export const ListItem = styled('li')(() => ({ | ||
margin: theme.spacing(1, 0), | ||
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react' | ||
|
||
import { useTranslation } from 'next-i18next' | ||
|
||
import Layout from 'components/client/layout/Layout' | ||
import ExternalLink from 'components/common/ExternalLink' | ||
import { staticUrls } from 'common/routes' | ||
|
||
import { ListItem, Text, UnorderedList } from './OpenDataPage.styled' | ||
|
||
export default function OpenDataPage() { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<Layout title={t('nav.dev.open-data')}> | ||
<Text> | ||
{t('open-data:swagger-text')} | ||
<ExternalLink href={staticUrls.swagger}> https://podkrepi.bg/swagger</ExternalLink> | ||
</Text> | ||
<Text> | ||
{t('open-data:ethical-use')} | ||
<ExternalLink href={staticUrls.licenses}> Creative Commons CC BY-NC 4.0</ExternalLink> | ||
{t('open-data:rights')} | ||
</Text> | ||
<UnorderedList> | ||
<ListItem>{t('open-data:share')}</ListItem> | ||
<ListItem>{t('open-data:adapt')}</ListItem> | ||
<Text>{t('open-data:note')}</Text> | ||
<Text>{t('open-data:terms')}</Text> | ||
<ListItem>{t('open-data:acknowledgment')}</ListItem> | ||
<ListItem> | ||
{t('open-data:non-commercial-use')} | ||
<ExternalLink href={staticUrls.commercialPurposes}> | ||
{' '} | ||
{t('open-data:commercial-purposes')} | ||
</ExternalLink>{' '} | ||
{t('open-data:money-gathering')} | ||
</ListItem> | ||
<ListItem> | ||
{t('open-data:additional-restrictions')}{' '} | ||
<ExternalLink href={staticUrls.technologicalMeasures}> | ||
{t('open-data:technological-measures')} | ||
</ExternalLink>{' '} | ||
{t('open-data:legal-restrictions')} | ||
</ListItem> | ||
</UnorderedList> | ||
</Layout> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { GetStaticProps } from 'next' | ||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations' | ||
|
||
import OpenDataPage from '../../components/client/open-data/OpenDataPage' | ||
|
||
export const getStaticProps: GetStaticProps = async ({ locale }) => ({ | ||
props: { | ||
...(await serverSideTranslations(locale ?? 'bg', ['common', 'open-data'])), | ||
}, | ||
}) | ||
|
||
export default OpenDataPage |