mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-14 05:44:20 +00:00
Move some error messages from DTD into properties so they can be translated better
This commit is contained in:
parent
09d48daf4d
commit
05cccb1ed4
@ -5,7 +5,7 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<em:id>cckwizard@extensions.mozilla.org</em:id>
|
||||
<em:name>CCK Wizard</em:name>
|
||||
<em:version>1.0.2</em:version>
|
||||
<em:version>1.0.3</em:version>
|
||||
<em:description></em:description>
|
||||
<em:creator>Michael Kaply</em:creator>
|
||||
<em:homepageURL>http://www.mozilla.org/projects/cck/firefox</em:homepageURL>
|
||||
|
@ -34,12 +34,9 @@
|
||||
|
||||
|
||||
<!ENTITY id.label "Unique ID:">
|
||||
<!ENTITY id.error "Unique ID is required and is of the format extensionname@organization.tld. It can only contain the letters a-z, the numbers 0-9, and the following symbols: . _ - ">
|
||||
<!ENTITY id.format "Format: companyname-cck@extensions.domainname.tld">
|
||||
<!ENTITY name.label "Name:">
|
||||
<!ENTITY name.error "Name is required">
|
||||
<!ENTITY version.label "Version:">
|
||||
<!ENTITY version.error "Version is required">
|
||||
<!ENTITY description.label "Description:">
|
||||
<!ENTITY creator.label "Creator:">
|
||||
<!ENTITY homepageURL.label "Homepage URL:">
|
||||
@ -57,7 +54,6 @@
|
||||
|
||||
<!ENTITY customizePartOne.label "Customize the Browser - Part One">
|
||||
|
||||
<!ENTITY orgName.error "Company Identifier is required and cannot contain any spaces.">
|
||||
<!ENTITY orgName.description "The Company Identifier is included as part of the browser's user agent string which appears when you open the Help menu and select About Mozilla Firefox. It is required.">
|
||||
<!ENTITY orgName.label "Enter Your Company Identifier (up to 10 characters; no spaces):">
|
||||
<!ENTITY orgName.caption "Company Identifier">
|
||||
@ -114,9 +110,6 @@
|
||||
<!ENTITY engineIcon.label "Image File:">
|
||||
|
||||
<!ENTITY file.label "File:">
|
||||
<!ENTITY icon.label "Icon:">
|
||||
|
||||
<!ENTITY bmFolder.error "You must specify a folder name">
|
||||
|
||||
<!ENTITY folderTitle.label "Folder Title:">
|
||||
|
||||
|
@ -12,3 +12,11 @@ chooseImage=Choose Image...
|
||||
createDir=The following directory does not exist: %S\nWould you like to create it?
|
||||
createDirError=Could not create folder: %S\nMake sure you have access to create the folder.
|
||||
extensions.cckwizard@extensions.mozilla.org.description=XUL Wizard to create CCK Packages
|
||||
id.error=Unique ID is required and is of the format extensionname@organization.tld. It can only contain the letters a-z, the numbers 0-9, and the following symbols: . _ -
|
||||
name.error=Name is required
|
||||
version.error=Version is required
|
||||
orgName.error=Company Identifier is required and cannot contain any spaces.
|
||||
BookmarkFolder1.error=You must specify a folder name
|
||||
ToolbarFolder1.error=You must specify a folder name
|
||||
|
||||
|
||||
|
@ -2384,18 +2384,18 @@ function Validate(field, message)
|
||||
{
|
||||
var gIDTest = /^(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}|[a-z0-9-\._]*\@[a-z0-9-\._]+)$/i;
|
||||
|
||||
for (var i=0; i < arguments.length; i+=2) {
|
||||
for (var i=0; i < arguments.length; i++) {
|
||||
/* special case ID */
|
||||
if (document.getElementById(arguments[i]).id == "id") {
|
||||
if (!gIDTest.test(document.getElementById(arguments[i]).value)) {
|
||||
var bundle = document.getElementById("bundle_cckwizard");
|
||||
gPromptService.alert(window, bundle.getString("windowTitle"), arguments[i+1]);
|
||||
gPromptService.alert(window, bundle.getString("windowTitle"), bundle.getString(arguments[i] + ".error"));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (document.getElementById(arguments[i]).value == '') {
|
||||
var bundle = document.getElementById("bundle_cckwizard");
|
||||
gPromptService.alert(window, bundle.getString("windowTitle"), arguments[i+1]);
|
||||
gPromptService.alert(window, bundle.getString("windowTitle"), bundle.getString(arguments[i] + ".error"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2405,11 +2405,11 @@ function Validate(field, message)
|
||||
|
||||
function ValidateNoSpace(field, message)
|
||||
{
|
||||
for (var i=0; i < arguments.length; i+=2) {
|
||||
for (var i=0; i < arguments.length; i++) {
|
||||
var str = document.getElementById(arguments[i]).value;
|
||||
if ((str == '') || (str.match(" "))) {
|
||||
var bundle = document.getElementById("bundle_cckwizard");
|
||||
gPromptService.alert(window, bundle.getString("windowTitle"), arguments[i+1]);
|
||||
gPromptService.alert(window, bundle.getString("windowTitle"), bundle.getString(arguments[i] + ".error"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@
|
||||
|
||||
<wizardpage label="&customizeExt.label;" description="&customizeExt.description;"
|
||||
onpageshow="initimage('iconURL','icon');"
|
||||
onpageadvanced="return (ValidateFile('iconURL') && Validate('id','&id.error;','name','&name.error;','version','&version.error;'));">
|
||||
onpageadvanced="return (ValidateFile('iconURL') && Validate('id','name','version'));">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
@ -199,7 +199,7 @@
|
||||
</grid>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage label="&customizePartOne.label;" onpageadvanced="return ValidateNoSpace('OrganizationName','&orgName.error;');">
|
||||
<wizardpage label="&customizePartOne.label;" onpageadvanced="return ValidateNoSpace('OrganizationName');">
|
||||
<groupbox>
|
||||
<caption label="&orgName.caption;"/>
|
||||
<description>&orgName.description;</description>
|
||||
@ -320,7 +320,7 @@
|
||||
|
||||
|
||||
|
||||
<wizardpage id="tbFolder" label="&customizeToolbarOne.label;" onpageadvanced="if (document.getElementById('tbFolder.bookmarkList').getRowCount() > 0) return Validate('ToolbarFolder1','&bmFolder.error;');">
|
||||
<wizardpage id="tbFolder" label="&customizeToolbarOne.label;" onpageadvanced="if (document.getElementById('tbFolder.bookmarkList').getRowCount() > 0) return Validate('ToolbarFolder1');">
|
||||
<groupbox>
|
||||
<caption label="&addToolbarFolder.caption;"/>
|
||||
<description>&addToolbarFolder.description;</description>
|
||||
@ -349,7 +349,7 @@
|
||||
</groupbox>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="bmFolder" label="&customizeBookmarksOne.label;" onpageadvanced="if (document.getElementById('bmFolder.bookmarkList').getRowCount() > 0) return Validate('BookmarkFolder1','&bmFolder.error;');">
|
||||
<wizardpage id="bmFolder" label="&customizeBookmarksOne.label;" onpageadvanced="if (document.getElementById('bmFolder.bookmarkList').getRowCount() > 0) return Validate('BookmarkFolder1');">
|
||||
<groupbox>
|
||||
<caption label="&addBookmarkFolder.caption;"/>
|
||||
<description>&addBookmarkFolder.description;</description>
|
||||
|
Loading…
x
Reference in New Issue
Block a user