Difficulty updating my *dictionary* extension

Hello all !

I have been regularly updating my spellchecker extension, but I am now stuck with the error message " Legacy extensions are no longer supported in Firefox".

This extension is using Hunspell (I suppose this worked because it is part of Firefox) but I usually only provide dictionary and affix files, I have never been involved in development or SDK or XUL/XPCOM - and do not know what these acronyms stand for, almost. The only technical bit was to modify and RDF file, and that was minimal.

How am I supposed to proceed now ?

Thanks for help!
J-J

You probably just need to use the new manifest format.

Thanks a lot Jorge, this looks very promising…

Unfortunately there is no example file for such a trivial job as dictionary ;-(
My 1st attempt at a manifest.json file is rejected and the two errors messages are difficult for me:

“/icons” is an invalid additional property

Error: Your JSON file could not be parsed.

The manifest contains a dictionary but no id property.

Error: A dictionary was found in the manifest, but there was no id set.

manifest.json

here is my manifest.json, the zipped xpi file contains manifest.json, the two icon files specified and the dictionaries directory complete.

{

“manifest_version”: 2,
“name”: “Bambara/Bamanankan”,
“description”: “Bambara spell-checker”,
“author”: “Jean-Jacques Méric”,
“homepage_url”: “http://cormand.huma-num.fr”,
“icons”: {
“48”: “icon.png”,
“96”: “icon@2x.png”
},
“version”: “2.4”,
“dictionaries”: {
“bm-ML”: “dictionaries/bm-ML.dic”
}

}

What if you remove the icons part?

I tried that - let’s work on difficulties one by one !
Result : I still get the error message on dictionary

The manifest contains a dictionary but no id property.

Error: A dictionary was found in the manifest, but there was no id set.

It is true that in the old model, install.rdf file, there was an id :
<em:id>bm-ML@dictionaries.addons.mozilla.org</em:id>

But the documentation does not explain anything about this id and no id tag is listed in documentation.

Same for icons : my syntax is exactly as specified in the documentation (and files and directories have been aligned accordingly).

I managed to solve the dictionary problem. But not the icons yet.

It turns out that the error message is misleading : it’s not looking for a dictionary ID, it’s expecting an add-on ID. Apparently this optional browser_specific_setting IS NEEDED for dictionary add-ons. Without any better indication I used the ID that existed in the now deprecated install.rdf file.

I am still struggling with the “icons” key, even though my code is a copy/paste of the documentation:

{

“manifest_version”: 2,
“name”: “Bambara/Bamanankan”,
“description”: “Bambara spell-checker”,
“author”: “Jean-Jacques Méric”,
“homepage_url”: “http://cormand.huma-num.fr”,
“icons”: {
“48”: “icon.png”,
“96”: “icon@2x.png”
},
“version”: “2.4”,
“browser_specific_settings”: {
“gecko”: {
“id”: "bm-ML@dictionaries.addons.mozilla.org",
“strict_min_version”: “42.0”
}
},
“dictionaries”: {
“bm-ML”: “dictionaries/bm-ML.dic”
}
}

Are you still seeing an error message, or are the icons not working? If you see an error, is that when you upload it or when you try to test it in Firefox?

Hi Jorge, thanks for support. I got rid of the icon in the end. It turns out that Firefox provides an icon, the flag for Mali (ML). Let’s says it’s OK for now, all works now. Bambara is not spoken only in Mali, but the official name is bm-ML which stands for Bambara Mali. Also a flag is a little bit too much a nationalist symbol in my view, but I’m probably the only one to care…

In response to your question, the error I was talking about is when I upload the add-on upgrade. I did have another but similar type of error message when trying it in Firefox.

JJ
----- Mail original -----