Jump to content
TNG Community
toewen

Age 'About'

Recommended Posts

toewen


Under the red buttons next to Births, Baptisms, Deaths and Burials is a red button in the second row. The upper field shows a calculated age. Unfortunately, in the Dutch language I am confronted with the English word About. Very annoying. Can this be translated somewhere into Ca. and possibly after the number the word 'jaar' years? Moreover, a calculation is irrelevant and superfluous if one of the date fields contains the abbreviation ABT AFT or BEF.

Share this post


Link to post
Share on other sites
Chris Lloyd

You can set up custom text - have a look at the file structure and look for for the cust_text file in  the languages section for Dutch

Edited by Chris Lloyd
typo

Share this post


Link to post
Share on other sites
toewen

Thank you Chris,
In the cust_text Dutch it is correct.
All words 'About' and variants are translated into Dutch 'Ca.' or 'circa'.
I think it has to do with the fact that it is the calculation field in which the age is indicated.

Share this post


Link to post
Share on other sites
bhemph

Can you post an image of this or a link to a page, so we can tell what page it is to check what is happening?  Then we might be able to find a solution for what is going on, or find something hard coded that is not supposed to be.

Share this post


Link to post
Share on other sites
toewen

About2.JPG

Share this post


Link to post
Share on other sites
Michel KIRSCH
13 hours ago, toewen said:

In the cust_text Dutch it is correct.

Toewen, do you use Dutch or Dutch-UTF8?

the variables are $dates['xxx'] variables and are stored in the alltext.php file

As alternative, I have defined the next variables for my use in my cust_text.php files :

$dates['CA'] = "vers";
$dates['<'] = "avant";
$dates['>'] = "après";

so I can use <, > and ca in place of "bef", "aft" and "abt"

Michel

 

Share this post


Link to post
Share on other sites
bhemph

Since the age is coming from the GEDCOM and that is standardized to English, that is what is happening.  Getting it to translate will take some manipulation of the age row of the event, like is currently done with the date.  This is probably something that you should let Darrin know about and make sure to give him a link to this thread.

Share this post


Link to post
Share on other sites
toewen
11 hours ago, Michel KIRSCH said:

Toewen, do you use Dutch or Dutch-UTF8?

the variables are $dates['xxx'] variables and are stored in the alltext.php file

As alternative, I have defined the next variables for my use in my cust_text.php files :

$dates['CA'] = "vers";
$dates['<'] = "avant";
$dates['>'] = "après";

so I can use <, > and ca in place of "bef", "aft" and "abt"

Michel

 

Thank you Michel,

I have since found out that this is from the gedcom of myHerritage (see example).
I am using Dutch-UTF8 and in the alltext.php file it does say ABOUT translated as 'circa'.
I have added About to this but this has no result.

Re-importing the gedcom is not an option due to the many changes. Perhaps I should perform a search and replace action in the SQL table?

Thanks for the suggestions with < and >.

Toon

 

About Gedcom.JPG

About Gedcom text.JPG

Share this post


Link to post
Share on other sites
Michel KIRSCH

See your problem. The dates in this field are not translated, but displayed as is.

AFTER MAKING A COPY OF YOUR TABLE tng_events, you can try this sql statement for age preceded by 'about'

ATTENTION : 'circa' + space + 'age' + space + 'jaar' = max 12 characters (or change in the structure of the table the length of the field 'age' and extend it to 20)

example : 'circa 68 jaren' is too long,  "ca 68 jaar oud" too. But "ca 68 jaren" is ok...

to Replace about 68 by circa 68 :

UPDATE `tng_events` SET `age`= CONCAT('circa', substr(`age`,6)) WHERE age like 'about%'

if you do it for age preceded by 'abt' (or another), change the search string and the "length" ("length" is lenght of the search string + 1)

to replace "abt 68" by "ca 68 jaren"

UPDATE `tng_events` SET `age`= CONCAT('ca', substr(`age`,4), ' jaren') WHERE age like 'abt%'

Michel

Share this post


