Version 21.102.1: Jun 28, 2022 Text in buttons got from text of actions.

This commit is contained in:
acanas 2022-06-28 18:11:31 +02:00
parent 1676353a6f
commit 8ccdd0d671
14 changed files with 847 additions and 1035 deletions

View File

@ -440,9 +440,7 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c
/* Begin form */
Frm_BeginFormAnchorOnSubmit (NextAction,Anchor,OnSubmit);
if (FuncParams)
{
FuncParams (Args);
}
/* Put button */
Btn_PutButton (Button,TxtButton);

View File

@ -543,11 +543,11 @@ static void Asg_WriteAsgAuthor (struct Asg_Assignment *Asg)
static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView)
{
extern const char *Txt_Upload_file_or_create_folder;
extern const char *Txt_Folder;
Act_Action_t NextAction;
bool ICanSendFiles = !Asg->Hidden && // It's visible (not hidden)
Asg->Open && // It's open (inside dates)
Asg->IBelongToCrsOrGrps; // I belong to course or groups
Asg->Open && // It's open (inside dates)
Asg->IBelongToCrsOrGrps; // I belong to course or groups
/***** Folder icon *****/
if (!PrintView && // Not print view
@ -559,7 +559,7 @@ static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView
{
case Rol_STD:
Gbl.FileBrowser.Type = Brw_ADMI_ASG_USR; // User assignments
Frm_BeginForm (ActFrmCreAsgUsr);
NextAction = ActFrmCreAsgUsr;
break;
case Rol_NET:
case Rol_TCH:
@ -568,12 +568,14 @@ static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView
Str_Copy (Gbl.Usrs.Other.UsrDat.EnUsrCod,Gbl.Usrs.Me.UsrDat.EnUsrCod,
sizeof (Gbl.Usrs.Other.UsrDat.EnUsrCod) - 1);
Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected);
Frm_BeginForm (ActFrmCreAsgCrs);
NextAction = ActFrmCreAsgCrs;
break;
default:
Err_WrongRoleExit ();
NextAction = ActUnk;
break;
}
Frm_BeginForm (NextAction);
Str_Copy (Gbl.FileBrowser.FilFolLnk.Path,Brw_INTERNAL_NAME_ROOT_FOLDER_ASSIGNMENTS,
sizeof (Gbl.FileBrowser.FilFolLnk.Path) - 1);
@ -582,7 +584,7 @@ static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView
Gbl.FileBrowser.FilFolLnk.Type = Brw_IS_FOLDER;
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
Ico_PutIconLink ("folder-open-yellow-plus.png",Ico_UNCHANGED,
Txt_Upload_file_or_create_folder);
Act_GetActionText (NextAction));
Frm_EndForm ();

View File

@ -3625,9 +3625,6 @@ static void Brw_PutIconShowFigure (__attribute__((unused)) void *Args)
static void Brw_PutButtonToShowEdit (void)
{
extern const char *Txt_View;
extern const char *Txt_Edit;
switch (Gbl.FileBrowser.IconViewEdit)
{
case Brw_ICON_NONE:
@ -3637,7 +3634,7 @@ static void Brw_PutButtonToShowEdit (void)
{
Frm_BeginForm (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type]);
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
Btn_PutConfirmButton (Txt_View);
Btn_PutConfirmButton (Act_GetActionText (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type]));
Frm_EndForm ();
}
break;
@ -3646,7 +3643,7 @@ static void Brw_PutButtonToShowEdit (void)
{
Frm_BeginForm (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type]);
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
Btn_PutConfirmButton (Txt_Edit);
Btn_PutConfirmButton (Act_GetActionText (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type]));
Frm_EndForm ();
}
break;
@ -10200,7 +10197,6 @@ void Brw_AskRemoveOldFiles (void)
extern const char *Txt_Remove_old_files;
extern const char *Txt_Remove_files_older_than_PART_1_OF_2;
extern const char *Txt_Remove_files_older_than_PART_2_OF_2;
extern const char *Txt_Remove;
unsigned Months;
/***** Get parameters related to file browser *****/
@ -10234,7 +10230,7 @@ void Brw_AskRemoveOldFiles (void)
HTM_LABEL_End ();
/***** Send button and end box *****/
Box_BoxWithButtonEnd (Btn_REMOVE_BUTTON,Txt_Remove);
Box_BoxWithButtonEnd (Btn_REMOVE_BUTTON,Act_GetActionText (ActRemOldBrf));
/***** End form *****/
Frm_EndForm ();

View File

@ -404,7 +404,6 @@ void Cfe_PrintCallForExam (void)
void Cfe_ReqRemoveCallForExam (void)
{
extern const char *Txt_Do_you_really_want_to_remove_the_following_call_for_exam;
extern const char *Txt_Remove;
struct Cfe_CallsForExams CallsForExams;
long ExaCod;
@ -429,7 +428,7 @@ void Cfe_ReqRemoveCallForExam (void)
/* End alert */
Ale_ShowAlertAndButton2 (ActRemCfe,NULL,NULL,
Cfe_PutParamExaCodToEdit,&CallsForExams.ExaCod,
Btn_REMOVE_BUTTON,Txt_Remove);
Btn_REMOVE_BUTTON,Act_GetActionText (ActRemCfe));
}
/*****************************************************************************/

View File

@ -606,10 +606,12 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia.
*/
#define Log_PLATFORM_VERSION "SWAD 21.102 (2022-06-28)"
#define Log_PLATFORM_VERSION "SWAD 21.102.1 (2022-06-28)"
#define CSS_FILE "swad21.100.css"
#define JS_FILE "swad21.100.js"
/*
Version 21.102.1: Jun 28, 2022 Text in buttons got from text of actions.
Preparation for Turkish translation. (329296 lines)
Version 21.102: Jun 28, 2022 Subtitles in menus is got from text of actions. (329462 lines)
Version 21.101: Jun 28, 2022 Preparation for Turkish translation. (331564 lines)
Version 21.100.1: Jun 24, 2022 Some messages translated to Turkish. (331273 lines)

View File

@ -244,125 +244,103 @@ void Ico_PutContextualIconToAdd (Act_Action_t NextAction,const char *Anchor,
void Ico_PutContextualIconToRemove (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Remove;
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
"trash.svg",Ico_RED,
Txt_Remove);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToEdit (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Edit;
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
"pen.svg",Ico_BLACK,
Txt_Edit);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToViewFiles (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Files;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
"folder-open.svg",Ico_BLACK,
Txt_Files);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToView (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_View;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
"list.svg",Ico_BLACK,
Txt_View);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToConfigure (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Configure;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
"cog.svg",Ico_BLACK,
Txt_Configure);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToHide (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Hide;
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
"eye.svg",Ico_GREEN,
Txt_Hide);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToUnhide (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Show;
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
"eye-slash.svg",Ico_RED,
Txt_Show);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToPrint (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Print;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
"print.svg",Ico_BLACK,
Txt_Print);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToCopy (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Copy;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
"copy.svg",Ico_BLACK,
Txt_Copy);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToPaste (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
{
extern const char *Txt_Paste;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
"paste.svg",Ico_BLACK,
Txt_Paste);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToCreateInFolder (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args,
bool Open)
{
extern const char *Txt_Upload_file_or_create_folder;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
Open ? "folder-open-yellow-plus.png" :
"folder-yellow-plus.png",
Ico_UNCHANGED,
Txt_Upload_file_or_create_folder);
Act_GetActionText (NextAction));
}
void Ico_PutContextualIconToShowResults (Act_Action_t NextAction,const char *Anchor,

View File

@ -402,10 +402,8 @@ void Inf_ShowInfo (void)
static void Inf_PutButtonToEditInfo (void)
{
extern const char *Txt_Edit;
Frm_BeginForm (Inf_ActionsEditInfo[Gbl.Crs.Info.Type]);
Btn_PutConfirmButton (Txt_Edit);
Btn_PutConfirmButton (Act_GetActionText (Inf_ActionsEditInfo[Gbl.Crs.Info.Type]));
Frm_EndForm ();
}
@ -1026,10 +1024,8 @@ static bool Inf_CheckIfInfoAvailable (struct Syl_Syllabus *Syllabus,
void Inf_FormToEnterIntegratedEditor (Inf_Src_t InfoSrc)
{
extern const char *Txt_Edit;
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
Btn_PutConfirmButton (Txt_Edit);
Btn_PutConfirmButton (Act_GetActionText (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]));
Frm_EndForm ();
}

View File

@ -254,7 +254,6 @@ void Not_RevealHiddenNotice (void)
void Not_RequestRemNotice (void)
{
extern const char *Txt_Do_you_really_want_to_remove_the_following_notice;
extern const char *Txt_Remove;
long NotCod;
/***** Get the code of the notice to remove *****/
@ -270,7 +269,7 @@ void Not_RequestRemNotice (void)
/* End alert */
Ale_ShowAlertAndButton2 (ActRemNot,NULL,NULL,
Not_PutParams,&NotCod,
Btn_REMOVE_BUTTON,Txt_Remove);
Btn_REMOVE_BUTTON,Act_GetActionText (ActRemNot));
/***** Show all notices *****/
Not_ShowNotices (Not_LIST_FULL_NOTICES,

View File

@ -2039,7 +2039,6 @@ static void Prj_ShowOneProjectMembersWithARole (struct Prj_Projects *Projects,
;
extern const char *Txt_PROJECT_ROLES_SINGUL_Abc[Prj_NUM_ROLES_IN_PROJECT];
extern const char *Txt_PROJECT_ROLES_PLURAL_Abc[Prj_NUM_ROLES_IN_PROJECT];
extern const char *Txt_Remove;
extern const char *Txt_Add_USERS;
extern const char *Txt_PROJECT_ROLES_PLURAL_abc[Prj_NUM_ROLES_IN_PROJECT];
static const Act_Action_t ActionReqRemUsr[Prj_NUM_ROLES_IN_PROJECT] =
@ -2163,7 +2162,7 @@ static void Prj_ShowOneProjectMembersWithARole (struct Prj_Projects *Projects,
Lay_PutContextualLinkOnlyIcon (ActionReqRemUsr[RoleInPrj],NULL,
Prj_PutCurrentParams,Projects,
"trash.svg",Ico_RED,
Txt_Remove);
Act_GetActionText (ActionReqRemUsr[RoleInPrj]));
HTM_TD_End ();
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -692,7 +692,8 @@ static void TmlCom_WriteButtons (const struct Tml_Timeline *Timeline,
static void TmlCom_PutFormToRemoveComm (const struct Tml_Timeline *Timeline,
long PubCod)
{
extern const char *Txt_Remove;
extern const Act_Action_t TmlFrm_ActionUsr[TmlFrm_NUM_ACTIONS];
extern const Act_Action_t TmlFrm_ActionGbl[TmlFrm_NUM_ACTIONS];
/***** Form to remove publication *****/
/* Begin form */
@ -700,7 +701,9 @@ static void TmlCom_PutFormToRemoveComm (const struct Tml_Timeline *Timeline,
TmlPub_PutHiddenParamPubCod (PubCod);
/* Icon to remove */
Ico_PutIconLink ("trash.svg",Ico_RED,Txt_Remove);
Ico_PutIconLink ("trash.svg",Ico_RED,
Act_GetActionText (Gbl.Usrs.Other.UsrDat.UsrCod > 0 ? TmlFrm_ActionUsr[TmlFrm_REQ_REM_COMM] :
TmlFrm_ActionGbl[TmlFrm_REQ_REM_COMM]));
/* End form */
TmlFrm_EndForm ();

View File

@ -377,14 +377,12 @@ void TmlFrm_EndAlertRemove (struct Tml_Timeline *Timeline,
TmlFrm_Action_t Action,
void (*FuncParams) (void *Args))
{
extern const char *Txt_Remove;
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
Ale_ShowAlertAndButton2 (TmlFrm_ActionUsr[Action],"timeline",NULL,
FuncParams,Timeline,
Btn_REMOVE_BUTTON,Txt_Remove);
Btn_REMOVE_BUTTON,Act_GetActionText (TmlFrm_ActionUsr[Action]));
else
Ale_ShowAlertAndButton2 (TmlFrm_ActionGbl[Action],NULL,NULL,
FuncParams,Timeline,
Btn_REMOVE_BUTTON,Txt_Remove);
Btn_REMOVE_BUTTON,Act_GetActionText (TmlFrm_ActionGbl[Action]));
}

View File

@ -858,7 +858,8 @@ static void TmlNot_WriteFavShaRem (const struct Tml_Timeline *Timeline,
static void TmlNot_PutFormToRemoveNote (const struct Tml_Timeline *Timeline,
long NotCod)
{
extern const char *Txt_Remove;
extern const Act_Action_t TmlFrm_ActionUsr[TmlFrm_NUM_ACTIONS];
extern const Act_Action_t TmlFrm_ActionGbl[TmlFrm_NUM_ACTIONS];
/***** Form to remove publication *****/
/* Begin form */
@ -866,7 +867,9 @@ static void TmlNot_PutFormToRemoveNote (const struct Tml_Timeline *Timeline,
TmlNot_PutHiddenParamNotCod (NotCod);
/* Icon to remove */
Ico_PutIconLink ("trash.svg",Ico_RED,Txt_Remove);
Ico_PutIconLink ("trash.svg",Ico_RED,
Act_GetActionText (Gbl.Usrs.Other.UsrDat.UsrCod > 0 ? TmlFrm_ActionUsr[TmlFrm_REQ_REM_NOTE] :
TmlFrm_ActionGbl[TmlFrm_REQ_REM_NOTE]));
/* End form */
TmlFrm_EndForm ();