My editor is missing translations for some edit buttons and a lot of dropdown elements.

I downloaded the Spanish translation and extracted the .phar file, to see how the files are structured.

I found the button labels match the rel attribute in the /js/redactor.js file.

But what about the dropdown elements?

I found in other js files references to lang.get('some-string') and I discovered that some of the string keys are wrong in the translation files.

For example, it's not "insert-table" but "insert_table".

I fixed the wrong ones and added some more that I was able to find in the table plugin file, but there are still some missing translations:

  • Open link in new tab
  • Headings (from 1 to 6)

This is my current redactor.js translation file with all the additions/modifications:

`(function ($)
{
$.Redactor.opts.langs['es'] = {
"format": "Formato",
"image": "Imagen",
"video": "Vídeo",
"table": "Tabla",
"insert_table": "Insertar tabla",
"insert_row_above": "Insertar fila encima",
"insert_row_below": "Insertar fila debajo",
"insert_column_left": "Insertar columna a la izquierda",
"insert_column_right": "Insertar columna a la derecha",
"add_head": "Añadir encabezado",
"delete_head": "Eliminar encabezado",
"delete_column": "Eliminar columna",
"delete_row": "Eliminar fila",
"delete_table": "Eliminar tabla",
"insert": "Insertar",
"video_html_code": "Inserta el enlace de un vídeo de Youtube o Vimeo",
"rows": "Filas",
"columns": "Columnas",
"alignment": "Alineación",
"formatting": "Formato",
"file": "Archivo",
"html": "Editor/HTML",
"link": "Enlace",
"bold": "Negrita",
"italic": "Cursiva",
"deleted": "Tachado",
"underline": "Subrayado",
"bold-abbr": "N",
"italic-abbr": "C",
"deleted-abbr": "T",
"underline-abbr": "S",
"lists": "Listas",
"link_insert": "Insertar enlace",
"link_edit": "Editar enlace",
"link-in-new-tab": "Abrir enlace en nueva pestaña",
"unlink": "Quitar enlace",
"cancel": "Cancelar",
"close": "Cerrar",
"insert": "Insertar",
"save": "Guardar",
"delete": "Borrar",
"text": "Texto",
"edit": "Editar",
"title": "Título",
"paragraph": "Texto normal",
"quote": "Citar",
"code": "Código",
"heading1": "Cabecera 1",
"heading2": "Cabecera 2",
"heading3": "Cabecera 3",
"heading4": "Cabecera 4",
"heading5": "Cabecera 5",
"heading6": "Cabecera 6",
"filename": "Nombre",
"optional": "Opcional",
"unorderedlist": "Lista sin orden",
"orderedlist": "Lista ordenada",
"outdent": "Quitar sangría",
"indent": "Sangría",
"horizontalrule": "Línea",
"upload-label": "Suelta tu archivo aquí o ",
"accessibility-help-label": "Editor de texto enriquecido",
"caption": "Titulo",
"bulletslist": "Bullets",
"numberslist": "Numeros",
"image-position": "Posicion",
"none": "Ninguno",
"left": "izquierda",
"right": "Derecha",
"center": "Centro"
};

})(jQuery);
`

KevinTheJedi Thank you for the kind answer. I have been struggling for a while until I managed to make the translations happen for version 1.12. But now, after updating to version 1.14, the translations are gone.

I see the editor has improved from version 1.12 to version 1.14 and that is wonderful, but I would like to be able to translate it.

Now, I have the whole platform in my desired language, but the editor keeps displaying every button in English.

I tried different modifications for the redactor.js file but none of them affects the editor language.

What do you suggest I can do to be able to display the editor in a different language than English?

Thank you.

KevinTheJedi I did it and I see one main difference between the Imperavi translation JS file and the redactor.js file included with osTicket.

The values in the first (official Imperavi) are stored in $R.lang['es'] = {
The values in the second (osTicket) are stored in $.Redactor.opts.langs['es'] = {

I don't know if this difference may be related to the issue (translation not being displayed) and also I don't know if this is happening only to me.

Also, I realized that under the /include/i18n/ folder, there is a vendor folder which contains the imperavi translation files.

But also, the Language pack downloaded file contains the redactor.js file.

Which one of both is actually being used with osTicket v1.14.1?

Just to make clear what is going on so that maybe someone can test it on their own and see if the same applies to them:

  • I am using osTicket 1.14.1
  • I am using the Spanish translation file (which does include the redactor.js with translated strings).
  • The whole platform displays in Spanish, but the editor displays in English.
alvarofranz changed the title to Imperavi Redactor translations not being applied.
Write a Reply...