Cean code

This commit is contained in:
Laurent Destailleur 2024-05-22 02:05:22 +02:00
parent 44fda7fa68
commit 74f3b31b3e
4 changed files with 13 additions and 4 deletions

View File

@ -2996,6 +2996,7 @@ UserLogged
UserLoginFailed
UserLogoff
UserMargins
UserModif
UserModification
UserModificationShort
UserNeedPermissionToEditStockToUsePos
@ -3326,6 +3327,7 @@ ModelTemplate
ModuleWebPortalDesc
ModuleWebPortalName
Reports
SecurityEvent
SendEmailsRemindersOnSupplierInvoiceDueDate
TXTLINKDATAPOLICYACCEPT
TXTLINKDATAPOLICYREFUSE
@ -3338,6 +3340,7 @@ WebPortalOrderListNothing
WebPortalPropalListNothing
WebPortalSetup
WebPortalSetupPage
WebsiteTemplateWasCopied
XSubsriptionErrors
YouCanChooseAModelForYouMailContent
YouCanMakeSomeInstructionForEmail

View File

@ -71,12 +71,16 @@ sort -u \
#
EXTRACT_STR=""
JOIN_STR=""
for t in '->trans' '->transnoentities' '->transnoentitiesnoconv' 'formSetup->newItem' ; do
for t in '->trans' '->transnoentities' '->transnoentitiesnoconv' '->newItem' '->buttonsSaveCancel'; do
MATCH_STR="$MATCH_STR$JOIN_STR$t"
EXTRACT_STR="$EXTRACT_STR$JOIN_STR(?<=${t}\\([\"'])([^\"']+)(?=[\"']\$)"
JOIN_STR="|"
done
echo "MATCH_STR=$MATCH_STR"
echo "EXTRACT_STR=$EXTRACT_STR"
echo "Generate the file EXPECTED_FILE=${EXPECTED_FILE} (contains autodetected dynamic trans and declared dynamic trans)"
{
# Find static strings that are translated in the sources (comments stripped)
# shellcheck disable=2086
@ -124,7 +128,10 @@ diff "${AVAILABLE_FILE}" "${EXPECTED_FILE}" \
> "${MISSING_AND_UNUSED_FILE}"
if [ -s "${MISSING_AND_UNUSED_FILE}" ] ; then
echo "##[group]List Apparently Unused Translations (<) and Missing Translations (>)"
echo
echo "##[group] Output is"
echo "< List Apparently Unused Translations (found into a lang file but not into code)"
echo "> Missing Translations (used by code but not found into lang files)"
echo
echo "## :warning: Unused Translations may match ->trans(\$key.'SomeString')."
echo "## You can add such dynamic keys to $(basename "$DYNAMIC_KEYS_SRC_FILE")"

View File

@ -341,7 +341,7 @@ class Facture extends CommonInvoice
'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -1, 'position' => 500),
'tms' => array('type' => 'timestamp', 'label' => 'DateModificationShort', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 502),
'fk_user_author' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => 1, 'visible' => -1, 'position' => 506),
'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => 1, 'visible' => -1, 'notnull' => -1, 'position' => 508),
'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModification', 'enabled' => 1, 'visible' => -1, 'notnull' => -1, 'position' => 508),
'fk_user_valid' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserValidation', 'enabled' => 1, 'visible' => -1, 'position' => 510),
'fk_user_closing' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserClosing', 'enabled' => 1, 'visible' => -1, 'position' => 512),
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 900),

View File

@ -137,7 +137,6 @@ AgendaUrlOptions1=You can also add following parameters to filter output:
AgendaUrlOptions3=<b>logina=%s</b> to restrict output to actions owned by a user <b>%s</b> (use <b>logina=!%s</b> for events not owned by the user).
AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to user <b>%s</b> (owner and others).
AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> to restrict output to actions linked to project <b>__PROJECT_ID__</b>.
AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> to exclude automatic events.
AgendaUrlOptionsType=<b>actiontype=%s</b> to get either automatic or manual events
AgendaUrlOptionsCode=<b>actioncode=%s</b> to get only events with a given code
AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> to include events of holidays.