diff --git a/mod/photos.php b/mod/photos.php index 209b9fb7b..107171f67 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1020,13 +1020,15 @@ function photos_content(App $a) $drop_url = DI::args()->getQueryString(); return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [ - '$method' => 'post', - '$message' => DI::l10n()->t('Do you really want to delete this photo album and all its photos?'), - '$confirm' => DI::l10n()->t('Delete Album'), - '$confirm_url' => $drop_url, - '$confirm_name' => 'dropalbum', + '$l10n' => [ + 'message' => DI::l10n()->t('Do you really want to delete this photo album and all its photos?'), + 'confirm' => DI::l10n()->t('Delete Album'), + 'cancel' => DI::l10n()->t('Cancel'), + ], + '$method' => 'post', + '$confirm_url' => $drop_url, + '$confirm_name' => 'dropalbum', '$confirm_value' => 'dropalbum', - '$cancel' => DI::l10n()->t('Cancel'), ]); } @@ -1127,13 +1129,15 @@ function photos_content(App $a) $drop_url = DI::args()->getQueryString(); return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [ - '$method' => 'post', - '$message' => DI::l10n()->t('Do you really want to delete this photo?'), - '$confirm' => DI::l10n()->t('Delete Photo'), - '$confirm_url' => $drop_url, - '$confirm_name' => 'delete', + '$l10n' => [ + 'message' => DI::l10n()->t('Do you really want to delete this photo?'), + 'confirm' => DI::l10n()->t('Delete Photo'), + 'cancel' => DI::l10n()->t('Cancel'), + ], + '$method' => 'post', + '$confirm_url' => $drop_url, + '$confirm_name' => 'delete', '$confirm_value' => 'delete', - '$cancel' => DI::l10n()->t('Cancel'), ]); } diff --git a/src/Module/Contact.php b/src/Module/Contact.php index bf0e3bfaf..b671de5e1 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -432,15 +432,17 @@ class Contact extends BaseModule DI::page()['aside'] = ''; return Renderer::replaceMacros(Renderer::getMarkupTemplate('contact_drop_confirm.tpl'), [ - '$header' => DI::l10n()->t('Drop contact'), + '$l10n' => [ + 'header' => DI::l10n()->t('Drop contact'), + 'message' => DI::l10n()->t('Do you really want to delete this contact?'), + 'confirm' => DI::l10n()->t('Yes'), + 'cancel' => DI::l10n()->t('Cancel'), + ], '$contact' => self::getContactTemplateVars($orig_record), '$method' => 'get', - '$message' => DI::l10n()->t('Do you really want to delete this contact?'), - '$confirm' => DI::l10n()->t('Yes'), '$confirm_url' => DI::args()->getCommand(), '$confirm_name' => 't', '$confirm_value' => BaseModule::getFormSecurityToken('contact_action'), - '$cancel' => DI::l10n()->t('Cancel'), ]); } // Now check how the user responded to the confirmation query diff --git a/view/templates/confirm.tpl b/view/templates/confirm.tpl index 47f231a5f..b64cd4bd9 100644 --- a/view/templates/confirm.tpl +++ b/view/templates/confirm.tpl @@ -2,10 +2,10 @@ <center> <form action="{{$confirm_url}}" id="confirm-form" method="{{$method}}"> - <h3 id="confirm-message">{{$message}}</h3> + <h3 id="confirm-message">{{$l10n.message}}</h3> - <button class="confirm-button" id="confirm-submit-button" type="submit" name="{{$confirm_name}}" value="{{$confirm_value}}">{{$confirm}}</button> - <button class="confirm-button" id="confirm-cancel-button" type="submit" name="canceled" value="{{$cancel}}">{{$cancel}}</button> + <button class="confirm-button" id="confirm-submit-button" type="submit" name="{{$confirm_name}}" value="{{$confirm_value}}">{{$l10n.confirm}}</button> + <button class="confirm-button" id="confirm-cancel-button" type="submit" name="canceled" value="{{$l10n.cancel}}">{{$l10n.cancel}}</button> </form> </center> diff --git a/view/templates/contact_drop_confirm.tpl b/view/templates/contact_drop_confirm.tpl index 48b61832d..bb4d3a10c 100644 --- a/view/templates/contact_drop_confirm.tpl +++ b/view/templates/contact_drop_confirm.tpl @@ -1,8 +1,8 @@ -<h1>{{$header}}</h1> - -{{include file="contact_template.tpl" no_contacts_checkbox=True}} - -{{include file="confirm.tpl"}} - - +<h1>{{$l10n.header}}</h1> + +{{include file="contact_template.tpl" no_contacts_checkbox=True}} + +{{include file="confirm.tpl"}} + + <div class="clear"></div> \ No newline at end of file diff --git a/view/theme/frio/templates/confirm.tpl b/view/theme/frio/templates/confirm.tpl index 5e173d68c..b1fc8eb9e 100644 --- a/view/theme/frio/templates/confirm.tpl +++ b/view/theme/frio/templates/confirm.tpl @@ -1,9 +1,9 @@ <form action="{{$confirm_url}}" id="confirm-form" method="{{$method}}" class="generic-page-wrapper"> - <div id="confirm-message">{{$message}}</div> + <div id="confirm-message">{{$l10n.message}}</div> <div class="form-group pull-right settings-submit-wrapper"> - <button type="submit" name="{{$confirm_name}}" id="confirm-submit-button" class="btn btn-primary confirm-button" value="{{$confirm_value}}">{{$confirm}}</button> - <button type="submit" name="canceled" value="{{$cancel}} id="confirm-cancel-button" class="btn confirm-button" data-dismiss="modal">{{$cancel}}</button> + <button type="submit" name="{{$confirm_name}}" id="confirm-submit-button" class="btn btn-primary confirm-button" value="{{$confirm_value}}">{{$l10n.confirm}}</button> + <button type="submit" name="canceled" value="{{$l10n.cancel}}" id="confirm-cancel-button" class="btn confirm-button" data-dismiss="modal">{{$l10n.cancel}}</button> </div> </form> diff --git a/view/theme/frio/templates/contact_drop_confirm.tpl b/view/theme/frio/templates/contact_drop_confirm.tpl index d665fefed..a0ac15cf6 100644 --- a/view/theme/frio/templates/contact_drop_confirm.tpl +++ b/view/theme/frio/templates/contact_drop_confirm.tpl @@ -1,9 +1,9 @@ -<div id="contact-drop-confirm"> - <h2 class="heading">{{$header}}</h2> - - {{include file="contact_template.tpl" no_contacts_checkbox=True}} - - {{include file="confirm.tpl"}} - - <div class="clear"></div> -</div> +<div id="contact-drop-confirm"> + <h2 class="heading">{{$l10n.header}}</h2> + + {{include file="contact_template.tpl" no_contacts_checkbox=True}} + + {{include file="confirm.tpl"}} + + <div class="clear"></div> +</div>