Author Topic: Re: 2 Bug Reports - User Folder settings  (Read 3339 times)

0 Members and 1 Guest are viewing this topic.

Offline duarte.framos

  • VIP
  • Full Member
  • *
  • Posts: 12
    • View Profile
    • Personal Portfolio
Re: 2 Bug Reports - User Folder settings
« on: September 02, 2013, 17:22:17 »
BUG 2 - User preferences folder not writable
User preferences folder cannot be a subfolder of Ancestris main installation path :

Which Operating System? : Windows

Which version of the O.S.? : Windows 7 64Bits

Which version of Ancestris? : Long standing behavior at least since 0.7 also prevalent in 0.8beta, 0.8.4500 20130901

What is your Java version? : Java 1.7_07-b10

What are the windows opened on your Ancestris application? : None fails at startup

This bug is related to the application itself or a plugin? : Application itself

If it's about a plugin, which plugin? :

If you use the beta version, do you update Ancestris each time a new version is available? : Yes

This bug appeared right after an update (you didn't get it before, and right now, you have it) : Present since I started testing it on Ancestris 0.7, Long standing behavior at least since 0.7 also prevalent in 0.8beta, 0.8.4500 20130901

Which version of the module is concerned (check the "Help - About" dialog box) : example, Ancestris Core: 0.8.0.4509

What is the process that makes the bug to appear (the more details  you can give, the better it is) : Change Ancestris\etc\ancestris.conf to have default_userdir="/MyUserPreferences" and application fails to start.

I am not sure this is a bug or intended behavior, but I'll explain:
I like using all my applications as portable applications (that is one that can run from a thumb drive, or USB stick or external hard-drive without a formal installation on any Windows system), which do not modify the system in any major way, like writing a lot to registry or leaving preferences and settings in the Windows user folder. I know this is not standard behavior and you probably don't officially support this, so this bug may be more like a feature request.

Anyway I tried manually editing the file Ancestris\etc\ancestris.conf so that the user preferences are saved withing the main Ancestris installation folder (instead of the default Windows User profile ${HOME}) and have successfully changed the default_userdir= to another folder.
The problem is I can make it write the preferences anywhere I want with relative paths like default_userdir="../MyUserPreferences", but if I try to make Ancestris write to a subfolder of the main Ancestris Installation ( like default_userdir="/MyUserPreferences" for example) the folder is successfully created, but an empty file named lock is placed there and the application no longer starts.

Could this be changed or this intended behavior for some security reason or something?

Backtrace in the log file :
« Last Edit: September 03, 2013, 13:46:00 by duarte.framos »

Offline Daniel

  • Administrator
  • Sr. Member
  • *****
  • Posts: 39
    • View Profile
Re: 2 Bug Reports - Name order preferences and User Folder
« Reply #1 on: September 02, 2013, 21:21:50 »
Hello Duarte,

Yes the userdir can't be in the installation tree of the application. I would recommend to create a folder dedicated to those data. You can also put your preferences relative to progdir two levels up (eg '${progdir}/../../mydata/ancestris/0.7).
Note that under linux $progdir is replaced with the directory of the launcher. under windows this is probably the case too.

You can also use a command line parameter to set it (eg --userdir "/.../mypref")

You must have write access to this directory and path beginning with '/' are absolute path.

Regards,

Daniel

Offline duarte.framos

  • VIP
  • Full Member
  • *
  • Posts: 12
    • View Profile
    • Personal Portfolio
Re : Re: 2 Bug Reports - Name order preferences and User Folder
« Reply #2 on: September 02, 2013, 22:57:48 »
Under Windows $progdir does not seem to be recognized (a folder with that name is actually created instead), but relative paths like ../mypref are working fine, I guess I'll keep using them happily, thanks a lot.

Also another thing I found out if you are interested is that in 0.8, localizations don't seem to be working if the user folder is changed. I am working on the Portuguese translation and my main Ancestris installation does not seem to show it. However, if I unzip a fresh install and keep the user folder unchanged Portuguese UI shows up quite fine.

Thanks again for the tips

Offline Daniel

  • Administrator
  • Sr. Member
  • *****
  • Posts: 39
    • View Profile
Re: 2 Bug Reports - Name order preferences and User Folder
« Reply #3 on: September 02, 2013, 23:16:37 »
if you change userdir path the language setting must be change too. Then you have to stop and manually restart ancestris to get it in your language. Those settings are stored in the userdir.

Daniel

Offline duarte.framos

  • VIP
  • Full Member
  • *
  • Posts: 12
    • View Profile
    • Personal Portfolio
Re: 2 Bug Reports - Name order preferences and User Folder
« Reply #4 on: September 03, 2013, 13:16:50 »
Hello I have been testing again and there seems to be some issues with that, check this out:

This is an up to date first run Ancestris 0.8 installation, with the default user dir path, both UI and Output language set to Portuguese, restart, nothing else changed.
default_userdir="${HOME}/.${APPNAME}/trunk". Everything seems to shows up in Portuguese just fine.



This is exactly the same installation folder, after changing both languages to Portuguese again and restarting but with a changed user dir path to
default_userdir="${HOME}/.ChangedDirTest01", notice how both versions are in Portuguese, start age in the background and "Exigido" is still in Portuguese, but place jurisdiction translations differ.



And now the same installation folder, after changing both languages to Portuguese again and restarting but with a changed user dir path to
default_userdir="../.ChangedDirTest02", now nothing shows up translated, not even the start page in the background.



Hope this helps explain what I see
« Last Edit: September 03, 2013, 13:18:28 by duarte.framos »

Offline Daniel

  • Administrator
  • Sr. Member
  • *****
  • Posts: 39
    • View Profile
Re: 2 Bug Reports - User Folder settings
« Reply #5 on: September 03, 2013, 21:03:15 »
Hello,
I'm sorry but I can't reproduce this issue. Has anyone got the same issue when changing userdir folder?

Thanks,

Daniel

Offline arvernes

  • Administrator
  • Hero Member
  • *****
  • Posts: 323
  • Pep den a dle heuilh e Donkadur
    • View Profile
    • Arvernes web site
Re : Re: 2 Bug Reports - User Folder settings
« Reply #6 on: September 04, 2013, 09:35:39 »
Hello Duarte,
You wrote that:
And now the same installation folder, after changing both languages to Portuguese again and restarting but with a changed user dir path to default_userdir="../.ChangedDirTest02", now nothing shows up translated, not even the start page in the background.
I guess it's logical. If you change the settings while Ancestris is running using a specific user folder, then, stop Ancestris, change the settings folder and restart ancestris. The program can't find the previously changed parameters (when you changed the language), and restart from a brand new folder, so with the default parameters. It has no way to recall the previously settings as they are in another folder Ancestris doesn't know anything about it. Maybe I didn't understand what you wanted to explain, but if I understood well, this could be a good explanation...  :D
Francois
Met ’drokfen ket evit teñzorioù va Frankiz !

Offline arvernes

  • Administrator
  • Hero Member
  • *****
  • Posts: 323
  • Pep den a dle heuilh e Donkadur
    • View Profile
    • Arvernes web site
Re : Re: 2 Bug Reports - User Folder settings
« Reply #7 on: September 04, 2013, 12:17:56 »
I'm sorry but I can't reproduce this issue. Has anyone got the same issue when changing userdir folder?
Maybe I have a similar behaviour.
Default setting for language on my computer is french. I run Ancestris in Portuguese (for tests only  ;) ).
When I check the setting parameters third tab (tab Data) of the Preferences Menu, I have some words in english (the portuguese translation is not finished), some in portuguese, but the different juridictions entities as "cities", state, region, etc... are in french instead of portuguese. They should be in portuguese as the translations for the different juridictional entities for Portugal have been made, and even if they weren't (and they are as I said), they should be in english (Ancestris should take the english bundle properties file), not in french. Dunno if it helps? Francois

P.S. Duarte, what is the language setting of YOUR COMPUTER? Not Ancestris, but your computer. Is it english or portuguese?
« Last Edit: September 04, 2013, 12:28:18 by arvernes »
Met ’drokfen ket evit teñzorioù va Frankiz !

Offline duarte.framos

  • VIP
  • Full Member
  • *
  • Posts: 12
    • View Profile
    • Personal Portfolio
Re: Re : Re: 2 Bug Reports - User Folder settings
« Reply #8 on: September 04, 2013, 13:55:20 »
I guess it's logical. If you change the settings while Ancestris is running using a specific user folder, then, stop Ancestris, change the settings folder and restart ancestris. The program can't find the previously changed parameters (when you changed the language), and restart from a brand new folder, so with the default parameters...
Francois

Yes, I understand you explanation that the language settings are saved in the user settings folder, so it is natural that every time I changed folder I had to reapply the language preferences. That is why my workflow has always been  open Ancestris config file>change user dir>save config file>open ancestris>change language preferences to Portuguese>apply>restart Ancestris>reopen and check UI
My problem is not that language settings are lost, it is that after changing the language settings the UI translated texts seems to change depending on used folder.

I guess this is a niche problem since normal users don't change settings folder often so I it may be ok if you drop this, I can live with that  :) .
I don't use translated UIs that often anyway, I always prefer software in English, and have only been using the Portuguese translated UI just to check on my ongoing translation effort.

Offline duarte.framos

  • VIP
  • Full Member
  • *
  • Posts: 12
    • View Profile
    • Personal Portfolio
Re: Re : Re: 2 Bug Reports - User Folder settings
« Reply #9 on: September 04, 2013, 13:59:17 »
P.S. Duarte, what is the language setting of YOUR COMPUTER? Not Ancestris, but your computer. Is it english or portuguese?

I am on an English version of Windows 7 64bits with all UI in English.

Yes I think you've found a similar behavior to mine
« Last Edit: September 04, 2013, 14:06:07 by duarte.framos »

Offline arvernes

  • Administrator
  • Hero Member
  • *****
  • Posts: 323
  • Pep den a dle heuilh e Donkadur
    • View Profile
    • Arvernes web site
Re : Re: 2 Bug Reports - User Folder settings
« Reply #10 on: September 06, 2013, 06:40:12 »
Hello Duarte,
I guess after many tests, it's not a bug. The problem comes from the fact you're portuguese, and installed Windows and runs Windows in english. So the first time (a fresh install), you run Ancestris, it is supposed to run in english, so some parameters are recorded in english. If you change the language after that, then run ancestris again, it will run in portuguese, but some parameters are still recorded in english. That's why you can see the different jurisdictional entities (city, state, ....) in english in the settings menu and not in portuguese.
To be sure to have a portuguese fresh install for you (as you run on an english system as I said), is to delete your Ancestris user parameters folder to start from scratch, then open a terminal - here I don't know windows, as I run Linux, so the process I'm gonna describe is for Linux, you have to adapt it for Windows - in the terminal, type : export LANG=pt_PT, then ALWAYS FROM THAT TERMINAL, find the ancestris executable (for linux it's "ancestris", for windows "ancestris.exe"), and fire up Ancestris. That way you will be sure all the parameters recorded at the first run by Ancestris will be in portuguese, not english.
Of course it's not a big deal to live with that : to run Ancestris in portuguese and to have the words for the juridictional entities in the config menu in english, ;-). There is no consequences to your data in your genealogy of course ;-). It's just a question of appearance in the config menu.
Don't know if it helps. Francois
Met ’drokfen ket evit teñzorioù va Frankiz !

Offline duarte.framos

  • VIP
  • Full Member
  • *
  • Posts: 12
    • View Profile
    • Personal Portfolio
Re: 2 Bug Reports - User Folder settings
« Reply #11 on: September 07, 2013, 00:12:37 »
OK I could not recreate your terminal commands on windows command prompt (I have no idea what the equivalent of that is, or if it even exists) but erasing the settings folder did solve the random untranslated jurisdictions, they correctly show in Portuguese ( I could not recreate that error consistently, but when it happened it fixed it). Thanks a lot  ;)


But the untranslated UI still persists, further testing I have made lead me to the conclusion that Ancestris cannot display a translated UI whenever the user dir is defined as a relative path to the application directory. For exemple, all these are fine, and the UI is translated correctly:

*User home dir ${HOME} is fine
*Using the ".." for parent folder is fine
*Paths defined relative to C: drive like "\AncestrisSettings" are also fine
*Full paths lice "C:\Users\User Name\Watever\AncestrisSettings" are all fine
*Forward and backward slashes and including or omitting the inverted comas " " in the path are all fine too

But if I have Ancestris installed for exemple on "C:\Users\User Name\Watever" and set stuff like:

*default_userdir="..\Settings"
*default_userdir="${progdir}\..\..\Settings"

Everything works fine, UI settings are saved as Portuguese, but the UI is always in English even after restart.
If I give a full path to the same exact folder as above like:

*default_userdir="C:\Users\User Name\Watever\Settings"

then the UI displays in Portuguese just fine again, so I guess the problem is just user dirs defined as relative path of installation directory.

But like I said, this is just a minor annoyance for me, I always use my software in English anyway, so don't waste too much of your time hunting for this ghost of a bug  :)