Something missing in my dictionary extension

Discussions about using 3rd party extension with OpenOffice.org

Something missing in my dictionary extension

Postby drsassafras » Sun Nov 02, 2014 4:26 am

I was wondering if someone could take a look at my files. I have tried to modify a dictionary extension file. I thought I had all the angles covered, but I am clearly doing something wrong.

It seems to install fine. It goes through the licensing acceptance. It shows up in the extension manager. But the words I have listed in the dic file do not get spell checked. Nor does the dictionary show up under the installed dictionaries.

I am sure its a small mistake I made somewhere when modifying the setting in the original files.

Thanks for any help you can offer.

Thanks
Attachments
herbal-sp1.zip
(33.87 KiB) Downloaded 38 times
LibreOffice 3 / NeoOffice 3.2 / OpenOffice 3 OSX10.6
drsassafras
 
Posts: 8
Joined: Mon Jun 27, 2011 9:41 pm

Re: Something missing in my dictionary extension

Postby Hagar Delest » Sun Nov 02, 2014 8:04 pm

You can't put custom values for the locale.
In dictionaries.xcu, the tag <prop oor:name="Locales" oor:type="oor:string-list"> must have a known language.
Change <value>herbal-All</value> to <value>en-US</value>
And it should be OK (seems to work but I tried only the word abronia).
NB: you can put several languages if it has to be active for different languages.

Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
AOO 4.1.6 on Xubuntu 18.10 and 4.1.5 on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28383
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Something missing in my dictionary extension

Postby drsassafras » Tue Nov 04, 2014 12:58 am

Thanks.

I made the changes you suggested. Its working now with every english localization except for United States, Namibia and Malawi.

If I could just get the United States working that would be great.

Can you see what I am doing wrong? I fooled with the settings for 4 hrs before I gave up.

Thanks so much for your help.
Attachments
herbal-sp101.oxt.zip
(20.26 KiB) Downloaded 49 times
LibreOffice 3 / NeoOffice 3.2 / OpenOffice 3 OSX10.6
drsassafras
 
Posts: 8
Joined: Mon Jun 27, 2011 9:41 pm

Re: Something missing in my dictionary extension

Postby OlivierR » Tue Nov 04, 2014 6:05 pm

I tried the extension and it doesn’t work at all for any locale.

I can’t be sure, but imho, it’s not the good way to improve your dictionary.
If a dictionary is already assigned to a locale, assigning another dictionary to this locale may not have the expected result. I tried this many years ago and, as far as I remember, it worked sometimes and most of the times it didn’t work.

So, I think the best way is to take the English/American/whatever dictionary, add the words you need in it, and repackage the extension with the same identifier to override the existing extension bundled in LibreOffice.

Another solution:
Assign your dictionary to Latin, for instance. Create a character style with Latin as language. Set herbal words to this character style.
LibreOffice 5.2Windows 7
OlivierR
 
Posts: 31
Joined: Sun Jul 25, 2010 3:13 pm

Re: Something missing in my dictionary extension

Postby drsassafras » Tue Nov 04, 2014 7:35 pm

There must be a better way to do this.

If I was able to update and replace the built in english dictionary, then what would happen when Libreoffice / OpenOffice was updated?

Would the dictionary I installed stay intact, or would it get replaced with the new dictionary? In case 1. Any updates to the language in the update would not be installed on that persons computer. In case 2, the dictionary would be removed and would no longer work.

This might be a workaround for broken dictionary functionality in OpenOffice, but it sounds like its only a workaround. A much better way of dealign with this would be for reliable dictionary extension.

So I guess the question is, is this OpenOffice functionality broken? Or is my code poor?
LibreOffice 3 / NeoOffice 3.2 / OpenOffice 3 OSX10.6
drsassafras
 
Posts: 8
Joined: Mon Jun 27, 2011 9:41 pm

Re: Something missing in my dictionary extension

Postby RoryOF » Tue Nov 04, 2014 7:50 pm

The dictionaries used in OpenOffice are Hunspell dictionaries. I suggest you consult the Hunspell site for detailed information about formats etc.
Hunspell site
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28394
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Something missing in my dictionary extension

Postby Hagar Delest » Tue Nov 04, 2014 11:50 pm

For those trying to install: beware, the extension is inside the herbal-sp101.oxt.zip, so don't rename the file to remove the .zip! You've to extract the extension inside.

I tried it on my Xubuntu system (my previous test was on AOO 4.1.0 on Windows 8.0) and it works fine also, including en-US and EN-UK.
Note that I think that there is no issue with several dics using the same locales. Else, it would be a real trouble for all the dic extensions, it would mean that you can't install more than one dic per locale.
AOO 4.1.6 on Xubuntu 18.10 and 4.1.5 on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28383
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Something missing in my dictionary extension

