Skip to content

Commit

Permalink
Language-izes all of the delete confirmation messages [#296]
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Nov 15, 2011
1 parent fa70319 commit ef02f7e
Show file tree
Hide file tree
Showing 48 changed files with 80 additions and 80 deletions.
2 changes: 1 addition & 1 deletion framework/modules-1/common/actions/groupperms.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
$users[] = $g;
}

$p["Group"] = 'username';
$p[gt("Group")] = 'username';
foreach ($mod->permissions() as $key => $value) {
$p[$value]=$key;
}
Expand Down
6 changes: 3 additions & 3 deletions framework/modules-1/common/actions/userperms.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
$users[] = $u;
}

$p["User Name"] = 'username';
$p["First Name"] = 'firstname';
$p["Last Name"] = 'lastname';
$p[gt("User Name")] = 'username';
$p[gt("First Name")] = 'firstname';
$p[gt("Last Name")] = 'lastname';
foreach ($mod->permissions() as $key => $value) {
$p[$value]=$key;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{/if}
</td><td>
{icon class=edit action=edit_contentpage record=$section title='Edit'|gettext}
{icon action=delete record=$section title='Delete'|gettext onclick="return confirm('Delete this page?');"}
{icon action=delete record=$section title='Delete'|gettext onclick="return confirm('"|cat:("Delete this page?"|gettext)|cat:"');"}
</td><td>
{icon int=$section->id action=userperms _common=1 img='userperms.png' title='Assign user permissions for this page'|gettext text="User"}
{icon int=$section->id action=groupperms _common=1 img='groupperms.png' title='Assign group permissions for this page'|gettext text="Group"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
{/if}
{if ($theme->user_configured)}
{if $smarty.const.THEME_STYLE == ""}
{br}{icon class=configure action=configure_theme theme=$class title="Configure this Theme"|gettext text="Configure"|gettext}
{br}{icon class=configure action=configure_theme theme=$class title="Configure this Theme"|gettext}
{else}
{br}{icon class=configure action=configure_theme theme=$class sv=$smarty.const.THEME_STYLE title="Configure this Theme"|gettext text="Configure"|gettext}
{br}{icon class=configure action=configure_theme theme=$class sv=$smarty.const.THEME_STYLE title="Configure this Theme"|gettext}
{/if}
{/if}
</td>
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/blog/views/blog/tags_cloud.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

{permissions}
{if $permissions.manage == 1}
{icon class="manage" controller=expTag action=manage title="Manage Tags"|gettext text="Manage Tags"|gettext}
{icon class="manage" controller=expTag action=manage text="Manage Tags"|gettext}
{/if}
{/permissions}
<ul>
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/blog/views/blog/tags_list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

{permissions}
{if $permissions.manage == 1}
{icon class="manage" controller=expTag action=manage title="Manage Tags"|gettext text="Manage Tags"|gettext}
{icon class="manage" controller=expTag action=manage text="Manage Tags"|gettext}
{/if}
{/permissions}

Expand Down
2 changes: 1 addition & 1 deletion framework/modules/company/views/company/show.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{icon img='edit.png' action=edit id=$record->id title="Edit"|gettext|cat:" `$record->title`"}
{/if}
{if $permissions.delete == 1}
{icon img='delete.png' action=delete id=$record->id title="Delete"|gettext|cat:" `$record->title`" onclick="return confirm('Are you sure you want to delete this `$modelname`?');"}
{icon img='delete.png' action=delete id=$record->id title="Delete"|gettext|cat:" `$record->title`"}
{/if}
{/permissions}
{$page->links}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/company/views/company/showall.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{icon action=edit record=$company title="Edit"|gettext|cat:" `$company->title`"}
{/if}
{if $permissions.delete == 1}
{icon action=delete record=$company title="Delete"|gettext|cat:" `$company->title`" onclick="return confirm('Are you sure you want to delete this `$modelname`?');"}
{icon action=delete record=$company title="Delete"|gettext|cat:" `$company->title`"}
{/if}
</div>
{/permissions}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/core/views/expComment/getComments.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{icon action=edit record=$cmt content_id=$content_id title="Edit this comment"|gettext}
{/if}
{if $permissions.delete == 1}
{icon action=delete record=$cmt title="Delete this comment"|gettext onclick="return confirm('Are you sure you want to delete this comment?');"}
{icon action=delete record=$cmt title="Delete this comment"|gettext onclick="return confirm('"|cat:("Are you sure you want to delete this comment?"|gettext)|cat:"');"}
{/if}
<div>
{/permissions}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/core/views/expComment/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<td>
<div class="item-actions">
{icon action=edit record=$comment content_id=$content_id title="Edit this comment"|gettext}
{icon action=delete record=$comment title="Delete this comment"|gettext onclick="return confirm('Are you sure you want to delete this comment?');"}
{icon action=delete record=$comment title="Delete this comment"|gettext onclick="return confirm('"|cat:("Are you sure you want to delete this comment?"|gettext)|cat:"');"}
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/core/views/expHTMLEditor/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<td>
<div class="item-actions">
{icon module="expHTMLEditor" action=edit record=$cfg title="Edit this Toolbar"|gettext}
{icon module="expHTMLEditor" action=delete record=$cfg title="Delete this Toolbar"|gettext onclick="return confirm('Are you sure you want to delete this toolbar?');"}
{icon module="expHTMLEditor" action=delete record=$cfg title="Delete this Toolbar"|gettext onclick="return confirm('"|cat:("Are you sure you want to delete this toolbar?"|gettext)|cat:"');"}
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/core/views/expSimpleNote/getNotes.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{icon action=edit record=$note tab=$tab content_id=$content_id content_type=$content_type title="Edit this note"|gettext}
{/if}
{if $permissions.delete == 1}
{icon action=delete record=$note tab=$tab content_id=$content_id content_type=$content_type title="Delete this note"|gettext onclick="return confirm('Are you sure you want to delete this note?');"}
{icon action=delete record=$note tab=$tab content_id=$content_id content_type=$content_type title="Delete this note"|gettext onclick="return confirm('"|cat:("Are you sure you want to delete this note?"|gettext)|cat:"');"}
{/if}
</div>
{/permissions}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/core/views/expSimpleNote/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<td>
<div class="item-actions">
{icon class=edit action=approve record=$simplenote tab=$tab title="Edit this note"|gettext}
{icon action=delete record=$simplenote tab=$tab title="Delete this note"|gettext onclick="return confirm('Are you sure you want to delete this note?');"}
{icon action=delete record=$simplenote tab=$tab title="Delete this note"|gettext onclick="return confirm('"|cat:("Are you sure you want to delete this note?"|gettext)|cat:"');"}
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/core/views/expTag/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
{icon controller=$controller action=edit record=$listing title="Edit this tag"|gettext}
{/if}
{if $permissions.delete == 1}
{icon controller=$controller action=delete record=$listing title="Delete this tag"|gettext onclick="return confirm('Are you sure you want to delete this tag?');"}
{icon controller=$controller action=delete record=$listing title="Delete this tag"|gettext onclick="return confirm('"|cat:("Are you sure you want to delete this tag?"|gettext)|cat:"');"}
{/if}
{/permissions}
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<a href="{link action=edit id=$product->id}" title="{"Edit this entry"|gettext}">
<img src="{$smarty.const.ICON_RELATIVE|cat:'edit.png'}" title="{"Edit this entry"|gettext}" alt="{"Edit this entry"|gettext}" />
</a>
{icon action=delete record=$product title="Delete this product"}
{icon action=delete record=$product title="Delete this product"|gettext}
{/if}
</div>
{/permissions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<a href="{link action=edit id=$listing->id}" title="{"Edit this entry"|gettext}">
<img src="{$smarty.const.ICON_RELATIVE|cat:'edit.png'}" title="{"Edit this entry"|gettext}" alt="{"Edit this entry"|gettext}" />
</a>
{icon action=delete record=$listing title="Delete this product"}
{icon action=delete record=$listing title="Delete this product"|gettext}
{/if}
</div>
{/permissions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<a href="{link action=edit id=$listing->id}" title="{"Edit this entry"|gettext}">
<img src="{$smarty.const.ICON_RELATIVE|cat:'edit.png'}" title="{"Edit this entry"|gettext}" alt="{"Edit this entry"|gettext}" />
</a>
{icon action=delete record=$listing title="Delete this product"}
{icon action=delete record=$listing title="Delete this product"|gettext}
{/if}
</div>
{/permissions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{icon action=edit record=$listing title="Edit `$listing->title`"}
{/if}
{if $permissions.delete == 1}
{icon action=delete record=$listing title="Delete `$listing->title`" onclick="return confirm('Are you sure you want to delete this product?');"}
{icon action=delete record=$listing title="Delete `$listing->title`" onclick="return confirm('"|cat:("Are you sure you want to delete this product?"|gettext)|cat:"');"}
{/if}
{if $permissions.edit == 1}
{icon action=copyProduct class="copy" record=$listingtitle text="Copy" title="Copy `$listing->title` " record=$listing}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
<li>
{$calc->speed}{br}
{* icon controller=shipping action=editspeed id=$calc->id title="Edit `$calc->speed`" *}
{icon controller=shipping img='delete.png' text="delete" action=deleteSpeed id=$calc->id title="Delete `$calc->speed`" onclick="return confirm('Are you sure you want to delete this speed?');"}
{icon controller=shipping img='delete.png' text="delete" action=deleteSpeed id=$calc->id title="Delete `$calc->speed`" onclick="return confirm('"|cat:("Are you sure you want to delete this speed?"|gettext)|cat:"');"}
</li>
{/foreach}
</ul>
{icon class="add" action="editspeed/id/`$calculator->id`" text="Create new Shipping Speed"}
{icon class="add" action="editspeed/id/`$calculator->id`" text="Create new Shipping Speed"|gettext}
{br}{br}
<div class="{if !$calculator->shippingspeeds}hide{/if}">
<hr>
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/ecommerce/views/cart/checkout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
{foreach from=$discounts item=discount}
<li>
<strong>{$discount->coupon_code}</strong>
&nbsp;&nbsp;{icon class=delete action=removeDiscountFromCart record=$discount alt="Remove discount from cart."}
&nbsp;&nbsp;{icon class=delete action=removeDiscountFromCart record=$discount alt="Remove discount from cart."|gettext}
{br}
<em>{$discount->title}</em>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</td>
<td class="prodrow price" id="price-{$item->id}">${$item->products_price*$item->quantity|number_format:2}</td>
<!--<td class="prodrow price" id="price-{$item->id}">${$item->getTotal()|number_format:2}</td>-->
<td class="prodrow">{icon img="ecom/delete-from-cart.png" action=removeItem record=$item alt="Remove from cart"}</td>
<td class="prodrow">{icon img="ecom/delete-from-cart.png" action=removeItem record=$item alt="Remove from cart"|gettext}</td>
</tr>
{/foreach}
</table>
Expand Down
8 changes: 4 additions & 4 deletions framework/modules/ecommerce/views/donation/showall.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@
{permissions}
<div class="item-actions">
{if $permissions.edit == 1}
{icon controller=store action=edit record=$cause title="Edit Donation"}
{icon controller=store action=edit record=$cause title="Edit Donation"|gettext}
{/if}
{if $permissions.delete == 1}
{icon controller=store action=delete record=$cause title="Remove Donation"}
{icon controller=store action=delete record=$cause title="Remove Donation"|gettext}
{/if}
</div>
{/permissions}
</td>
</tr>
{foreachelse}
<h2>No causes have been setup to donate to.</h2>
<h2>{"No causes have been setup to donate to."|gettext}</h2>
{/foreach}
</table>
{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
{if $permissions.edit == 1 or $permissions.administrate == 1}
<div id="prod-admin">
<a href="{link controller=store action=edit id=0 product_type=donation}">Add a new donation cause</a>
<a href="{link controller=store action=edit id=0 product_type=donation}">{"Add a new donation cause"|gettext}</a>
</div>
{/if}
{/permissions}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/ecommerce/views/store/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{permissions}
<div class="module-actions">
{if $permissions.edit == 1}
{icon class=add action=edit title="Create a new product" text="Add a product"}
{icon class=add action=edit title="Create a new product"|gettext text="Add a product"|gettext}
{/if}
</div>
{/permissions}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/ecommerce/views/store/show.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@
{icon img="edit.png" action=edit id=$chiprod->id title="Edit `$chiprod->title`"}
{/if}
{if $permissions.delete == 1}
{icon img="delete.png" action=delete record=$chiprod title="Delete `$chiprod->title`" onclick="return confirm('Are you sure you want to delete this child product?');"}
{icon img="delete.png" action=delete record=$chiprod title="Delete `$chiprod->title`" onclick="return confirm('"|cat:("Are you sure you want to delete this child product?"|gettext)|cat:"');"}
{/if}
{if $permissions.edit == 1}
{icon action=copyProduct img="copy.png" title="Copy `$chiprod->title` " record=$chiprod}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{icon controller=storeCategory action=edit record=$cat title="Edit `$cat->title`"}
{/if}
{if $permissions.delete == 1}
{icon controller=storeCategory action=delete record=$cat title="Delete `$cat->title`" onclick="return confirm('Are you sure you want to delete this category?');"}
{icon controller=storeCategory action=delete record=$cat title="Delete `$cat->title`" onclick="return confirm('"|cat:("Are you sure you want to delete this category?"|gettext)|cat:"');"}
{/if}
</div>
{/permissions}
Expand Down
6 changes: 3 additions & 3 deletions framework/modules/ecommerce/views/store/showall.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{permissions}
<div class="module-actions">
{if $permissions.edit == 1}
{icon action=edit module=storeCategory record=$current_category title="Edit `$current_category->title`" text="Edit this Store Category"}{br}
{icon action=edit module=storeCategory record=$current_category title="Edit `$current_category->title`" text="Edit this Store Category"|gettext}{br}
{/if}
{*if $permissions.manage == 1}
{icon action=configure module=storeCategory record=$current_category title="Configure `$current_category->title`" text="Configure this Store Category"}{br}
Expand All @@ -50,7 +50,7 @@
{ddrerank label="Products" sql=$rerankSQL model="product" controller="storeCategory" id=$current_category->id}
{/if}
{if $permissions.edit == 1}
{icon class=add action=create title="Add a new product" text="Add a New Product"}
{icon class=add action=create text="Add a New Product"|gettext}
{/if}
</div>
{/permissions}
Expand Down Expand Up @@ -86,7 +86,7 @@
{icon controller=storeCategory action=edit record=$cat title="Edit `$cat->title`"}
{/if}
{if $permissions.delete == 1}
{icon controller=storeCategory action=delete record=$cat title="Delete `$cat->title`" onclick="return confirm('Are you sure you want to delete this category?');"}
{icon controller=storeCategory action=delete record=$cat title="Delete `$cat->title`" onclick="return confirm('"|cat:("Are you sure you want to delete this category?"|gettext)|cat:"');"}
{/if}
</div>
{/permissions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{permissions}
<div class="module-actions">
{if $permissions.edit == 1}
{icon class=add action=create title="Add a new product" text="Add a New Product"}
{icon class=add action=create text="Add a New Product"|gettext}
{/if}
</div>
{/permissions}
Expand Down
4 changes: 2 additions & 2 deletions framework/modules/ecommerce/views/tax/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

<h1>{"Tax Class Manager"|gettext}</h1>

{icon action=edit class="add" text="Add a Tax Class"}
{icon action=manage_zones class="manage" text="Manage Zones"}
{icon action=edit class="add" text="Add a Tax Class"|gettext}
{icon action=manage_zones class="manage" text="Manage Zones"|gettext}
{br}
{br}
<table border="0" cellspacing="0" cellpadding="0" class="exp-skin-table">
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/ecommerce/views/tax/manage_zones.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<h1>{"Tax Zone Manager"|gettext}</h1>

{icon action=edit_zone class="add" text="Add a Tax Zone"}
{icon action=edit_zone class="add" text="Add a Tax Zone"|gettext}
{br}
{br}
<table border="0" cellspacing="0" cellpadding="0" class="exp-skin-table">
Expand Down
4 changes: 2 additions & 2 deletions framework/modules/faq/views/faq/ask_question.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
{permissions}
<div class="module-actions">
{if $permissions.create == 1}
{icon class=add action=create title="Add a new FAQ"|gettext text="Add a New FAQ"|gettext}
{icon class=add action=create text="Add a New FAQ"|gettext}
{/if}
{br}
{if $permissions.manage == 1}
{icon action=manage title="Manage FAQs"|gettext text="Manage FAQs"|gettext}
{icon action=manage text="Manage FAQs"|gettext}
{/if}
</div>
{/permissions}
Expand Down
4 changes: 2 additions & 2 deletions framework/modules/faq/views/faq/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{permissions}
<div class="module-actions">
{if $permissions.create == 1}
{icon class=add action=create title="Add a new FAQ"|gettext text="Add a New FAQ"|gettext}
{icon class=add action=create text="Add a New FAQ"|gettext}
{/if}
{if $permissions.manage == 1}
{ddrerank items=$page->records model="faq" sortfield="question" label="FAQs"|gettext}
Expand Down Expand Up @@ -68,7 +68,7 @@
{icon action=edit record=$question title="Edit FAQ"|gettext}
{/if}
{if $permissions.delete == 1}
{icon action=delete record=$question title="Delete this FAQ"|gettext|cat:"?" onclick="return confirm('Are you sure you want to delete this FAQ?');"}
{icon action=delete record=$question title="Delete this FAQ"|gettext|cat:"?" onclick="return confirm('"|cat:("Are you sure you want to delete this FAQ?"|gettext)||cat:"');"}
{/if}
</div>
{/permissions}
Expand Down
6 changes: 3 additions & 3 deletions framework/modules/faq/views/faq/showall.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
{permissions}
<div class="module-actions">
{if $permissions.create == 1}
{icon class=add action=create title="Add a new FAQ"|gettext text="Add a New FAQ"|gettext}
{icon class=add action=create text="Add a New FAQ"|gettext}
{/if}
{br}
{if $permissions.manage == 1}
{icon action=manage title="Manage FAQs"|gettext text="Manage FAQs"|gettext}
{icon action=manage text="Manage FAQs"|gettext}
{/if}
</div>
{/permissions}
Expand Down Expand Up @@ -54,7 +54,7 @@
{icon action=edit record=$question title="Edit FAQ"|gettext}
{/if}
{if $permissions.delete == 1}
{icon action=delete record=$question title="Delete this FAQ"|gettext|cat:"?" onclick="return confirm('Are you sure you want to delete this FAQ?');"}
{icon action=delete record=$question title="Delete this FAQ"|gettext|cat:"?" onclick="return confirm('"|cat:("Are you sure you want to delete this FAQ?"|gettext)|cat:"');"}
{/if}
</div>
{/permissions}
Expand Down
Loading

0 comments on commit ef02f7e

Please sign in to comment.