Localizing extension descriptions before Gecko 1.9 - localization

I'm trying to build an extension for Firefox with localized name basing on information from https://developer.mozilla.org/en/Localizing_extension_descriptions (Localizing before Gecko 1.9), but it doesn't work. The error in the browser's Javascript console is:
Błąd: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIRDFService.GetLiteral]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox%201.5/components/nsExtensionManager.js :: EM_L :: line 225" data: no]
Plik źródłowy: file:///C:/Program%20Files/Mozilla%20Firefox%201.5/components/nsExtensionManager.js
Wiersz: 225
My extension files hierarchy is:
gemgecko.xpi:
/install.rdf
/components/gemgecko.dll
/defaults/preferences/prefs.js
/chrome.manifest
/chrome/locale/pl/install.properties
/chrome/locale/en/install.properties
/defaults/preferences/prefs.js:
pref("extensions.gemgecko#gemius.pl.name", "chrome://gemgecko/locale/en/install.properties");
/chrome/locale/en/install.properties:
extensions.gemgecko#gemius.pl.name=gemiusAudience study
/chrome/locale/pl/install.properties:
extensions.gemgecko#gemius.pl.name=Badanie Megapanel PBI/Gemius
Can anybody help me to find an error in my extension?
Edit
I'm adding install manifest...
/install.rdf:
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>gemgecko#gemius.pl</em:id>
<em:version>2.01</em:version>
<em:name>nazwa</em:name>
<em:creator>tworca</em:creator>
<em:description>opis</em:description>
<em:homepageURL>http://www.test.pl</em:homepageURL>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- firefox -->
<em:minVersion>1.5.0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</RDF>
I've tested it on Firefox 1.5 and 3.6. On 3.6 everything seems to work OK, but on 1.5 doesn't - the extension manager displays the extension's name from install.rdf not from chrome://gemgecko/locale/install.properties...

chrome://gemgecko/locale/en/install.properties looks to be wrong to me, the /en/ is not part of the chrome: URL, it is substituted when the chrome: URL is converted.
EDIT:
I don't see any chrome registration entries in your chrome.manifest. They should look something like this:
locale gemgecko pl chrome/locale/pl
locale gemgecko en chrome/locale/en

Related

How to get over this SXXP0003 parser error?

I have an XML document which prolog looks like this :
<?xml version="1.0" encoding="utf-8" standalone="no"?>
...
This XML document is valid against the external DTD with the exact same prolog :
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE root [
...
]>
When I transform using Saxon (latest release):
$:/opt/tomcat/webapps/ROOT/$ java net.sf.saxon.Transform -s:pandora.xml -xsl:pandora.xsl -o:pandora.html
Error on line 1 column 53 of pandora.dtd:
SXXP0003 Error reported by XML parser: No more pseudo attributes are allowed.: No more
pseudo attributes are allowed.
org.xml.sax.SAXParseException; systemId: file:/opt/tomcat/webapps/ROOT/fred/pandora/dtd/pandora.dtd; lineNumber: 1; columnNumber: 53; No more pseudo attributes are allowed.
I am newbie and my research about this has only led to listing the pseudo-attributes in the order they actually are. If anybody have a clue there.
Edit
I have made other transformations using the same process with other projects without any problem. The only difference is in this problematic application, I make use of another namespace exsl to use a function not provided with version 1.0 (node-set). Everything else is similar.
For an external subset of the DTD the specification defines the format in https://www.w3.org/TR/xml/#NT-extSubset as
extSubset ::= TextDecl? extSubsetDecl
extSubsetDecl ::= ( markupdecl | conditionalSect | DeclSep)*
, for the "Text Declaration" in https://www.w3.org/TR/xml/#sec-TextDecl as TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' so a standalone "pseudo" attribute is indeed not allowed there.
So make sure that your external DTD file does not repeat <!DOCTYPE root, it is just meant to contain declaration of markup, e.g. elements, attributes.
The error message you get comes anyway just from the XML parser and is not transformation/XSLT related.

SAXParseException when using restassured

