Skip to content

Commit ab80587

Browse files
committed
[FEATURE]: Add localization feature. Now supporting english and spanish
1 parent d33154a commit ab80587

File tree

30 files changed

+291
-119
lines changed

30 files changed

+291
-119
lines changed

CHANGELOG.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,33 @@
33
<p align="center">
44
<img align="center" height="120" src="https://user-images.githubusercontent.com/43678736/132112022-0ca409ae-cca2-43c8-be89-110376260a3f.png" alt="dropone-ui-logo">
55

6-
<h1 align="center"> Dropzone UI</h1>
6+
<h1 align="center"> Dropzone-UI</h1>
77

88
</p>
99

1010
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
1111

12+
<a name="2.0.0"></a>
13+
14+
## [2.0.0](https://github.com/dropzone-ui/dropzone-ui/compare/v2.0.0...v1.2.10) (2021-09-21)
15+
16+
### Features
17+
18+
- Improve Readme.md
19+
- Add localization for spanish and english
20+
- Add Readme_es.md file
21+
1222
<a name="1.2.10"></a>
1323

14-
## [1.2.10](https://github.com/glicht/npm-get-version/compare/v1.0.1...v1.0.2) (2021-09-21)
24+
## [1.2.10](https://github.com/dropzone-ui/dropzone-ui/compare/v1.0.1...v1.0.2) (2021-09-21)
1525

1626
### Features
1727

1828
- Improve Readme.md
1929
- Add quiality badge
2030
<a name="1.2.9"></a>
2131

22-
## [1.2.9](https://github.com/glicht/npm-get-version/compare/v1.0.1...v1.0.2) (2021-09-12)
32+
## [1.2.9](https://github.com/dropzone-ui/dropzone-ui/compare/v1.0.1...v1.0.2) (2021-09-12)
2333

2434
### Features
2535

