mirror of https://github.com/acanas/swad-core.git
Version 18.21.3
This commit is contained in:
parent
5752bac8e5
commit
2cd279a629
|
@ -399,7 +399,7 @@ void Agd_ShowUsrAgenda (void)
|
||||||
void Agd_ShowOtherAgendaAfterLogIn (void)
|
void Agd_ShowOtherAgendaAfterLogIn (void)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_PROFILE_Agenda_public_agenda;
|
extern const char *Hlp_PROFILE_Agenda_public_agenda;
|
||||||
extern const unsigned Lan_Current_CGI_SWAD_Language;
|
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
||||||
extern const char *Txt_Public_agenda_USER;
|
extern const char *Txt_Public_agenda_USER;
|
||||||
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||||
extern const char *Txt_Switching_to_LANGUAGE[1 + Lan_NUM_LANGUAGES];
|
extern const char *Txt_Switching_to_LANGUAGE[1 + Lan_NUM_LANGUAGES];
|
||||||
|
@ -407,7 +407,7 @@ void Agd_ShowOtherAgendaAfterLogIn (void)
|
||||||
|
|
||||||
if (Gbl.Usrs.Me.Logged)
|
if (Gbl.Usrs.Me.Logged)
|
||||||
{
|
{
|
||||||
if (Gbl.Usrs.Me.UsrDat.Prefs.Language == Lan_Current_CGI_SWAD_Language)
|
if (Gbl.Usrs.Me.UsrDat.Prefs.Language == Txt_Current_CGI_SWAD_Language)
|
||||||
{
|
{
|
||||||
/***** Get user *****/
|
/***** Get user *****/
|
||||||
/* If nickname is correct, user code is already got from nickname */
|
/* If nickname is correct, user code is already got from nickname */
|
||||||
|
|
|
@ -360,10 +360,12 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.21.2 (2018-12-08)"
|
#define Log_PLATFORM_VERSION "SWAD 18.21.3 (2018-12-08)"
|
||||||
#define CSS_FILE "swad18.4.css"
|
#define CSS_FILE "swad18.4.css"
|
||||||
#define JS_FILE "swad17.17.1.js"
|
#define JS_FILE "swad17.17.1.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.21.4: Dec 08, 2018 Check icons replaced by HTML entities in tests. (? lines)
|
||||||
|
Version 18.21.3: Dec 08, 2018 Fixed bug when changing language, reported by Agostinho Silva. (237044 lines)
|
||||||
Version 18.21.2: Dec 08, 2018 Check icons replaced by HTML entities in listing of users. (237039 lines)
|
Version 18.21.2: Dec 08, 2018 Check icons replaced by HTML entities in listing of users. (237039 lines)
|
||||||
Version 18.21.1: Dec 08, 2018 Some messages translated to Portuguese (still 464 messages to be translated). (237046 lines)
|
Version 18.21.1: Dec 08, 2018 Some messages translated to Portuguese (still 464 messages to be translated). (237046 lines)
|
||||||
Version 18.21: Dec 08, 2018 Code refactoring related to languages. (237098 lines)
|
Version 18.21: Dec 08, 2018 Code refactoring related to languages. (237098 lines)
|
||||||
|
|
|
@ -81,7 +81,7 @@ void Gbl_InitializeGlobals (void)
|
||||||
{
|
{
|
||||||
extern const char *The_ThemeId[The_NUM_THEMES];
|
extern const char *The_ThemeId[The_NUM_THEMES];
|
||||||
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
||||||
extern const unsigned Lan_Current_CGI_SWAD_Language;
|
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
||||||
Rol_Role_t Role;
|
Rol_Role_t Role;
|
||||||
Lan_Language_t Lan;
|
Lan_Language_t Lan;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ void Gbl_InitializeGlobals (void)
|
||||||
|
|
||||||
Gbl.HiddenParamsInsertedIntoDB = false;
|
Gbl.HiddenParamsInsertedIntoDB = false;
|
||||||
|
|
||||||
Gbl.Prefs.Language = Lan_Current_CGI_SWAD_Language;
|
Gbl.Prefs.Language = Txt_Current_CGI_SWAD_Language;
|
||||||
Gbl.Prefs.FirstDayOfWeek = Cal_FIRST_DAY_OF_WEEK_DEFAULT; // Default first day of week
|
Gbl.Prefs.FirstDayOfWeek = Cal_FIRST_DAY_OF_WEEK_DEFAULT; // Default first day of week
|
||||||
Gbl.Prefs.DateFormat = Dat_FORMAT_DEFAULT; // Default date format
|
Gbl.Prefs.DateFormat = Dat_FORMAT_DEFAULT; // Default date format
|
||||||
Gbl.Prefs.Menu = Mnu_MENU_DEFAULT; // Default menu
|
Gbl.Prefs.Menu = Mnu_MENU_DEFAULT; // Default menu
|
||||||
|
|
|
@ -58,7 +58,6 @@ const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES] = // ISO 639-1 language codes
|
||||||
"pl", // Lan_LANGUAGE_PL
|
"pl", // Lan_LANGUAGE_PL
|
||||||
"pt", // Lan_LANGUAGE_PT
|
"pt", // Lan_LANGUAGE_PT
|
||||||
};
|
};
|
||||||
const unsigned Lan_Current_CGI_SWAD_Language = ((unsigned) L);
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Private constants ****************************/
|
/****************************** Private constants ****************************/
|
||||||
|
@ -216,11 +215,11 @@ void Lan_UpdateMyLanguageToCurrentLanguage (void)
|
||||||
|
|
||||||
Lan_Language_t Lan_GetParamLanguage (void)
|
Lan_Language_t Lan_GetParamLanguage (void)
|
||||||
{
|
{
|
||||||
extern const unsigned Lan_Current_CGI_SWAD_Language;
|
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
||||||
|
|
||||||
return (Lan_Language_t)
|
return (Lan_Language_t)
|
||||||
Par_GetParToUnsignedLong ("Lan",
|
Par_GetParToUnsignedLong ("Lan",
|
||||||
1,
|
1,
|
||||||
Lan_NUM_LANGUAGES,
|
Lan_NUM_LANGUAGES,
|
||||||
(unsigned long) Lan_Current_CGI_SWAD_Language);
|
(unsigned long) Txt_Current_CGI_SWAD_Language);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,10 +33,6 @@
|
||||||
|
|
||||||
#define Lan_NUM_LANGUAGES 9 // From 1 to 9. 0 is reserved to unknown language
|
#define Lan_NUM_LANGUAGES 9 // From 1 to 9. 0 is reserved to unknown language
|
||||||
|
|
||||||
#ifndef L
|
|
||||||
#define L 3 // English
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************* Public types ********************************/
|
/******************************* Public types ********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -109,7 +109,7 @@ static void Lay_HelpTextEditor (const char *Text,const char *InlineMath,const ch
|
||||||
void Lay_WriteStartOfPage (void)
|
void Lay_WriteStartOfPage (void)
|
||||||
{
|
{
|
||||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||||
extern const unsigned Lan_Current_CGI_SWAD_Language;
|
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
||||||
extern const char *The_TabOnBgColors[The_NUM_THEMES];
|
extern const char *The_TabOnBgColors[The_NUM_THEMES];
|
||||||
extern const char *Txt_NEW_YEAR_GREETING;
|
extern const char *Txt_NEW_YEAR_GREETING;
|
||||||
const char *LayoutMainZone[Mnu_NUM_MENUS] =
|
const char *LayoutMainZone[Mnu_NUM_MENUS] =
|
||||||
|
@ -237,7 +237,7 @@ void Lay_WriteStartOfPage (void)
|
||||||
|
|
||||||
/* Redirect to correct language */
|
/* Redirect to correct language */
|
||||||
if (Gbl.Usrs.Me.Logged && // I am logged
|
if (Gbl.Usrs.Me.Logged && // I am logged
|
||||||
Gbl.Usrs.Me.UsrDat.Prefs.Language != Lan_Current_CGI_SWAD_Language) // My language != current language
|
Gbl.Usrs.Me.UsrDat.Prefs.Language != Txt_Current_CGI_SWAD_Language) // My language != current language
|
||||||
{
|
{
|
||||||
if (Gbl.Action.Act == ActLogIn || // Regular log in
|
if (Gbl.Action.Act == ActLogIn || // Regular log in
|
||||||
Gbl.Action.Act == ActLogInNew) // Log in when checking account
|
Gbl.Action.Act == ActLogInNew) // Log in when checking account
|
||||||
|
|
|
@ -94,6 +94,12 @@
|
||||||
/******************************** Constants **********************************/
|
/******************************** Constants **********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef L
|
||||||
|
#define L 3 // English
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const unsigned Txt_Current_CGI_SWAD_Language = ((unsigned) L);
|
||||||
|
|
||||||
const char *Txt_NEW_LINE = "\r\n"; // End of line in a file. If we put only \n the file does not look good in some Windows text editors
|
const char *Txt_NEW_LINE = "\r\n"; // End of line in a file. If we put only \n the file does not look good in some Windows text editors
|
||||||
|
|
||||||
// The HTML entity for "ß" is ß It stands for "S-Z ligature", because this symbol comes from the ligature of a Gothic S and a Z.
|
// The HTML entity for "ß" is ß It stands for "S-Z ligature", because this symbol comes from the ligature of a Gothic S and a Z.
|
||||||
|
|
|
@ -72,6 +72,10 @@
|
||||||
/******************************** Constants **********************************/
|
/******************************** Constants **********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef L
|
||||||
|
#define L 3 // English
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Country_NO_HTML =
|
const char *Txt_Country_NO_HTML =
|
||||||
#if L==1
|
#if L==1
|
||||||
"País";
|
"País";
|
||||||
|
|
|
@ -2506,7 +2506,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) ())
|
||||||
|
|
||||||
void Usr_WelcomeUsr (void)
|
void Usr_WelcomeUsr (void)
|
||||||
{
|
{
|
||||||
extern const unsigned Lan_Current_CGI_SWAD_Language;
|
extern const unsigned Txt_Current_CGI_SWAD_Language;
|
||||||
extern const char *Txt_Happy_birthday;
|
extern const char *Txt_Happy_birthday;
|
||||||
extern const char *Txt_Welcome_X_and_happy_birthday[Usr_NUM_SEXS];
|
extern const char *Txt_Welcome_X_and_happy_birthday[Usr_NUM_SEXS];
|
||||||
extern const char *Txt_Welcome_X[Usr_NUM_SEXS];
|
extern const char *Txt_Welcome_X[Usr_NUM_SEXS];
|
||||||
|
@ -2516,7 +2516,7 @@ void Usr_WelcomeUsr (void)
|
||||||
|
|
||||||
if (Gbl.Usrs.Me.Logged)
|
if (Gbl.Usrs.Me.Logged)
|
||||||
{
|
{
|
||||||
if (Gbl.Usrs.Me.UsrDat.Prefs.Language == Lan_Current_CGI_SWAD_Language)
|
if (Gbl.Usrs.Me.UsrDat.Prefs.Language == Txt_Current_CGI_SWAD_Language)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
|
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
|
||||||
" style=\"margin:12px;\">");
|
" style=\"margin:12px;\">");
|
||||||
|
|
Loading…
Reference in New Issue