]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 300684: missing_version_or_component error message is not translatable
authormozilla%colinogilvie.co.uk <>
Sun, 17 Jul 2005 17:34:20 +0000 (17:34 +0000)
committermozilla%colinogilvie.co.uk <>
Sun, 17 Jul 2005 17:34:20 +0000 (17:34 +0000)
Patch by A. Karl Kornel <karl@kornel.name>, r=jouni, a=justdave

globals.pl
template/en/default/global/user-error.html.tmpl

index 87d496c7bf8962075dffacc802421f01a90bc831..89e70e0a810758dc5399900b92281ed80a6b0a62 100644 (file)
@@ -506,17 +506,13 @@ sub CanEnterProductOrWarn {
     trick_taint($product);
 
     if (!defined $allow_new_bugs) {
-        ThrowUserError("missing_version_or_component", 
-                       { product      => $product,
-                         missing_item => 'Component' })
+        ThrowUserError("missing_component", { product => $product });
     } elsif (!$allow_new_bugs) {
         ThrowUserError("product_disabled", { product => $product});
     } elsif ($allow_new_bugs < 0) {
         ThrowUserError("entry_access_denied", { product => $product});
     } elsif (!$has_version) {
-        ThrowUserError("missing_version_or_component", 
-                       { product      => $product,
-                         missing_item => 'Version' });
+        ThrowUserError("missing_version", { product => $product });
     }
     return 1;
 }
index 800257ad99c012735fad78f25938b5496d7a222a..df551e228f83159832e5af98f621e9d09e202af1 100644 (file)
     [% title = "Missing Category" %]
     You did not specify a category for this series.
 
-  [% ELSIF error == "missing_version_or_component" %]
-    [% title = BLOCK %]Missing [% missing_item FILTER none %][% END %]
-    Sorry; there needs to be at least one [% missing_item FILTER lower %]
+  [% ELSIF error == "missing_component" %]
+    [% title = "Missing Component" %]
+    Sorry; there needs to be at least one component
     associated with the product <em>[% product FILTER html %]</em> in order to
     create a new [% terms.bug %].
     [% IF UserInGroup("editcomponents") %]
-      <a href="edit[% missing_item FILTER lower %]s.cgi?product=
-      [%- product FILTER url_quote %]">Create a new
-      [%+ missing_item FILTER lower %]</a>.
+      <a href="editcomponents.cgi?product=[% product FILTER url_quote %]">Create
+      a new component</a>.
     [% ELSE %]
        Please contact [% Param("maintainer") %], giving the name of
        the product in which you tried to create a new [% terms.bug %].
     [% title = "Missing Subcategory" %]
     You did not specify a subcategory for this series.
                 
+  [% ELSIF error == "missing_version" %]
+    [% title = "Missing Version" %]
+    Sorry; there needs to be at least one version
+    associated with the product <em>[% product FILTER html %]</em> in order to
+    create a new [% terms.bug %].
+    [% IF UserInGroup("editcomponents") %]
+      <a href="editversions.cgi?product=[% product FILTER url_quote %]">Create
+      a new version</a>.
+    [% ELSE %]
+       Please contact [% Param("maintainer") %], giving the name of
+       the product in which you tried to create a new [% terms.bug %].
+    [% END %]
+
   [% ELSIF error == "need_component" %]
     [% title = "Component Required" %]
     You must specify a component to help determine the new assignee of these