Link to post
Share on other sites
toewen
45 minutes ago, Michel KIRSCH said:

See your problem. The dates in this field are not translated, but displayed as is.

AFTER MAKING A COPY OF YOUR TABLE tng_events, you can try this sql statement for age preceded by 'about'

ATTENTION : 'circa' + space + 'age' + space + 'jaar' = max 12 characters (or change in the structure of the table the length of the field 'age' and extend it to 20)

example : 'circa 68 jaren' is too long,  "ca 68 jaar oud" too0. But "ca 68 jaren" is ok...

to Replace about 68 by circa 68 :

UPDATE `tng_events` SET `age`= CONCAT('circa', substr(`age`,6)) WHERE age like 'about%'

if you do it for age preceded by 'abt' or another), change the search string and the length (length is lenght of the search string + 1) by :

to replace "abt 68" by "ca 68 jaren"

UPDATE `tng_events` SET `age`= CONCAT('ca', substr(`age`,4), ' jaren') WHERE age like 'abt%'

Michel

Thank you Michel,
Actually, I want to get rid of all these About dates.  They are in the age column of tng-events, and they come from calculations with dates preceded by ABT BEF and AFT.
It is not an actual date and therefore does not make sense, which is why I want to remove them all.

About SQL.JPG

Share this post


Link to post
Share on other sites
Michel KIRSCH

If you want to delete them ALL (say again : ALL. Means "Empty the column 'age'") :

UPDATE `tng_events` SET `age`= ''

Michel

 

Share this post


Link to post
Share on other sites
toewen

I do not want to remove everything Michel, I have seen that some data are relevant after checking.
I do want to remove only the About ages that are the result of ABT BEF or AFT.

Toon

Share this post


Link to post
Share on other sites
Michel KIRSCH

And how can you say : "This age is the result  of ABT, BEF or AFT"?

because the eventdate begins with AFT, BEF or AFT ?

 

Share this post


Link to post
Share on other sites
toewen

Perhaps I have expressed myself a little unhappily.
But indeed, if one of the eventdates starts with AFT, BEF or ABT, the result is not exact and can be off by 50 years.
I have many acts from the period 1400-1600 in which persons are mentioned. And then you only have the date of the deed.  If this is a first certificate in which a person is mentioned, then you know that this person was born at least 25 years before the date of the deed, because in those days people became adults at the age of 25.
On the basis of the deed dates you can then estimate: was born before and/or died after. However, this is not exact information and I would not like to see and publish these calculated ages.

Toon

Share this post


Link to post
Share on other sites
Michel KIRSCH

OK.

UPDATE `tng_events` SET `age`= '' WHERE `eventdate` LIKE "BEF%" OR `eventdate` LIKE "AFT%" OR `eventdate` LIKE "BET%"

will erase the field age for the eventdate beginning with BEF, AFT or BET

Michel

Share this post


Link to post
Share on other sites
toewen

Thank you Michel,
I think that must be the solution.
You know I am a beginner and I hope I did the queries in the right place.
I still do this first in a copy database before doing this in the original db.

I have executed both commands but I get error messages back. The data has not changed yet.
See examples

Circa query.JPG

Fout na circa query.JPG

Locatie query.JPG

Fout na opdracht.JPG

Share this post


Link to post
Share on other sites
Michel KIRSCH

First example you give : you try to execute more than one sql statement at a time.

UPDATE `tng_events` SET `age`= '' WHERE `eventdate` LIKE "BEF%" OR `eventdate` LIKE "AFT%" OR `eventdate` LIKE "BET%"   

is one SQL statement. Copy the line above and paste it into your PHPMyAdmin SQL window, replacing the "SELECT * FROM tng_events....." line which is the default statement.

It will erase all the 'age' field when the conditions are encountered ('eventdate' begins with BEF, AFT or BET)

second example you give : Idem

you forgot to type 'UPDATE tng_events' (before SET age...) and you must delete the part which begins with SELECT..., which is the default statement

Michel

 

 

 

Share this post


Link to post
Share on other sites
toewen

Thank you Michel, you are a master.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×