@@ -31,7 +41,7 @@ All notable changes to this project will be documented in this file. See [standa
3141

3242
<a name="1.1.28"></a>
3343

34-
## [1.1.28](https://github.com/glicht/npm-get-version/compare/v1.0.1...v1.0.2) (2021-09-09)
44+
## [1.1.28](https://github.com/dropzone-ui/dropzone-ui/compare/v1.0.1...v1.0.2) (2021-09-09)
3545

3646
### Features
3747

@@ -40,7 +50,7 @@ All notable changes to this project will be documented in this file. See [standa
4050

4151
<a name="1.0.28"></a>
4252

43-
## [1.0.28](https://github.com/glicht/npm-get-version/compare/v1.0.1...v1.0.2) (2021-09-08)
53+
## [1.0.28](https://github.com/dropzone-ui/dropzone-ui/compare/v1.0.1...v1.0.2) (2021-09-08)
4454

4555
### Features
4656

@@ -53,12 +63,12 @@ All notable changes to this project will be documented in this file. See [standa
5363

5464
<a name="1.0.1"></a>
5565

56-
## [1.0.1](https://github.com/glicht/npm-get-version/compare/v1.0.0...v1.0.1) (2021-08-28)
66+
## [1.0.1](https://github.com/dropzone-ui/dropzone-ui/compare/v1.0.0...v1.0.1) (2021-08-28)
5767

5868
### Features
5969

6070
- README improvements
6171

6272
<a name="1.0.0"></a>
6373

64-
# [1.0.0](https://github.com/glicht/npm-get-version/compare/v0.1.2...v1.0.0) (2021-08-28)
74+
# [1.0.0](https://github.com/dropzone-ui/dropzone-ui/compare/v0.1.2...v1.0.0) (2021-08-28)

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
:rocket: [Spanish](./README_ES.md)
22

33
<p align="center">
4-
<img align="center" height="150" src="https://user-images.githubusercontent.com/43678736/132112022-0ca409ae-cca2-43c8-be89-110376260a3f.png" alt="dropone-ui-logo">
4+
<img align="center" height="128" src="https://user-images.githubusercontent.com/43678736/132112022-0ca409ae-cca2-43c8-be89-110376260a3f.png" alt="dropone-ui-logo">
55

66
<h1 align="center"> Dropzone-UI </h1>
77

8+
[React](https://reactjs.org/) set of components for managing file uploads, image previews on user inteface. Components were made inspired on other existing libraries (however, those are **not** dependencies because the idea is to take many good related libraries only as **reference** and **create** something **new** ). Google's Material design principles were also considered in development. Indeed, icons come from [Material design icons](https://fonts.google.com/icons).
9+
810
</p>
911

12+
1013
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dropzone-ui/dropzone-ui/blob/HEAD/LICENSE)
1114
[![npm latest package](https://img.shields.io/npm/v/dropzone-ui.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen)](https://www.npmjs.com/package/dropzone-ui)
1215
[![dependencies Status](https://status.david-dm.org/gh/dropzone-ui/dropzone-ui.svg)](https://david-dm.org/dropzone-ui/dropzone-ui)
@@ -18,10 +21,6 @@
1821
[![install size](https://packagephobia.com/badge?p=dropzone-ui)](https://packagephobia.com/result?p=dropzone-ui)
1922
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
2023

21-
## Description
22-
23-
Dropzone UI is a mini set of [React](https://reactjs.org/) components for managing file uploads, image previews and all with **little** code needed. Components were made inspired on other existing libraries (however, those are **not** dependencies in order avoid increasing the package size and the idea is to **create** something **new** having many good existing libraries only as **reference**). Also, google's Material design principles were considered in development. Indeed, all the icons involved are material design icons.
24-
2524
## Sample result:
2625

2726
On `Drag`, `Drop` and `Upload`. (also changing view mode from `grid` to `list`).
@@ -37,7 +36,7 @@ Did you like the project? Don't forget to give us a :star: star on :octocat: [gi
3736

3837
dropzone-ui is available as an [npm package](https://www.npmjs.com/package/dropzone-ui).
3938

40-
For uploading files, peer dependency [axios](https://www.npmjs.com/package/axios) must be installed together
39+
For uploading files, peer dependency [axios](https://www.npmjs.com/package/axios) must be installed in conjuction with `dropzone-ui`.
4140

4241
```sh
4342
// with npm

README_ES.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:rocket:[English](./README.md)
1+
:rocket:[English](https://github.com/dropzone-ui/dropzone-ui#readme)
22

33
<p align="center">
44
<img align="center" height="128" src="https://user-images.githubusercontent.com/43678736/132112022-0ca409ae-cca2-43c8-be89-110376260a3f.png" alt="dropone-ui-logo">
@@ -7,6 +7,8 @@
77

88
</p>
99

10+
Dropzone UI es un pequeño set de componentes [React](https://reactjs.org/) para manejar cargas de archivo, vista previa de imágenes en la interfaz gráfica. Componentes fueron hechos inspirados en otras librerias existentes (sin embargo, estas **no** son dependencias , ya que la idea es tomar como **referencia** varias librerias buenas y **crear** algo **nuevo**). Pricipios de Material Design de Google fueron considerados en el desarrollo. De hecho, todos los iconos son [Material design icons](https://fonts.google.com/icons).
11+
1012
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dropzone-ui/dropzone-ui/blob/HEAD/LICENSE)
1113
[![npm latest package](https://img.shields.io/npm/v/dropzone-ui.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen)](https://www.npmjs.com/package/dropzone-ui)
1214
[![dependencies Status](https://status.david-dm.org/gh/dropzone-ui/dropzone-ui.svg)](https://david-dm.org/dropzone-ui/dropzone-ui)
@@ -18,9 +20,6 @@
1820
[![install size](https://packagephobia.com/badge?p=dropzone-ui)](https://packagephobia.com/result?p=dropzone-ui)
1921
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
2022

21-
22-
Dropzone UI es un pequeño set de componentes [React](https://reactjs.org/) para manejar cargas de archivo, vista previa de imágenes y todo con **poco** codigo requerido. Componentes fueron hechos inspirados en otras librerias existentes (sin embargo, estas **no** son dependencas para evitar el incremento del tamaño del paquete y la idea es **crear** algo **nuevo** teniendo solo como **referencia** varias librerias buenas ). Además, tambien se siguen los pricipios de Material Design de Google. De hecho, todos los iconos utilizados son iconos de material design.
23-
2423
## Ejemplo de resultado:
2524

2625
En operaciones `Drag`, `Drop` y `Upload`. (también cambiando el modo de vista de `grid` a `list`).
@@ -32,19 +31,18 @@ En operaciones `Drag`, `Drop` y `Upload`. (también cambiando el modo de vista d
3231

3332
</p>
3433

35-
## Installacion
36-
37-
dropzone-ui is available as an [npm package](https://www.npmjs.com/package/dropzone-ui).
34+
## Installación
3835

39-
For uploading files, peer dependency [axios](https://www.npmjs.com/package/axios) must be installed together
36+
dropzone-ui está disponible como un [paquete npm](https://www.npmjs.com/package/dropzone-ui).
37+
Para subir archivos a un servidor, la dependencia peer [axios](https://www.npmjs.com/package/axios) debe ser instalada en conjunto con `dropzone-ui`
4038

4139
```sh
42-
// with npm
40+
// con npm
4341
npm i dropzone-ui axios
4442
```
4543

4644
```sh
47-
// with yarn
45+
// con yarn
4846
yarn add dropzone-ui axios
4947
```
5048

@@ -73,7 +71,7 @@ Function App() {
7371
ReactDOM.render(<App />, document.querySelector("#app"));
7472
```
7573

76-
Si, esto es todo lo que necesitas para iniciarte en estos demos interactivos:
74+
Si, esto es todo lo que necesitas para iniciarte como puedes observar en estos demos interactivos:
7775
| Nombre | Enlace a Codesandbox |
7876
|-|-|
7977
|Dropzone Ejemplo básico|[![Edit Button](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/basic-3j01v?file=/src/index.js)|
@@ -83,10 +81,10 @@ Si, esto es todo lo que necesitas para iniciarte en estos demos interactivos:
8381
|InputFileButton & FileItemContainer|[![Edit Button](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/inputbutton-example-poqsn?file=/src/App.js)|
8482
|Ejemplo de servidor de carga de archivos | https://github.com/dropzone-ui/file-upload-server-side/tree/main/expressjs |
8583

86-
# API de los Componentes de Dropzone UI
84+
# API de los Componentes Dropzone-UI
8785

8886
- [\<Dropzone/>](#dropzone-api)
89-
- [\<FileItem />](#fileitem-api)
87+
- [\<FileItem />](#fileitem-api)
9088
- [\<FullScreenPreview />](#fullscreenpreview-api)
9189
- [\<FileItemContainer />](#fileitemcontainer-api)
9290
- [\<InputButton />](#inputbutton-api)

build/components/dropzone/components/Dropzone/DropzoneProps.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { OverridableProps } from "@unlimited-react-components/kernel";
2+
import { Localization } from "../../../../localization/localization";
23
import { FileItemContainerProps } from "../../../file-item/components/FileItemContainer/FileItemContainerProps";
34
import { FileValidated } from "../utils/validation.utils";
45
export interface DropzoneProps extends OverridableProps {
@@ -139,5 +140,11 @@ export interface DropzoneProps extends OverridableProps {
139140
* This will make dropzone to simulate a server upload
140141
*/
141142
fakeUploading?: boolean;
143+
/**
144+
* language to be used
145+
* for now
146+
* only English and Spanish is supported
147+
*/
148+
localization?: Localization;
142149
}
143150
export declare const DropzonePropsDefault: DropzoneProps;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
import { Localization } from "../../../../localization/localization";
12
export interface DropzoneFooterProps {
23
accept?: string;
34
message?: string;
5+
/**
6+
* language to be used
7+
* for now
8+
* only English and Spanish is supported
9+
*/
10+
localization?: Localization;
411
}

build/components/dropzone/components/DropzoneHeader/DropzoneHeader.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { FC } from "react";
2+
import { Localization } from "../../../../localization/localization";
23
import { FileItemContainerProps } from "../../../file-item/components/FileItemContainer/FileItemContainerProps";
34
export interface DropzoneHeaderProps {
45
maxFileSize?: number;
@@ -10,6 +11,12 @@ export interface DropzoneHeaderProps {
1011
onChangeView?: Function;
1112
onUploadStart?: Function;
1213
urlPresent?: boolean;
14+
/**
15+
* language to be used
16+
* for now
17+
* only English and Spanish is supported
18+
*/
19+
localization?: Localization;
1320
}
1421
declare const DropzoneHeader: FC<DropzoneHeaderProps>;
1522
export default DropzoneHeader;

build/components/file-item/components/FileItem/FileItemProps.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Localization } from "../../../../localization/localization";
12
import { PaperProps } from "../../../paper/components/PaperProps";
23
export interface FileItemValidator {
34
/**
@@ -76,6 +77,12 @@ export interface FileItemProps extends PaperProps {
7677
* be presented in the real image resolution
7778
*/
7879
hd?: boolean | undefined;
80+
/**
81+
* language to be used
82+
* for now
83+
* only English and Spanish is supported
84+
*/
85+
localization?: Localization;
7986
}
8087
/**
8188
* Base default props

build/components/file-item/components/FileItemFullInfoLayer/FileItemFullInfoLayer.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { FC } from "react";
2+
import { Localization } from "../../../../localization/localization";
23
declare const FileItemFullInfoLayer: FC<FileItemFullInfoLayerProps>;
34
export default FileItemFullInfoLayer;
45
export interface FileItemFullInfoLayerProps {
@@ -10,4 +11,10 @@ export interface FileItemFullInfoLayerProps {
1011
onClose: Function;
1112
uploadMessage?: string;
1213
uploadStatus?: undefined | "uploading" | "success" | "error";
14+
/**
15+
* language to be used
16+
* for now
17+
* only English and Spanish is supported
18+
*/
19+
localization: Localization;
1320
}

build/components/file-item/components/FileItemMainLayer/FileItemMainLayer.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { FC } from "react";
2+
import { Localization } from "../../../../localization/localization";
23
export interface FileItemMainLayerProps {
34
showInfo: boolean;
45
onOpenInfo: Function;
@@ -10,6 +11,12 @@ export interface FileItemMainLayerProps {
1011
isImage: boolean;
1112
uploadStatus?: undefined | "uploading" | "success" | "error";
1213
sizeFormatted: string;
14+
/**
15+
* language to be used
16+
* for now
17+
* only English and Spanish is supported
18+
*/
19+
localization: Localization;
1320
}
1421
declare const FileItemMainLayer: FC<FileItemMainLayerProps>;
1522
export default FileItemMainLayer;

build/components/file-item/components/FileItemStatus/FileItemStatusProps.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Localization } from "../../../../localization/localization";
12
export interface FileItemStatusProps {
23
/**
34
* whether show a valid or rejected message
@@ -12,4 +13,10 @@ export interface FileItemStatusProps {
1213
* A message for the status item
1314
*/
1415
message?: string;
16+
/**
17+
* language to be used
18+
* for now
19+
* only English and Spanish is supported
20+
*/
21+
localization: Localization;
1522
}

0 commit comments

Comments
 (0)