Problems starting Gramps 3.3 with Norwegian locale...

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems starting Gramps 3.3 with Norwegian locale...

Espen Berg-2
Hi,
I guess I have managed to mess up the Norwegian translation file in
some way since I cannot start Gramps using Norwegian locale. If I try
any other language it works as it should. This is what I get from the
last version (branches/maintenance/gramps32):


espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
LANGUAGE=nb_NO python src/gramps.py
Locale dir does not exist at/usr/local/share/locale
Running ./configure --prefix=YourPrefixDir might fix the problem
Traceback (most recent call last):
  File "src/gramps.py", line 68, in <module>
    gettext.install(TransUtils.LOCALEDOMAIN, localedir=None,
unicode=1) #None is sys default locale
  File "/usr/lib/python2.6/gettext.py", line 508, in install
    t = translation(domain, localedir, fallback=True, codeset=codeset)
  File "/usr/lib/python2.6/gettext.py", line 493, in translation
    t = _translations.setdefault(key, class_(open(mofile, 'rb')))
  File "/usr/lib/python2.6/gettext.py", line 180, in __init__
    self._parse(fp)
  File "/usr/lib/python2.6/gettext.py", line 314, in _parse
    plural = v[1].split('plural=')[1]
IndexError: list index out of range
espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$


Is there any way I can trace down where the problem is?


Espen

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems starting Gramps 3.3 with Norwegian locale...

Benny Malengier
Ok,

This is the defenition of how plurals must be handled that crashes on parsing the file at startup.
See samples link here:
http://gramps-project.org/wiki/index.php?title=Translating_GRAMPS#Plural_forms

benny


2011/6/12 Espen Berg <[hidden email]>
Hi,
I guess I have managed to mess up the Norwegian translation file in
some way since I cannot start Gramps using Norwegian locale. If I try
any other language it works as it should. This is what I get from the
last version (branches/maintenance/gramps32):


espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
LANGUAGE=nb_NO python src/gramps.py
Locale dir does not exist at/usr/local/share/locale
Running ./configure --prefix=YourPrefixDir might fix the problem
Traceback (most recent call last):
 File "src/gramps.py", line 68, in <module>
   gettext.install(TransUtils.LOCALEDOMAIN, localedir=None,
unicode=1) #None is sys default locale
 File "/usr/lib/python2.6/gettext.py", line 508, in install
   t = translation(domain, localedir, fallback=True, codeset=codeset)
 File "/usr/lib/python2.6/gettext.py", line 493, in translation
   t = _translations.setdefault(key, class_(open(mofile, 'rb')))
 File "/usr/lib/python2.6/gettext.py", line 180, in __init__
   self._parse(fp)
 File "/usr/lib/python2.6/gettext.py", line 314, in _parse
   plural = v[1].split('plural=')[1]
IndexError: list index out of range
espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$


Is there any way I can trace down where the problem is?


Espen

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems starting Gramps 3.3 with Norwegian locale...

jerome
In reply to this post by Espen Berg-2
Hi,


Not certain why you are running gramps with command line (launcher
script does not work ? do you want to use two versions ?), but you can
try to use: LOCALEDIR=/usr/local/share/locale
GRAMPSI18N=/usr/local/share/locale LANGUAGE=nb_NO python
/Source/gramps/branches/maintenance/gramps32/src/gramps.py

If nb_NO is your default locale, then I suppose you can ignore LANGUAGE.
Maybe to set LOCALEDIR might generate some unwanted effect, GRAMPSI18N
variable should be enough?

> Locale dir does not exist at/usr/local/share/locale
> Running ./configure --prefix=YourPrefixDir might fix the problem

But you also need to have compiled translations.
This means that these translations are for /usr/local/bin/gramps.sh (or
/usr/local/share/gramps.py)...

Else, just install this version under your /home directory!

espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
./configure --prefix=~/gramps32 #/home/...
make
make install (do not need admin rights, under your home)

espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps33$
./configure --prefix=~/gramps33 #/home/...
make
make install (do not need admin rights, under your home)


Jérôme




Espen Berg a écrit :

