Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Leecason committed Jun 2, 2020
2 parents 562320e + 132d888 commit b7e584f
Show file tree
Hide file tree
Showing 5 changed files with 372 additions and 158 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"rollup-plugin-vue": "^5.1.4",
"sass-loader": "^8.0.0",
"semantic-release": "^17.0.4",
"typescript": "~3.7.5",
"typescript": "~3.9.3",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vue-template-compiler": "^2.6.10"
Expand Down
10 changes: 1 addition & 9 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,34 @@ import postcssPresetEnv from 'postcss-preset-env';
import typescript from 'rollup-plugin-typescript2';
import alias from '@rollup/plugin-alias';

const isProduction = process.env.BUILD === 'production';
const libDir = path.resolve(__dirname, 'lib');
const srcDir = path.resolve(__dirname, 'src');

export default () => [
getConfig({
optimize: true,
file: path.resolve(libDir, 'element-tiptap.min.js'),
format: 'umd',
esModule: true,
}),
getConfig({
optimize: true,
file: path.resolve(libDir, 'element-tiptap.common.js'),
format: 'cjs',
}),
getConfig({
file: path.resolve(libDir, 'element-tiptap.esm.js'),
format: 'es',
esModule: true,
}),
];

function getConfig ({
file,
format,
optimize,
esModule = false,
}) {
return {
input: path.resolve(srcDir, 'index.ts'),
output: {
file,
name: 'ElementTiptap',
format,
esModule,
globals: {
vue: 'Vue',
// TODO: tiptap
Expand Down Expand Up @@ -135,7 +127,7 @@ function getConfig ({
],
],
}),
optimize && isProduction && terser(),
terser(),
],
};
}
209 changes: 209 additions & 0 deletions src/i18n/es/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
export default {
editor: {
extensions: {
Bold: {
tooltip: 'Negrita',
},
Underline: {
tooltip: 'Subrayado',
},
Italic: {
tooltip: 'Cursiva',
},
Strike: {
tooltip: 'Texto tachado',
},
Heading: {
tooltip: 'Encabezado',
buttons: {
paragraph: 'Párrafo',
heading: 'Encabezado',
}
},
Blockquote: {
tooltip: 'Bloque de cita',
},
CodeBlock: {
tooltip: 'Bloque de código',
},
Link: {
add: {
tooltip: 'Crear enlace',
control: {
title: 'Crear enlace',
placeholder: 'Href',
confirm: 'Crear',
cancel: 'Cancelar',
},
},
edit: {
tooltip: 'Editar enlace',
control: {
title: 'Editar enlace',
placeholder: 'Href',
confirm: 'Actualizar',
cancel: 'Cancelar',
},
},
unlink: {
tooltip: 'Desenlazar',
},
open: {
tooltip: 'Abrir enlace',
},
},
Image: {
buttons: {
insert_image: {
tooltip: 'Insertar imagen',
external: 'Insertar imagen desde Url',
upload: 'Cargar imagen',
},
remove_image: {
tooltip: 'Eliminar',
},
image_options: {
tooltip: 'Opciones de imagen',
},
display: {
tooltip: 'Visualización',
inline: 'En línea',
block: 'Bloque',
left: 'Flotar a la izquierda',
right: 'Flotar a la derecha',
},
},
control: {
insert_by_url: {
title: 'Insertar imagen',
placeholder: 'Url de la imagen',
confirm: 'Insertar',
cancel: 'Cancelar',
invalid_url: 'Por favor introduce una Url válida',
},
upload_image: {
title: 'Cargar imagen',
button: 'Selecciona una imagen o arrástrala aquí',
},
edit_image: {
title: 'Editar imagen',
confirm: 'Actualizar',
cancel: 'Cancelar',
form: {
src: 'Url de la imagen',
alt: 'Texto alternativo',
width: 'Ancho',
height: 'Alto',
},
},
},
},
Iframe: {
tooltip: 'Insertar vídeo',
control: {
title: 'Insertar vídeo',
placeholder: 'Href',
confirm: 'Insertar',
cancel: 'Cancelar',
},
},
BulletList: {
tooltip: 'Lista desordenada',
},
OrderedList: {
tooltip: 'Lista ordenada',
},
TodoList: {
tooltip: 'Lista de tareas',
},
TextAlign: {
buttons: {
align_left: {
tooltip: 'Alinear a la izquierda',
},
align_center: {
tooltip: 'Centrar texto',
},
align_right: {
tooltip: 'Alinear a la derecha',
},
align_justify: {
tooltip: 'Texto justificado',
},
},
},
FontType: {
tooltip: 'Fuente',
},
FontSize: {
tooltip: 'Tamaño de fuente',
default: 'por defecto',
},
TextColor: {
tooltip: 'Color de texto',
},
TextHighlight: {
tooltip: 'Resaltar texto',
},
LineHeight: {
tooltip: 'Altura de línea',
},
Table: {
tooltip: 'Tabla',
buttons: {
insert_table: 'Insertar tabla',
add_column_before: 'Añadir columna antes',
add_column_after: 'Añadir columna después',
delete_column: 'Eliminar columna',
add_row_before: 'Añadir fila antes',
add_row_after: 'Añadir fila después',
delete_row: 'Eliminar fila',
merge_cells: 'Fusionar celdas',
split_cell: 'Separar celda',
delete_table: 'Eliminar la tabla',
},
},
Indent: {
buttons: {
indent: {
tooltip: 'Indentar',
},
outdent: {
tooltip: 'Desindentar',
},
},
},
FormatClear: {
tooltip: 'Borrar formato',
},
HorizontalRule: {
tooltip: 'Separador horizontal',
},
History: {
tooltip: {
undo: 'Deshacer',
redo: 'Rehacer',
},
},
Fullscreen: {
tooltip: {
fullscreen: 'Pantalla completa',
exit_fullscreen: 'Salir de pantalla completa',
},
},
Print: {
tooltip: 'Imprimir',
},
Preview: {
tooltip: 'Vista previa',
dialog: {
title: 'Vista previa',
},
},
SelectAll: {
tooltip: 'Seleccionar todo',
},
},
characters: 'Caracteres',
},
};
2 changes: 2 additions & 0 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import pl from './pl';
import ru from './ru';
import de from './de';
import ko from './ko';
import es from './es';

const defaultLang = 'en';
const dictionary = {
Expand All @@ -15,6 +16,7 @@ const dictionary = {
ru,
de,
ko,
es,
};

let currentLang: object = dictionary[defaultLang];
Expand Down
Loading

0 comments on commit b7e584f

Please sign in to comment.