Postby drsassafras » Wed Nov 05, 2014 12:02 am

Thanks Hagar

Glad its working on your system. Perhaps I should not worry about it to much. Yes, thanks for pointing out that I zipped it. The forum would not let me post a oxt directly.

It would be nice if I could get the en-US working on my system though. I will try reading through all the hustle documentation and see if it sheds any light.
LibreOffice 3 / NeoOffice 3.2 / OpenOffice 3 OSX10.6
drsassafras
 
Posts: 8
Joined: Mon Jun 27, 2011 9:41 pm

Re: Something missing in my dictionary extension

Postby Hagar Delest » Wed Nov 05, 2014 12:19 am

Can you upload a sample file with paragraphs with different language settings?
AOO 4.1.6 on Xubuntu 18.10 and 4.1.5 on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28383
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Something missing in my dictionary extension

Postby drsassafras » Wed Nov 05, 2014 12:26 am

I would be a happy to, but what do you mean by sample file, and what do you mean by paragraphs? I cant find any reference to paragraphs in the hunt spell documentation. When you say sample do you mean the dictionary with less words in it?
LibreOffice 3 / NeoOffice 3.2 / OpenOffice 3 OSX10.6
drsassafras
 
Posts: 8
Joined: Mon Jun 27, 2011 9:41 pm

Re: Something missing in my dictionary extension

Postby Hagar Delest » Wed Nov 05, 2014 12:29 am

Upload a sample .odt with several times the same paragraph with English words and words from your dictionary. Apply en-US language on a paragraph, en-UK on another, ... to show what works and what doesn't. We will check if it works or not on our systems.
AOO 4.1.6 on Xubuntu 18.10 and 4.1.5 on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28383
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Something missing in my dictionary extension

Postby drsassafras » Wed Nov 05, 2014 4:06 am

I have three files here.

one us only, one uk only and one with both.

The uk works on my system and the uk portion of the both works. No us.

Us words:
abrotanum
abrus
absinthium
acaciaricta
acaciella
acaena
acalypha
acamptopappus
acanthephippium
acanthocereus

UK words:
abarema
abelia
abeliophyllum
abelmoschus
abertii
abies
abobra
abri
abroma
abronia

Is this what you meant?

OS X 10.10 Libreoffice 4.3 OpenOffice 4.1
Attachments
enbg.zip
(24.21 KiB) Downloaded 38 times
enus.zip
(24.32 KiB) Downloaded 37 times
both.zip
(24.86 KiB) Downloaded 40 times
LibreOffice 3 / NeoOffice 3.2 / OpenOffice 3 OSX10.6
drsassafras
 
Posts: 8
Joined: Mon Jun 27, 2011 9:41 pm

Re: Something missing in my dictionary extension

Postby OlivierR » Wed Nov 05, 2014 10:55 am

My bad. I thought the oxt was just renamed zip, as usual. (Actually, oxt is already zip.) I should have been more careful.

OK, then, the extension with all locales “en” works on my system. The extension “en-US” works also.

Would the dictionary I installed stay intact, or would it get replaced with the new dictionary? In case 1. Any updates to the language in the update would not be installed on that persons computer. In case 2, the dictionary would be removed and would no longer work.

If the extension is installed in the user profile, it will be replace by the one bundled in LO/OO only if its version number is lower than version extension bundled in LO/OO.
If the extension is shared for several users, I don’t know, I never tried. But I assume it will work the same way.
LibreOffice 5.2Windows 7
OlivierR
 
Posts: 31
Joined: Sun Jul 25, 2010 3:13 pm

Re: Something missing in my dictionary extension

Postby drsassafras » Wed Nov 05, 2014 3:39 pm

I just checked if it works with en on my system. Does not work at all.
LibreOffice 3 / NeoOffice 3.2 / OpenOffice 3 OSX10.6
drsassafras
 
Posts: 8
Joined: Mon Jun 27, 2011 9:41 pm

Re: Something missing in my dictionary extension

Postby Hagar Delest » Wed Nov 05, 2014 10:08 pm

By attaching a file, I meant a text file with different languages applied. See my attachment and check if a column has more red wavy lines than the other.
You can also try to reset your OpenOffice user profile. Then reinstall your extension (but not one with your extension embedded inside the extension!).
Test.odt
(10 KiB) Downloaded 68 times
AOO 4.1.6 on Xubuntu 18.10 and 4.1.5 on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28383
Joined: Sun Oct 07, 2007 9:07 pm
Location: France


Return to Extensions

Who is online

Users browsing this forum: No registered users and 1 guest