> Hi,
> I guess I have managed to mess up the Norwegian translation file in
> some way since I cannot start Gramps using Norwegian locale. If I try
> any other language it works as it should. This is what I get from the
> last version (branches/maintenance/gramps32):
>
>
> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
> LANGUAGE=nb_NO python src/gramps.py
> Locale dir does not exist at/usr/local/share/locale
> Running ./configure --prefix=YourPrefixDir might fix the problem
> Traceback (most recent call last):
>   File "src/gramps.py", line 68, in <module>
>     gettext.install(TransUtils.LOCALEDOMAIN, localedir=None,
> unicode=1) #None is sys default locale
>   File "/usr/lib/python2.6/gettext.py", line 508, in install
>     t = translation(domain, localedir, fallback=True, codeset=codeset)
>   File "/usr/lib/python2.6/gettext.py", line 493, in translation
>     t = _translations.setdefault(key, class_(open(mofile, 'rb')))
>   File "/usr/lib/python2.6/gettext.py", line 180, in __init__
>     self._parse(fp)
>   File "/usr/lib/python2.6/gettext.py", line 314, in _parse
>     plural = v[1].split('plural=')[1]
> IndexError: list index out of range
> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
>
>
> Is there any way I can trace down where the problem is?
>
>
> Espen
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems starting Gramps 3.3 with Norwegian locale...

John Ralls-2

On Jun 13, 2011, at 12:17 AM, Jérôme wrote:

> Hi,
>
>
> Not certain why you are running gramps with command line (launcher
> script does not work ? do you want to use two versions ?), but you can
> try to use: LOCALEDIR=/usr/local/share/locale
> GRAMPSI18N=/usr/local/share/locale LANGUAGE=nb_NO python
> /Source/gramps/branches/maintenance/gramps32/src/gramps.py
>
> If nb_NO is your default locale, then I suppose you can ignore LANGUAGE.
> Maybe to set LOCALEDIR might generate some unwanted effect, GRAMPSI18N
> variable should be enough?
>
>> Locale dir does not exist at/usr/local/share/locale
>> Running ./configure --prefix=YourPrefixDir might fix the problem
>
> But you also need to have compiled translations.
> This means that these translations are for /usr/local/bin/gramps.sh (or
> /usr/local/share/gramps.py)...
>
> Else, just install this version under your /home directory!
>
> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
> ./configure --prefix=~/gramps32 #/home/...
> make
> make install (do not need admin rights, under your home)
>
> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps33$
> ./configure --prefix=~/gramps33 #/home/...
> make
> make install (do not need admin rights, under your home)

LANG, not LANGUAGE, on everything except MacOSX. LANGUAGE gets set to LANG in TransUtils.py, remember?

Regards,
John Ralls


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems starting Gramps 3.3 with Norwegian locale...

Espen Berg-2
In reply to this post by Benny Malengier
Hi devs,
I found the reason why Gramps 3.3 does not start using Norwegian
translation. The reason is due to an error in the header of nb.po. I
have revised nb.po and Gramps starts like anything again. I hope there
will be an updated version of Gramps 3.3 soon so that Norwegians that
download Gramps 3.3 can have a working version.

I am very sorry for introducing this typo in the language file.


Cheers

Espen


On Mon, Jun 13, 2011 at 9:02 AM, Benny Malengier
<[hidden email]> wrote:

> Ok,
>
> This is the defenition of how plurals must be handled that crashes on
> parsing the file at startup.
> See samples link here:
> http://gramps-project.org/wiki/index.php?title=Translating_GRAMPS#Plural_forms
>
> benny
>
>
> 2011/6/12 Espen Berg <[hidden email]>
>>
>> Hi,
>> I guess I have managed to mess up the Norwegian translation file in
>> some way since I cannot start Gramps using Norwegian locale. If I try
>> any other language it works as it should. This is what I get from the
>> last version (branches/maintenance/gramps32):
>>
>>
>> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
>> LANGUAGE=nb_NO python src/gramps.py
>> Locale dir does not exist at/usr/local/share/locale
>> Running ./configure --prefix=YourPrefixDir might fix the problem
>> Traceback (most recent call last):
>>  File "src/gramps.py", line 68, in <module>
>>    gettext.install(TransUtils.LOCALEDOMAIN, localedir=None,
>> unicode=1) #None is sys default locale
>>  File "/usr/lib/python2.6/gettext.py", line 508, in install
>>    t = translation(domain, localedir, fallback=True, codeset=codeset)
>>  File "/usr/lib/python2.6/gettext.py", line 493, in translation
>>    t = _translations.setdefault(key, class_(open(mofile, 'rb')))
>>  File "/usr/lib/python2.6/gettext.py", line 180, in __init__
>>    self._parse(fp)
>>  File "/usr/lib/python2.6/gettext.py", line 314, in _parse
>>    plural = v[1].split('plural=')[1]
>> IndexError: list index out of range
>> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
>>
>>
>> Is there any way I can trace down where the problem is?
>>
>>
>> Espen
>>
>>
>> ------------------------------------------------------------------------------
>> EditLive Enterprise is the world's most technically advanced content
>> authoring tool. Experience the power of Track Changes, Inline Image
>> Editing and ensure content is compliant with Accessibility Checking.
>> http://p.sf.net/sfu/ephox-dev2dev
>> _______________________________________________
>> Gramps-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>
>

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems starting Gramps 3.3 with Norwegian locale...

