Skip to content

Commit

Permalink
Translate styles in wymeditor
Browse files Browse the repository at this point in the history
  • Loading branch information
scambra committed Mar 23, 2011
1 parent 057ab93 commit 15d7a09
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 36 deletions.
6 changes: 3 additions & 3 deletions core/public/javascripts/refinery/boot_wym.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ var wymeditor_boot_options = $.extend({
, langPath: "/javascripts/wymeditor/lang/"
, iframeBasePath: '/'
, classesItems: [
{name: 'text-align', rules:['left', 'center', 'right', 'justify'], join: '-'}
, {name: 'image-align', rules:['left', 'right'], join: '-'}
, {name: 'font-size', rules:['small', 'normal', 'large'], join: '-'}
{name: 'text-align', rules:[{name: 'left', title: '{Left}'}, {name: 'center', title: '{Center}'}, {name: 'right', title: '{Right}'}, {name: 'justify', title: '{Justify}'}], join: '-', title: '{Text_Align}'}
, {name: 'image-align', rules:[{name: 'left', title: '{Left}'}, {name: 'right', title: '{Right}'}], join: '-', title: '{Image_Align}'}
, {name: 'font-size', rules:[{name: 'small', title: '{Small}'}, {name: 'normal', title: '{Normal}'}, {name: 'large', title: '{Large}'}], join: '-', title: '{Font_Size}'}
]

, containersItems: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,8 @@ WYMeditor.editor.prototype.init = function() {
var wym = this;
$.each(oClass.rules, function(index, rule) {
sClass = wym._options.classesItemHtml;
sClass = h.replaceAll(sClass, WYMeditor.CLASS_NAME, oClass.name + (oClass.join || "") + rule);
sClass = h.replaceAll(sClass, WYMeditor.CLASS_TITLE, rule.title || titleize(rule));
sClass = h.replaceAll(sClass, WYMeditor.CLASS_NAME, oClass.name + (oClass.join || "") + (rule.name || rule));
sClass = h.replaceAll(sClass, WYMeditor.CLASS_TITLE, rule.title || titleize(rule.name || rule));
sRules += sClass;
});

Expand Down Expand Up @@ -5158,4 +5158,4 @@ WYMeditor.WymClassSafari.prototype.getTagForStyle = function(style) {
// from http://simonwillison.net/2006/Jan/20/escape/#p-6
RegExp.escape = function(text) {
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
};
};
10 changes: 10 additions & 0 deletions core/public/javascripts/wymeditor/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,15 @@ WYMeditor.STRINGS['en'] = {
Classes: 'Classes',
Status: 'Status',
Source_Code: 'Source code',
Text_Align: 'Text Align',
Image_Align: 'Image Align',
Font_Size: 'Font Size',
Left: 'Left',
Right: 'Right',
Center: 'Center',
Justify: 'Justify',
Small: 'Small',
Normal: 'Normal',
Large: 'Large',
Apply_Style: 'Style'
};
70 changes: 40 additions & 30 deletions core/public/javascripts/wymeditor/lang/es.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,58 @@
WYMeditor.STRINGS['es'] = {
Strong: 'Resaltar',
Bold: 'Negritas',
Emphasis: 'Enfatizar',
Strong: 'Resaltar',
Bold: 'Negrita',
Emphasis: 'Cursiva',
Superscript: 'Superindice',
Subscript: 'Subindice',
Ordered_List: 'Lista ordenada',
Unordered_List: 'Lista sin ordenar',
Indent: 'Indentado',
Outdent: 'Sin indentar',
Undo: 'Deshacer',
Redo: 'Rehacer',
Link: 'Enlazar',
Unlink: 'Eliminar enlace',
Ordered_List: 'Lista ordenada',
Unordered_List: 'Lista sin ordenar',
Indent: 'Indentado',
Outdent: 'Sin indentar',
Undo: 'Deshacer',
Redo: 'Rehacer',
Link: 'Enlazar',
Unlink: 'Eliminar enlace',
Image: 'Imagen',
Table: 'Tabla',
HTML: 'HTML',
HTML: 'HTML',
Paragraph: 'Párrafo',
Heading_1: 'Cabecera 1',
Heading_2: 'Cabecera 2',
Heading_3: 'Cabecera 3',
Heading_4: 'Cabecera 4',
Heading_5: 'Cabecera 5',
Heading_6: 'Cabecera 6',
Preformatted: 'Preformateado',
Blockquote: 'Cita',
Table_Header: 'Cabecera de la tabla',
URL: 'URL',
Preformatted: 'Preformateado',
Blockquote: 'Cita',
Table_Header: 'Cabecera de la tabla',
URL: 'URL',
Title: 'Título',
Alternative_Text: 'Texto alternativo',
Caption: 'Leyenda',
Summary: 'Summary',
Number_Of_Rows: 'Número de filas',
Number_Of_Cols: 'Número de columnas',
Insert: 'Insertar',
Submit: 'Enviar',
Cancel: 'Cancelar',
Choose: 'Seleccionar',
Preview: 'Vista previa',
Alternative_Text: 'Texto alternativo',
Caption: 'Leyenda',
Summary: 'Summary',
Number_Of_Rows: 'Número de filas',
Number_Of_Cols: 'Número de columnas',
Insert: 'Insertar',
Submit: 'Enviar',
Cancel: 'Cancelar',
Choose: 'Seleccionar',
Preview: 'Vista previa',
Paste_From_Word: 'Pegar desde Word',
Tools: 'Herramientas',
Containers: 'Contenedores',
Classes: 'Clases',
Status: 'Estado',
Containers: 'Contenedores',
Classes: 'Clases',
Status: 'Estado',
Source_Code: 'Código fuente',
Apply_Style: 'Estilo'
Text_Align: 'Alineación Texto',
Image_Align: 'Alineación Texto',
Font_Size: 'Tamaño de Fuente',
Left: 'Izquierda',
Right: 'Derecha',
Center: 'Centro',
Justify: 'Justificar',
Small: 'Pequeño',
Normal: 'Normal',
Large: 'Grande',
Apply_Style: 'Estilo'
};

0 comments on commit 15d7a09

Please sign in to comment.