Version 14.110.3

This commit is contained in:
Antonio Cañas Vargas 2015-04-09 21:17:06 +02:00
parent 24e3c3c468
commit acbad24b2d
3 changed files with 130 additions and 86 deletions

View File

@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.110.2 (2015/04/09)"
#define Log_PLATFORM_VERSION "SWAD 14.110.3 (2015/04/09)"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 14.110.3: Apr 09, 2015 Changes in conversion from Markdown to HTML5 using pandoc. (184599 lines)
Version 14.110.2: Apr 09, 2015 Changes in CSS and scripts.
MathJax installed in local by default. (184555 lines)
1 change in installation:

View File

@ -1015,13 +1015,13 @@ void Inf_FormToEnterIntegratedEditor (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoT
void Inf_FormToEnterPlainTextEditor (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoType)
{
extern const char *Txt_Edit_text;
extern const char *Txt_Edit_plain_text;
/***** Start form *****/
Act_FormStart (Inf_ActionsInfo[InfoSrc][InfoType]);
/***** Send button *****/
Lay_PutConfirmButton (Txt_Edit_text);
Lay_PutConfirmButton (Txt_Edit_plain_text);
/***** End form *****/
Act_FormEnd ();
@ -1033,13 +1033,13 @@ void Inf_FormToEnterPlainTextEditor (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoTy
void Inf_FormToEnterRichTextEditor (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoType)
{
extern const char *Txt_Edit_text;
extern const char *Txt_Edit_rich_text;
/***** Start form *****/
Act_FormStart (Inf_ActionsInfo[InfoSrc][InfoType]);
/***** Send button *****/
Lay_PutConfirmButton (Txt_Edit_text);
Lay_PutConfirmButton (Txt_Edit_rich_text);
/***** End form *****/
Act_FormEnd ();
@ -1632,7 +1632,8 @@ static void Inf_ShowRichTxtInfo (Inf_InfoType_t InfoType)
char PathFileHTML[PATH_MAX+1];
FILE *FileMD; // Temporary Markdown file
FILE *FileHTML; // Temporary HTML file
char Command[512+PATH_MAX*2]; // Command to call the program of preprocessing of photos
char MathJaxURL[PATH_MAX];
char Command[512+PATH_MAX*3]; // Command to call the program of preprocessing of photos
int ReturnCode;
/***** Get info text from database *****/
@ -1673,11 +1674,25 @@ static void Inf_ShowRichTxtInfo (Inf_InfoType_t InfoType)
fclose (FileMD);
/***** Convert from Markdown to HTML *****/
sprintf (Command,"iconv -f ISO-8859-1 -t UTF-8 %s"
" | pandoc --mathjax -f markdown -t html"
" | iconv -f UTF-8 -t ISO-8859-1 -o %s",
PathFileMD,
PathFileHTML);
#ifdef Cfg_MATHJAX_LOCAL
// Use the local copy of MathJax
sprintf (MathJaxURL,"=%s/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
Cfg_HTTPS_URL_SWAD_PUBLIC);
#else
// Use the MathJax Content Delivery Network (CDN)
MathJaxURL[0] = '\0';
#endif
// --ascii uses only ascii characters in output
// (uses numerical entities instead of UTF-8)
// is mandatory in order to convert (with iconv) the UTF-8 output of pandoc to WINDOWS-1252
sprintf (Command,"iconv -f WINDOWS-1252 -t UTF-8 %s"
" | "
"pandoc --ascii --mathjax%s -f markdown -t html5"
" | "
"iconv -f UTF-8 -t WINDOWS-1252 -o %s",
PathFileMD,
MathJaxURL,
PathFileHTML);
ReturnCode = system (Command);
if (ReturnCode == -1)
Lay_ShowErrorAndExit ("Error when running command to convert from Markdown to HTML.");
@ -1688,7 +1703,7 @@ static void Inf_ShowRichTxtInfo (Inf_InfoType_t InfoType)
/***** Copy HTML file just created to HTML output *****/
/* Open temporary HTML file for reading */
if ((FileHTML = fopen (PathFileHTML,"rb")) == NULL)
Lay_ShowErrorAndExit ("Can not open temporary Markdown file.");
Lay_ShowErrorAndExit ("Can not open temporary HTML file.");
/* Copy from temporary HTML file to output file */
Fil_FastCopyOfOpenFiles (FileHTML,Gbl.F.Out);
@ -1826,7 +1841,7 @@ void Inf_EditPlainTxtInfo (void)
/***** Edition area *****/
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:center;\">"
"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">"
"<textarea name=\"Txt\" cols=\"100\" rows=\"20\">"
"%s"
"</textarea>"
"</td>"
@ -1847,24 +1862,15 @@ void Inf_EditPlainTxtInfo (void)
void Inf_EditRichTxtInfo (void)
{
extern const char *Txt_The_rich_text_editor_is_not_yet_available;
extern const char *Txt_INFO_TITLE[Inf_NUM_INFO_TYPES];
extern const char *Txt_RICH_TEXT_EDITOR_HELP;
extern const char *Txt_Save;
Inf_InfoType_t InfoType = Inf_AsignInfoType ();
char TxtHTML[Cns_MAX_BYTES_LONG_TEXT+1];
/***** Under test... *****/
if (Gbl.Usrs.Me.LoggedRole != Rol_SYS_ADM) // TODO: Remove this when rich text editor is available
{
Lay_ShowAlert (Lay_WARNING,Txt_The_rich_text_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo ();
return;
}
/***** Start table *****/
Act_FormStart (Inf_ActionsRcvRchTxtInfo[InfoType]);
Lay_StartRoundFrameTable10 (NULL,0,NULL);
Lay_StartRoundFrameTable10 (NULL,0,Txt_INFO_TITLE[InfoType]);
if (InfoType == Inf_INTRODUCTION ||
InfoType == Inf_TEACHING_GUIDE)
@ -1875,8 +1881,9 @@ void Inf_EditRichTxtInfo (void)
/***** Edition area *****/
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:center;\">"
"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">"
"<td style=\"text-align:center;\">");
Lay_ShowAlert (Lay_INFO,Txt_RICH_TEXT_EDITOR_HELP);
fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"100\" rows=\"20\">"
"%s"
"</textarea>"
"</td>"

View File

@ -9288,25 +9288,46 @@ const char *Txt_Edit_survey =
"Editar inqu&eacute;rito";
#endif
const char *Txt_Edit_text =
const char *Txt_Edit_plain_text =
#if L==0
"Editar text";
"Editar text sense format";
#elif L==1
"Text bearbeiten";
"Plain Text bearbeiten";
#elif L==2
"Edit text";
"Edit plain text";
#elif L==3
"Editar texto";
"Editar texto sin formato";
#elif L==4
"&Eacute;diter texte";
"&Eacute;diter texte simple";
#elif L==5
"Editar texto"; // Okoteve traducción
"Editar texto sin formato"; // Okoteve traducción
#elif L==6
"Editare testo";
"Editare testo normale";
#elif L==7
"Edycja tekstu";
"Edycja tekstu zwyk&lstrok;y";
#elif L==8
"Editar texto";
"Editar texto simples";
#endif
const char *Txt_Edit_rich_text =
#if L==0
"Editar text enriquit";
#elif L==1
"Rich Text bearbeiten";
#elif L==2
"Edit rich text";
#elif L==3
"Editar texto enriquecido";
#elif L==4
"&Eacute;diter texte enrichi";
#elif L==5
"Editar texto enriquecido"; // Okoteve traducción
#elif L==6
"Editare testo formattato";
#elif L==7
"Edycja tekstu sformatowany";
#elif L==8
"Editar texto rico";
#endif
const char *Txt_eg_A_B =
@ -14039,21 +14060,21 @@ const char *Txt_INFO_SRC_HELP[Inf_NUM_INFO_SOURCES] =
#endif
,
#if L==0
"editor de texto plano" // Necessita traduccio
"editor de text sense format"
#elif L==1
"Plain Text Editor"
#elif L==2
"plain text editor"
#elif L==3
"editor de texto plano"
"editor de texto sin formato"
#elif L==4
"&eacute;diteur de texte simple"
#elif L==5
"editor de texto plano" // Okoteve traducción
"editor de texto sin formato" // Okoteve traducción
#elif L==6
"editor di testo normale"
#elif L==7
"edytor tekstu"
"edytor tekstu zwyk&lstrok;y"
#elif L==8
"editor de texto simples"
#endif
@ -14073,9 +14094,9 @@ const char *Txt_INFO_SRC_HELP[Inf_NUM_INFO_SOURCES] =
#elif L==6
"editor di testo formattato"
#elif L==7
"rich text editor" // Potrzebujesz tlumaczenie
"edytor tekstu sformatowany"
#elif L==8
"rich text editor" // Necessita de tradução
"editor de texto rico"
#endif
,
#if L==0
@ -27664,28 +27685,7 @@ const char *Txt_Quota_exceeded =
#elif L==8
"Quota excedida!";
#endif
/*
const char *Txt_Ranking =
#if L==0
"R&agrave;nquing";
#elif L==1
"Rang";
#elif L==2
"Ranking";
#elif L==3
"Ranking";
#elif L==4
"Classement";
#elif L==5
"Ranking"; // Okoteve traducción
#elif L==6
"Posto";
#elif L==7
"Ranking";
#elif L==8
"Posi&ccedil;&atilde;o";
#endif
*/
const char *Txt_ReaBRders =
#if L==0
"Lec-<br />tores"; // Necessita traduccio
@ -29693,6 +29693,63 @@ const char *Txt_Retype_password =
"Redigite a senha";
#endif
const char *Txt_RICH_TEXT_EDITOR_HELP =
#if L==0
"Pot formatar el text usant"
" <a href=\"http://ca.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" A m&eacute;s pot escriure f&oacute;rmules en"
" <a href=\"https://ca.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" entre dues $ o dues $$.";
#elif L==1
"Sie k&ouml;nnen den Text zu formatieren mit"
" <a href=\"http://de.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" Sie k&ouml;nnen"
" <a href=\"https://de.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" Formeln auch zwischen zwei $ oder zwei $$.";
#elif L==2
"You can format the text using"
" <a href=\"http://en.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" You can also type"
" <a href=\"https://en.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" formulas between two $ or two $$.";
#elif L==3
"Puede formatear el texto usando"
" <a href=\"http://es.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" Adem&aacute;s puede escribir f&oacute;rmulas en"
" <a href=\"https://es.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" entre dos $ o dos $$.";
#elif L==4
"Vous pouvez formater le texte en utilisant"
" <a href=\"http://fr.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" Vous pouvez &eacute;galement taper des formules"
" <a href=\"https://fr.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" entre deux $ ou deux $$.";
#elif L==5
"Puede formatear el texto usando"
" <a href=\"http://es.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" Adem&aacute;s puede escribir f&oacute;rmulas en"
" <a href=\"https://es.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" entre dos $ o dos $$."; // Okoteve traducción
#elif L==6
"&Egrave; possibile formattare il testo con"
" <a href=\"http://it.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" &Egrave; inoltre possibile digitare formule"
" <a href=\"https://it.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" tra due $ o due $$.";
#elif L==7
"Mo&zdot;esz formatowa&cacute; tekst za pomoc&aogon;"
" <a href=\"http://pl.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" Mo&zdot;esz r&oacute;wnie&zdot; wpisa&cacute; formu&lstrok;y"
" <a href=\"https://pl.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" mi&eogon;dzy dwoma $ lub dw&oacute;ch $$.";
#elif L==8
"Voc&ecirc; pode formatar o texto usando"
" <a href=\"http://pt.wikipedia.org/wiki/Markdown\" target=\"_blank\">Markdown</a>."
" Voc&ecirc; tamb&eacute;m pode digitar f&oacute;rmulas"
" <a href=\"https://pt.wikipedia.org/wiki/LaTeX\" target=\"_blank\">LaTeX</a>"
" entre duas $ ou duas $$.";
#endif
const char *Txt_Role =
#if L==0
"Rol";
@ -41893,27 +41950,6 @@ const char *Txt_The_requested_group_changes_were_successful =
"The requested group changes were successful."; // Necessita de tradução
#endif
const char *Txt_The_rich_text_editor_is_not_yet_available =
#if L==0
"L'editor de text enriquit encara no est&agrave; disponible.";
#elif L==1
"Der Rich Text Editor ist noch nicht verfügbar.";
#elif L==2
"The rich text editor is not yet available.";
#elif L==3
"El editor de texto enriquecido a&uacute;n no est&aacute; disponible.";
#elif L==4
"L'&eacute;diteur de texte riche n'est pas encore disponible.";
#elif L==5
"El editor de texto enriquecido a&uacute;n no est&aacute; disponible."; // Okoteve traducción
#elif L==6
"Il rich text editor non &egrave; ancora disponibile.";
#elif L==7
"Edytor tekstu nie jest jeszcze dost&eogon;pna.";
#elif L==8
"O editor de texto rico ainda n&atilde;o est&aacute; disponível.";
#endif
const char *Txt_The_role_of_THE_USER_X_in_the_course_Y_has_changed_from_A_to_B = // Warning: it is very important to include four %s in the following sentences
#if L==0
"El rol de <strong>%s</strong>"