diff --git a/Makefile b/Makefile index c7dec64e0a2..da255bb41a2 100755 --- a/Makefile +++ b/Makefile @@ -121,6 +121,7 @@ locales: msgfmt -o modules/module_manager/locale/ja/LC_MESSAGES/module_manager.mo modules/module_manager/locale/ja/LC_MESSAGES/module_manager.po msgfmt -o modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.mo modules/mri_violations/locale/ja/LC_MESSAGES/mri_violations.po msgfmt -o modules/next_stage/locale/ja/LC_MESSAGES/next_stage.mo modules/next_stage/locale/ja/LC_MESSAGES/next_stage.po + msgfmt -o modules/next_stage/locale/es/LC_MESSAGES/next_stage.mo modules/next_stage/locale/es/LC_MESSAGES/next_stage.po msgfmt -o modules/oidc/locale/ja/LC_MESSAGES/oidc.mo modules/oidc/locale/ja/LC_MESSAGES/oidc.po msgfmt -o modules/publication/locale/ja/LC_MESSAGES/publication.mo modules/publication/locale/ja/LC_MESSAGES/publication.po msgfmt -o modules/schedule_module/locale/ja/LC_MESSAGES/schedule_module.mo modules/schedule_module/locale/ja/LC_MESSAGES/schedule_module.po diff --git a/modules/next_stage/locale/es/LC_MESSAGES/next_stage.po b/modules/next_stage/locale/es/LC_MESSAGES/next_stage.po new file mode 100644 index 00000000000..d8ed7af047c --- /dev/null +++ b/modules/next_stage/locale/es/LC_MESSAGES/next_stage.po @@ -0,0 +1,59 @@ +# Default LORIS strings to be translated (English). +# Copy this to a language specific file and add translations to the +# new file. +# Copyright (C) 2025 +# This file is distributed under the same license as the LORIS package. +# Dave MacFarlane , 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: LORIS 27\n" +"Report-Msgid-Bugs-To: https://github.com/aces/Loris/issues\n" +"POT-Creation-Date: 2025-04-08 14:37-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: modules/new_profile/php/module.class.inc:60 +msgid "Next Stage" +msgstr "Próxima Etapa" + +msgid "Start Next Stage" +msgstr "Comenzar próxima etapa" + +msgid "Date of %s" +msgstr "Fecha de %s" + +msgid "Retype Date of %s" +msgstr "Confirme la fecha de %s" + +msgid "Start %s" +msgstr "Comenzar %s" + +msgid "CohortID:" +msgstr "Identificador del Cohorte:" + +msgid "Date is required." +msgstr "La fecha es requerida." + +msgid "Both date fields are required." +msgstr "Los dos campos de fecha son requeridos." + +msgid "Both Date fields must match." +msgstr "Las dos fechas deben coincidir." + +msgid "Date of Visit is less than Date of Screening." +msgstr "Las dos fechas deben coincidir." + +msgid "Date of Visit is less than Date of Birth/EDC." +msgstr "Las dos fechas deben coincidir." + +msgid "Next stage started." +msgstr "Próxima etapa iniciada." + +msgid "Click here to continue." +msgstr "Click aquí para continuar." diff --git a/modules/next_stage/locale/next_stage.pot b/modules/next_stage/locale/next_stage.pot index ac57ee3676d..8e22f1d441c 100644 --- a/modules/next_stage/locale/next_stage.pot +++ b/modules/next_stage/locale/next_stage.pot @@ -24,3 +24,36 @@ msgstr "" msgid "Start Next Stage" msgstr "" + +msgid "Date of %s" +msgstr "" + +msgid "Retype Date of %s" +msgstr "" + +msgid "Start %s" +msgstr "" + +msgid "CohortID:" +msgstr "" + +msgid "Date is required." +msgstr "" + +msgid "Both date fields are required." +msgstr "" + +msgid "Both Date fields must match." +msgstr "" + +msgid "Date of Visit is less than Date of Screening." +msgstr "" + +msgid "Date of Visit is less than Date of Birth/EDC." +msgstr "" + +msgid "Next stage started." +msgstr "" + +msgid "Click here to continue." +msgstr "" diff --git a/modules/next_stage/php/next_stage.class.inc b/modules/next_stage/php/next_stage.class.inc index e9a3a145256..9b780452929 100644 --- a/modules/next_stage/php/next_stage.class.inc +++ b/modules/next_stage/php/next_stage.class.inc @@ -184,9 +184,16 @@ class Next_Stage extends \NDB_Form } // add date rules - $this->addRule('date1', 'Date is required', 'required'); - $this->addRule(['date1', 'date2'], 'Date fields must match', 'compare'); - + $this->addRule( + 'date1', + dgettext("next_stage", "Date is required."), + 'required' + ); + $this->addRule( + ['date1', 'date2'], + dgettext("next_stage", "Date fields must match."), + 'compare' + ); $this->form->addFormRule([&$this, '_validate']); } @@ -211,16 +218,18 @@ class Next_Stage extends \NDB_Form || is_null($values['date1']) || is_null($values['date2']) ) { - $errors['date1'] .= "Both date fields are required."; + $errors['date1'] + .= dgettext("next_stage", "Both date fields are required."); return $errors; } // check date pairs if (empty($values['date1'])) { - $errors['date1'] .= "Date is required. \n"; + $errors['date1'] + .= dgettext("next_stage", "Date is required.")."\n"; } - if ($values['date1'] != $values['date2']) { - $errors['date1'] .= "Both Date fields must match. \n"; + $errors['date1'] + .= dgettext("next_stage", "Both Date fields must match."); } // get candidate's DOB or EDC according to CohortID @@ -237,14 +246,18 @@ class Next_Stage extends \NDB_Form && $config->getSetting('screeningAfterVisit')!="true" && strcmp($date, $timePoint->getData('Date_screening')) < 0 ) { - $errors['date1'] .= "Date of Visit is less than". - " Date of Screening. \n"; + $errors['date1'] .= dgettext( + "next_stage", + "Date of Visit is less than Date of Screening." + ); } if ($config->getSetting('allowPrenatalTimepoints')!="true" && strcmp($date, $candidateBirthDate) < 1 ) { - $errors['date1'] .= "Date of Visit is less than ". - "Date of Birth/EDC. \n"; + $errors['date1'] .= dgettext( + "next_stage", + "Date of Visit is less than Date of Birth/EDC." + ); } } diff --git a/modules/next_stage/templates/form_next_stage.tpl b/modules/next_stage/templates/form_next_stage.tpl index c5cce822353..522260852d3 100644 --- a/modules/next_stage/templates/form_next_stage.tpl +++ b/modules/next_stage/templates/form_next_stage.tpl @@ -1,6 +1,6 @@ {if $success} -

Next stage started. Click here to continue.

+

{dgettext("next_stage", "Next stage started.")} {dgettext("next_stage", "Click here to continue.")}.

{else} @@ -12,22 +12,22 @@ {/foreach}
- +
{$form.date1.html}
- +
{$form.date2.html}
{if $form.CohortID.html != ""}
- +
{$form.CohortID.html}
{/if}
-
+
{$form.hidden}