I am trying to verify a XML response with rest-assured like this:
.then().body("some.xml.path", is("abc"));
However, what I get is a SAXParseException:
DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.]
Response starts like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.021/cXML.dtd">
<cXML ...
Why am I getting this exception? What should I change?
I am using version 3.2.0 of rest-assured.
A similar question has been answered here. In short, the answer describes to use disableLoadingOfExternalDtd() to have RestAssured ignore the Document Type Definition in your XML.
Normally, the DTD would describe (using the external definition) the structural layout of the element defined as cXML.

Allure reporting: if suite name contains dot, suite name in reporting is truncated

If suite name contains dot, suite name in reporting is truncated.
The XML seems to have proper name as below
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:test-suite xmlns:ns2="urn:model.allure.qatools.yandex.ru" start="1424101948829" stop="1424102027462" version="1.4.4">
<name>SampleSuite.xml</name>
<test-cases>
<test-case start="1424101949080" stop="1424101952336" status="passed">
....
...
But html report(generated using allure.bat generate allure-results -v 1.4.0) is truncated as below:
Looks like not a bug. There happens extracting simple class name out of fully qualified one. Usually suite names look like "my.company.SimpleTest". In that case current behavior is more preferred.

composite component ending up in wrong directory with jboss jsf tools and m2eclipse?

When using JBOSS Tools, M2E and M2E-WTP creating a new composite component wants to put the newly created component in the wrong directory. It also looks for components in the wrong directory.
It should be putting it in the directory:
src/main/webapp/resources/components/group-name/tagname.xhtml
but instead it is looking for it (and a quick fix creates file) in:
target/m2e-wtp/web-resources/resources/components/group-name/tagname.xhtml
Here are the versions I am using:
JBoss Tools RichFaces for Eclipse Version:
3.2.1.v20110730-1214-H169-Final
M2E - Maven Integration for Eclipse
Version: 1.0.0.20110607-2117
Maven Integration for WTP
Version: 0.13.1.20110728-1800
Update:
Seems to pick the first path in .settings/org.eclipse.wst.common.component file. Changing the non m2e to be first seems to make it want to put it in the right place.
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="hcbb">
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<property name="context-root" value="hcbb"/>
<property name="java-output-path" value="/hcbb/target/classes"/>
</wb-module>
</project-modules>
However, it is still complaining about missing or invalid attributes and not doing auto completion on the custom components.. Not sure if JSF Tools even does that though.
I believe this issue is fixed in later release of joss tools 3.3.x.
If not please open bug and we'll look at it.

PartCover browser not opening code files

We're generating PartCover reports via the command line tool along with our CruiseControl.Net unit tests. This generates an xml file that displays the results nicely on the cruisecontrol dashboard. The xslt transforms that are included only show you the percentage of coverage in an individual class. We want to know exactly what lines are not being covered. The problem ist when we open the report in the PartCover browser and double click a method it doesn't show us our cs files. I know the PartCover browser is capable of showing you the files because of the following.
Here's a screenshot of PartCover browser with the lines of code showing: http://kjkpub.s3.amazonaws.com/blog/img/partcover-browse.png.
The information looks like it should be available to the browser because the report contains this:
<Method name="get_DeviceType" sig="Cathexis.IDBlue.DeviceType ()" bodysize="19" flags="0" iflags="0">
<pt visit="2" pos="0" len="1" fid="82" sl="35" sc="13" el="35" ec="14" />
<pt visit="2" pos="1" len="4" fid="82" sl="36" sc="17" el="36" ec="39" />
<pt visit="2" pos="5" len="2" fid="82" sl="37" sc="13" el="37" ec="14" />
</Method>
and this:
<File id="66" url="D:\sandbox\idblue\idblue\trunk\software\code\driver\dotnet\Common\AsyncEventQueue.cs" />
All I want to be able to do is view what lines of code are not being covered in my test cases without having to figure out what the xml above is trying to tell me.
Thanks to anyone in advance who replies.
I figured out why the cs files were not displaying. The paths were incorrect in the xml file because our test project was being built on a different machine than the one partcover was on. (partcover must generate the .cs file paths from pdb files maybe?) Once I search and replaced the file switching the base directory of our subversion location to the one on the other machine all was well.

Resources