Commit 640fb049 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 331008: Consistently name errors either prod_ or product_ - Patch by…

Bug 331008: Consistently name errors either prod_ or product_ - Patch by timeless <timeless@bemail.org> r=LpSolit a=justdave
parent 9a6a605d
...@@ -168,13 +168,13 @@ if ($action eq 'new') { ...@@ -168,13 +168,13 @@ if ($action eq 'new') {
# Check for exact case sensitive match: # Check for exact case sensitive match:
if ($product->name eq $product_name) { if ($product->name eq $product_name) {
ThrowUserError("prod_name_already_in_use", ThrowUserError("product_name_already_in_use",
{'product' => $product->name}); {'product' => $product->name});
} }
# Next check for a case-insensitive match: # Next check for a case-insensitive match:
if (lc($product->name) eq lc($product_name)) { if (lc($product->name) eq lc($product_name)) {
ThrowUserError("prod_name_diff_in_case", ThrowUserError("product_name_diff_in_case",
{'product' => $product_name, {'product' => $product_name,
'existing_product' => $product->name}); 'existing_product' => $product->name});
} }
...@@ -779,30 +779,30 @@ if ($action eq 'update') { ...@@ -779,30 +779,30 @@ if ($action eq 'update') {
} }
unless ($product_name) { unless ($product_name) {
ThrowUserError('prod_cant_delete_name', ThrowUserError('product_cant_delete_name',
{product => $product_old->name}); {product => $product_old->name});
} }
unless ($description) { unless ($description) {
ThrowUserError('prod_cant_delete_description', ThrowUserError('product_cant_delete_description',
{product => $product_old->name}); {product => $product_old->name});
} }
my $stored_maxvotesperbug = $maxvotesperbug; my $stored_maxvotesperbug = $maxvotesperbug;
if (!detaint_natural($maxvotesperbug)) { if (!detaint_natural($maxvotesperbug)) {
ThrowUserError('prod_votes_per_bug_must_be_nonnegative', ThrowUserError('product_votes_per_bug_must_be_nonnegative',
{maxvotesperbug => $stored_maxvotesperbug}); {maxvotesperbug => $stored_maxvotesperbug});
} }
my $stored_votesperuser = $votesperuser; my $stored_votesperuser = $votesperuser;
if (!detaint_natural($votesperuser)) { if (!detaint_natural($votesperuser)) {
ThrowUserError('prod_votes_per_user_must_be_nonnegative', ThrowUserError('product_votes_per_user_must_be_nonnegative',
{votesperuser => $stored_votesperuser}); {votesperuser => $stored_votesperuser});
} }
my $stored_votestoconfirm = $votestoconfirm; my $stored_votestoconfirm = $votestoconfirm;
if (!detaint_natural($votestoconfirm)) { if (!detaint_natural($votestoconfirm)) {
ThrowUserError('prod_votes_to_confirm_must_be_nonnegative', ThrowUserError('product_votes_to_confirm_must_be_nonnegative',
{votestoconfirm => $stored_votestoconfirm}); {votestoconfirm => $stored_votestoconfirm});
} }
...@@ -812,7 +812,7 @@ if ($action eq 'update') { ...@@ -812,7 +812,7 @@ if ($action eq 'update') {
new Bugzilla::Product({name => $product_name}); new Bugzilla::Product({name => $product_name});
if (lc($product_name) ne lc($product_old->name) && if (lc($product_name) ne lc($product_old->name) &&
$testproduct) { $testproduct) {
ThrowUserError('prod_name_already_in_use', ThrowUserError('product_name_already_in_use',
{product => $product_name}); {product => $product_name});
} }
...@@ -822,7 +822,7 @@ if ($action eq 'update') { ...@@ -822,7 +822,7 @@ if ($action eq 'update') {
$defaultmilestone); $defaultmilestone);
unless ($milestone) { unless ($milestone) {
ThrowUserError('prod_must_define_defaultmilestone', ThrowUserError('product_must_define_defaultmilestone',
{product => $product_old->name, {product => $product_old->name,
defaultmilestone => $defaultmilestone, defaultmilestone => $defaultmilestone,
classification => $classification_name}); classification => $classification_name});
......
...@@ -1037,50 +1037,50 @@ ...@@ -1037,50 +1037,50 @@
Patches cannot be more than [% Param('maxpatchsize') %] KB in size. Patches cannot be more than [% Param('maxpatchsize') %] KB in size.
Try breaking your patch into several pieces. Try breaking your patch into several pieces.
[% ELSIF error == "prod_votes_per_bug_must_be_nonnegative" %] [% ELSIF error == "product_votes_per_bug_must_be_nonnegative" %]
[% title = "Maximum Votes Must Be Non-negative" %] [% title = "Maximum Votes Must Be Non-negative" %]
[% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %] [% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %]
'[% maxvotesperbug FILTER html %]' is an invalid value for the '[% maxvotesperbug FILTER html %]' is an invalid value for the
<em>'Maximum Votes Per [% terms.Bug %]'</em> field, which should <em>'Maximum Votes Per [% terms.Bug %]'</em> field, which should
contain a non-negative number. contain a non-negative number.
[% ELSIF error == "prod_votes_per_user_must_be_nonnegative" %] [% ELSIF error == "product_votes_per_user_must_be_nonnegative" %]
[% title = "Votes Per User Must Be Non-negative" %] [% title = "Votes Per User Must Be Non-negative" %]
[% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %] [% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %]
'[% votesperuser FILTER html %]' is an invalid value for the '[% votesperuser FILTER html %]' is an invalid value for the
<em>'Votes Per User'</em> field, which should contain a <em>'Votes Per User'</em> field, which should contain a
non-negative number. non-negative number.
[% ELSIF error == "prod_votes_to_confirm_must_be_nonnegative" %] [% ELSIF error == "product_votes_to_confirm_must_be_nonnegative" %]
[% title = "Votes To Confirm Must Be Non-negative" %] [% title = "Votes To Confirm Must Be Non-negative" %]
[% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %] [% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %]
'[% votestoconfirm FILTER html %]' is an invalid value for the '[% votestoconfirm FILTER html %]' is an invalid value for the
<em>'Votes To Confirm'</em> field, which should contain a <em>'Votes To Confirm'</em> field, which should contain a
non-negative number. non-negative number.
[% ELSIF error == "prod_cant_delete_description" %] [% ELSIF error == "product_cant_delete_description" %]
[% title = "Cannot delete product description" %] [% title = "Cannot delete product description" %]
[% admindocslinks = {'products.html' => 'Administering products'} %] [% admindocslinks = {'products.html' => 'Administering products'} %]
Cannot delete the description for product Cannot delete the description for product
'[% product FILTER html %]'. '[% product FILTER html %]'.
[% ELSIF error == "prod_cant_delete_name" %] [% ELSIF error == "product_cant_delete_name" %]
[% title = "Cannot delete product name" %] [% title = "Cannot delete product name" %]
[% admindocslinks = {'products.html' => 'Administering products'} %] [% admindocslinks = {'products.html' => 'Administering products'} %]
Cannot delete the product name for product '[% product FILTER html %]'. Cannot delete the product name for product '[% product FILTER html %]'.
[% ELSIF error == "prod_name_already_in_use" %] [% ELSIF error == "product_name_already_in_use" %]
[% title = "Product name already in use" %] [% title = "Product name already in use" %]
[% admindocslinks = {'products.html' => 'Administering products'} %] [% admindocslinks = {'products.html' => 'Administering products'} %]
The product name '[% product FILTER html %]' is already in use. The product name '[% product FILTER html %]' is already in use.
[% ELSIF error == "prod_name_diff_in_case" %] [% ELSIF error == "product_name_diff_in_case" %]
[% title = "Product name differs only in case" %] [% title = "Product name differs only in case" %]
[% admindocslinks = {'products.html' => 'Administering products'} %] [% admindocslinks = {'products.html' => 'Administering products'} %]
The product name '[% product FILTER html %]' differs from existing The product name '[% product FILTER html %]' differs from existing
product '[% existing_product FILTER html %]' only in case. product '[% existing_product FILTER html %]' only in case.
[% ELSIF error == "prod_must_define_defaultmilestone" %] [% ELSIF error == "product_must_define_defaultmilestone" %]
[% title = "Must define new default milestone" %] [% title = "Must define new default milestone" %]
[% admindocslinks = {'products.html' => 'Administering products', [% admindocslinks = {'products.html' => 'Administering products',
'milestones.html' => 'About Milestones'} %] 'milestones.html' => 'About Milestones'} %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment