Web based family history software

Question Development Category

  • Klugesherz
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago - 3 years 4 months ago #1 by Klugesherz
Development Category was created by Klugesherz
For those who contribute to the software
Should we not create a Development category, in order to share the development topics ?

It would be helpful and so would not pollute the other topics

Thanks in advance

WebTrees 2.1.x---> My famility tree
PHP 8.0
Last edit: 3 years 4 months ago by Klugesherz.

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Away
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
3 years 4 months ago - 3 years 4 months ago #2 by bertkoor
Replied by bertkoor on topic Developpment Category

Klugesherz wrote: For those who contribute to the software


The list of active contributors is not that long:
github.com/fisharebest/webtrees/graphs/contributors

According to Contributing.md there's also (going to be?) a Slack channel for developers.

Klugesherz wrote: in order to share the development topics ?


Those are supposed to be 'issues', tracked on GitHub, and each of them has its own conversation:
github.com/fisharebest/webtrees/issues

Klugesherz wrote: It would be helpful and so would not pollute the other topics


I personally observe zero pollution of developers chatting amongst each other. Could you give an example?

stamboom.BertKoor.nl runs on webtrees v1.7.13
Last edit: 3 years 4 months ago by bertkoor.

Please Log in or Create an account to join the conversation.

  • Klugesherz
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago - 3 years 4 months ago #3 by Klugesherz
Replied by Klugesherz on topic Development Category

bertkoor wrote:

Slack channel for developers.

Not sure that Slack Channel will be the most appropriate.
This is fine if you are working in the same company, but not in case you contribute as free, to a software.
Oups, this is my opinion of course..Which will certainly not be taken into account, as I'm just starting in to the contribution. ;-)

For me it is important to have a place where it is possible to share, and request some clarifications about the software
A specific "DEV" category in this forum, would have been fine

Here some Examples:
* Why I'm acing an issue when I run "npm run production" under windows
* Why all parameters in wt_getcom_setting are all duplicated with gedcom_id 1 and gedcom_id-1 ?
* Where I can find help to use for the I18N::translate() function
* ..

Open to the administrators of this Forum :-)


WebTrees 2.1.x---> My famility tree
PHP 8.0
Last edit: 3 years 4 months ago by Klugesherz.

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #4 by ric2015
Replied by ric2015 on topic Developpment Category

Klugesherz wrote: Why I'm acing an issue when I run "npm run production" under windows


Not sure if this is the same issue, but it worked for me after changing the first few lines in 'package.json' to (note the extra 'node'):
Code:
"scripts": { "development": "NODE_ENV=development node node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "NODE_ENV=development node node_modules/webpack/bin/webpack.js --watch --config=node_modules/laravel-mix/setup/webpack.config.js", "production": "NODE_ENV=production node node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js" },

... according to notes I made at that time - don't ask me for details, I'm not actually familiar with these build tools :-)


Klugesherz wrote: Why all parameters in wt_getcom_setting are all duplicated with gedcom_id 1 and gedcom_id-1 ?


Default settings are stored under id -1 ( here ) and copied from this id to additional trees ( here ). It seems that new trees could just as well be initialized directly from the defaults in 'SeedGedcomSettingTable.php', I'm not sure why this is done indirectly via the database table.

Richard

webtrees 2.1.17 at cissee.de/webtrees2
Vesta custom modules (Classic Look & Feel, Gov4webtrees, Shared Places, Extended Relationships) available at cissee.de

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #5 by fisharebest
Replied by fisharebest on topic Developpment Category
> For me it is important to have a place where it is possible to share, and request some clarifications about the software

You can also use the issue tracker on github to ask questions.

> an issue when I run "npm run production" under windows

I only use Linux and Mac, so it is hard to guess what issues you have.

> I'm not sure why this is done indirectly via the database table.

There is some code to allow you to update the defaults (-1).
It is only activated when you have a large number of trees.

> Where I can find help to use for the I18N::translate() function

The file app/I18N.php contains lots of examples showing how to use these functions. e.g. plurals, context, etc.

There are also examples of the I18N functions in one of the example modules.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • Klugesherz
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago - 3 years 4 months ago #6 by Klugesherz
Replied by Klugesherz on topic Development Category

ric2015 wrote: it worked for me after changing the first few lines in 'package.json' to (note the extra 'node'):

Humm.. It seems not fixing the issue
Code:
> NODE_ENV=production node node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js 'NODE_ENV' n’est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes. npm ERR! code ELIFECYCLE
I will see later to dig into the issue, and I will share later my findings, otherwise I have to switch to Ubuntu for a check too..

fisharebest wrote: You can also use the issue tracker on github to ask questions.

Yes sure, but some times you need a bit more general information when you starting in coding..
Open to you..

fisharebest wrote: The file app/I18N.php contains lots of examples showing how to use these functions. e.g. plurals, context, etc.


Sorry this was not really the quest.
It is more related to the topic For fixes

To fix the issue #3476, #3479 I would need a new entry in the translate dictionary.
So my question was to know who is in charge to create this new entries ?
What is the process for such a request ?
And what is the routing to generate the messages.php files
Before to pull request this fix, I wanted to have more information

In the mean time I have pull requested #3484, which should be OK

WebTrees 2.1.x---> My famility tree
PHP 8.0
Last edit: 3 years 4 months ago by Klugesherz.

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #7 by ric2015
Replied by ric2015 on topic Developpment Category

Klugesherz wrote:

Code:
'NODE_ENV' n’est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes.


Ok, so that is one step earlier then.
One solution for this problem on windows is to install win-node-env, see here .
Checking my notes more closely, I see that this is what I had to do as well ;-)

If you get this to work, we should probably add a FAQ entry for this.

Richard

webtrees 2.1.17 at cissee.de/webtrees2
Vesta custom modules (Classic Look & Feel, Gov4webtrees, Shared Places, Extended Relationships) available at cissee.de

Please Log in or Create an account to join the conversation.

  • Klugesherz
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago - 3 years 4 months ago #8 by Klugesherz
Replied by Klugesherz on topic Development Category

ric2015 wrote: One solution for this problem on windows is to install win-node-env, see here .


YES.
It is working
Thank you !!
In a short view the steps run in git working directory


To avoid issue: npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
Code:
npm config set registry http://registry.npmjs.org/

Install win-node-env
which creates executables like NODE_ENV.cmd that sets the NODE_ENV environment variable and runs the rest of the command.
Code:
npm install --save-optional win-node-env

To update the vulnerabilities
Code:
npm audit fix

Then Changing the first few lines in 'package.json' and add the extra 'node'
Code:
"scripts": { "development": "NODE_ENV=development node node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "NODE_ENV=development node node_modules/webpack/bin/webpack.js --watch --config=node_modules/laravel-mix/setup/webpack.config.js", "production": "NODE_ENV=production node node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js" },

WebTrees 2.1.x---> My famility tree
PHP 8.0
Last edit: 3 years 4 months ago by Klugesherz.

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #9 by fisharebest
Replied by fisharebest on topic Development Category
@Klugesherz

Can you try this for me.

In `devDependencies {}`, add:
"cross-env": "^7.0.2",

In `scripts`, change
NODE_ENV=...
to
cross-env NODE_ENV=...

I hope this will make the script compatible with Windows.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #10 by ddrury
Replied by ddrury on topic Development Category
Assuming you're using Windows 10, the simplest solution is to install the Windows Subsystem for Linux (WSL) version 1 or 2, then from the Microsoft store install a Linux system (Ubuntu seems to be the favourite), once that is done you can install node & npm and using the Ubuntu terminal access your webtrees source directory at /mnt/<drive>/<path to webtrees root> and then run npm. No need to modify anything.

See docs.microsoft.com/en-us/windows/wsl/install-win10

--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26

Please Log in or Create an account to join the conversation.

  • Klugesherz
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #11 by Klugesherz
Replied by Klugesherz on topic Development Category
npm config set registry registry.npmjs.org/
modify package.json as you highligthed
npm install
npm audit fix
npm run ...

--> Works for me (No need to install win-node-env)

WebTrees 2.1.x---> My famility tree
PHP 8.0

Please Log in or Create an account to join the conversation.

More
3 years 4 months ago #12 by fisharebest
Replied by fisharebest on topic Development Category
Thanks. I've added cross-env to the code.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • Klugesherz
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #13 by Klugesherz
Replied by Klugesherz on topic Development Category
Great,

Can you revert back to my questions / translate.webtrees.net/projects/webtrees ?

WebTrees 2.1.x---> My famility tree
PHP 8.0

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}