Jay Treacy
On Thu, Jun 16, 2011 at 06:30:39PM +0200, Espen Berg wrote:
> Hi devs,
> I found the reason why Gramps 3.3 does not start using Norwegian
> translation. The reason is due to an error in the header of nb.po. I
> have revised nb.po and Gramps starts like anything again. I hope there
> will be an updated version of Gramps 3.3 soon so that Norwegians that
> download Gramps 3.3 can have a working version.

Can you give the patch here? I have not uploaded the debian package of
3.3 yet and would like to include it.

--
James (Jay) Treacy
[hidden email]

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems starting Gramps 3.3 with Norwegian locale...

Espen Berg-2
Hi,
hope the attached patch works.


Cheers

Espen


On Thu, Jun 16, 2011 at 6:56 PM, James A. Treacy <[hidden email]> wrote:

> On Thu, Jun 16, 2011 at 06:30:39PM +0200, Espen Berg wrote:
>> Hi devs,
>> I found the reason why Gramps 3.3 does not start using Norwegian
>> translation. The reason is due to an error in the header of nb.po. I
>> have revised nb.po and Gramps starts like anything again. I hope there
>> will be an updated version of Gramps 3.3 soon so that Norwegians that
>> download Gramps 3.3 can have a working version.
>
> Can you give the patch here? I have not uploaded the debian package of
> 3.3 yet and would like to include it.
>
> --
> James (Jay) Treacy
> [hidden email]
>

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel

nb.patch (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems starting Gramps 3.3 with Norwegian locale...

jerome
In reply to this post by Espen Berg-2
Maybe that's why this crashes only by using plural form.

ex: we are able to run advanced textual and ancestors reports in
Norwegian (both)!


Jérôme


Espen Berg a écrit :

> Hi devs,
> I found the reason why Gramps 3.3 does not start using Norwegian
> translation. The reason is due to an error in the header of nb.po. I
> have revised nb.po and Gramps starts like anything again. I hope there
> will be an updated version of Gramps 3.3 soon so that Norwegians that
> download Gramps 3.3 can have a working version.
>
> I am very sorry for introducing this typo in the language file.
>
>
> Cheers
>
> Espen
>
>
> On Mon, Jun 13, 2011 at 9:02 AM, Benny Malengier
> <[hidden email]> wrote:
>> Ok,
>>
>> This is the defenition of how plurals must be handled that crashes on
>> parsing the file at startup.
>> See samples link here:
>> http://gramps-project.org/wiki/index.php?title=Translating_GRAMPS#Plural_forms
>>
>> benny
>>
>>
>> 2011/6/12 Espen Berg <[hidden email]>
>>> Hi,
>>> I guess I have managed to mess up the Norwegian translation file in
>>> some way since I cannot start Gramps using Norwegian locale. If I try
>>> any other language it works as it should. This is what I get from the
>>> last version (branches/maintenance/gramps32):
>>>
>>>
>>> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
>>> LANGUAGE=nb_NO python src/gramps.py
>>> Locale dir does not exist at/usr/local/share/locale
>>> Running ./configure --prefix=YourPrefixDir might fix the problem
>>> Traceback (most recent call last):
>>>  File "src/gramps.py", line 68, in <module>
>>>    gettext.install(TransUtils.LOCALEDOMAIN, localedir=None,
>>> unicode=1) #None is sys default locale
>>>  File "/usr/lib/python2.6/gettext.py", line 508, in install
>>>    t = translation(domain, localedir, fallback=True, codeset=codeset)
>>>  File "/usr/lib/python2.6/gettext.py", line 493, in translation
>>>    t = _translations.setdefault(key, class_(open(mofile, 'rb')))
>>>  File "/usr/lib/python2.6/gettext.py", line 180, in __init__
>>>    self._parse(fp)
>>>  File "/usr/lib/python2.6/gettext.py", line 314, in _parse
>>>    plural = v[1].split('plural=')[1]
>>> IndexError: list index out of range
>>> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
>>>
>>>
>>> Is there any way I can trace down where the problem is?
>>>
>>>
>>> Espen
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> EditLive Enterprise is the world's most technically advanced content
>>> authoring tool. Experience the power of Track Changes, Inline Image
>>> Editing and ensure content is compliant with Accessibility Checking.
>>> http://p.sf.net/sfu/ephox-dev2dev
>>> _______________________________________________
>>> Gramps-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems starting Gramps 3.3 with Norwegian locale...

Espen Berg-2
I was not able to start gramps at all using the Gramps 3.3 package I
downloaded from sourceforge. Fixing the stupid mistake in nb.po (made
by me) made Gramps run like before.


Espen


On Thu, Jun 16, 2011 at 9:30 PM, Jérôme <[hidden email]> wrote:

> Maybe that's why this crashes only by using plural form.
>
> ex: we are able to run advanced textual and ancestors reports in Norwegian
> (both)!
>
>
> Jérôme
>
>
> Espen Berg a écrit :
>>
>> Hi devs,
>> I found the reason why Gramps 3.3 does not start using Norwegian
>> translation. The reason is due to an error in the header of nb.po. I
>> have revised nb.po and Gramps starts like anything again. I hope there
>> will be an updated version of Gramps 3.3 soon so that Norwegians that
>> download Gramps 3.3 can have a working version.
>>
>> I am very sorry for introducing this typo in the language file.
>>
>>
>> Cheers
>>
>> Espen
>>
>>
>> On Mon, Jun 13, 2011 at 9:02 AM, Benny Malengier
>> <[hidden email]> wrote:
>>>
>>> Ok,
>>>
>>> This is the defenition of how plurals must be handled that crashes on
>>> parsing the file at startup.
>>> See samples link here:
>>>
>>> http://gramps-project.org/wiki/index.php?title=Translating_GRAMPS#Plural_forms
>>>
>>> benny
>>>
>>>
>>> 2011/6/12 Espen Berg <[hidden email]>
>>>>
>>>> Hi,
>>>> I guess I have managed to mess up the Norwegian translation file in
>>>> some way since I cannot start Gramps using Norwegian locale. If I try
>>>> any other language it works as it should. This is what I get from the
>>>> last version (branches/maintenance/gramps32):
>>>>
>>>>
>>>> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
>>>> LANGUAGE=nb_NO python src/gramps.py
>>>> Locale dir does not exist at/usr/local/share/locale
>>>> Running ./configure --prefix=YourPrefixDir might fix the problem
>>>> Traceback (most recent call last):
>>>>  File "src/gramps.py", line 68, in <module>
>>>>   gettext.install(TransUtils.LOCALEDOMAIN, localedir=None,
>>>> unicode=1) #None is sys default locale
>>>>  File "/usr/lib/python2.6/gettext.py", line 508, in install
>>>>   t = translation(domain, localedir, fallback=True, codeset=codeset)
>>>>  File "/usr/lib/python2.6/gettext.py", line 493, in translation
>>>>   t = _translations.setdefault(key, class_(open(mofile, 'rb')))
>>>>  File "/usr/lib/python2.6/gettext.py", line 180, in __init__
>>>>   self._parse(fp)
>>>>  File "/usr/lib/python2.6/gettext.py", line 314, in _parse
>>>>   plural = v[1].split('plural=')[1]
>>>> IndexError: list index out of range
>>>> espenbe@ministerial:~/Source/gramps/branches/maintenance/gramps32$
>>>>
>>>>
>>>> Is there any way I can trace down where the problem is?
>>>>
>>>>
>>>> Espen
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> EditLive Enterprise is the world's most technically advanced content
>>>> authoring tool. Experience the power of Track Changes, Inline Image
>>>> Editing and ensure content is compliant with Accessibility Checking.
>>>> http://p.sf.net/sfu/ephox-dev2dev
>>>> _______________________________________________
>>>> Gramps-devel mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> EditLive Enterprise is the world's most technically advanced content
>> authoring tool. Experience the power of Track Changes, Inline Image
>> Editing and ensure content is compliant with Accessibility Checking.
>> http://p.sf.net/sfu/ephox-dev2dev
>> _______________________________________________
>> Gramps-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>>
>
>

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel