Web based family history software

Question Names in header of relationship chart

  • WGroleau
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
14 years 5 months ago #1 by WGroleau
Names in header of relationship chart was created by WGroleau
I think it would be convenient to make the H4 in the relationship chart something like
John Doe is Fred Doe’s great-uncle
I am not sure how to do it, but something like
Code:
echo '<h4>', i18n::translate('%1$s is %2$s\'s %3$s', Name_of($pid1), get_relationship_name($node), Name_of($pid1)), '</h4></div>'; //echo '<h4>', i18n::translate('Relationship: %s', get_relationship_name($node)), '</h4></div>';
but if “is” has to be translated with context on whether one or both parties is deceased, maybe that would be prohibitive. (is vs. was)

--
Wes Groleau
UniGen.us/

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

More
14 years 5 months ago #2 by kiwi
Replied by kiwi on topic Re:Names in header of relationship chart
It used to be like that, and still is as far as I know in PGV. This copied from my still current PGV site:

"Albert Osborne is the nephew of Fanny Osborne"

Not sure when it was changed, but presumably related to gettext() and language issues??

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

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
14 years 5 months ago #3 by ToyGuy
Replied by ToyGuy on topic Re:Names in header of relationship chart
Wes
I've spoken to Greg about this previously an he said it was, in fact, an attempt to make translation easier as ANY attempt to create sentences from brief facts can become convoluted. I mentioned I wasn't crazy about the result, but I'm not sure that mattered - and not that it should.
Stephen

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

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

  • WGroleau
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
14 years 5 months ago #4 by WGroleau
Replied by WGroleau on topic Re:Names in header of relationship chart
When the strings are little scraps that the code puts together in English order, it’s no good. That is what PGV did. But when it’s a complete phrase with an insertion code, then the translator is free to put the insertion code in the right place for that language. That is what I attempted to show in my code example, though I did not know what function to call for the name.

We have a similar thing in the relationship name generator, where father's father's father's sister can be built in a loop by substitutions, and come out in Spanish hermana del padre del padre del padre.

--
Wes Groleau
UniGen.us/

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

More
14 years 5 months ago #5 by fisharebest
Replied by fisharebest on topic Re:Names in header of relationship chart
I speak a little french, and think that even this simple phrase gets too complicted.

Marie est la mère d'Alain
Alain est le fils de Marie

Not only does there need to be male/female variants, you need different forms of the possessive "de" depending on whether the name begins with a vowel.

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

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

More
14 years 5 months ago #6 by wooc
Replied by wooc on topic Re:Names in header of relationship chart
In Polish it is even more complicated than in French.

Maria jest matka Alaina
Alain jest synem Marii

Polish language

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

  • WGroleau
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
14 years 5 months ago #7 by WGroleau
Replied by WGroleau on topic Re:Names in header of relationship chart
The Polish is not a problem because it already covers mother and son and they are already independent translation strings.

But having to change the spelling of the fixed part according to both the gender and the spelling of the substitution is definitely a problem for French. Then again, that problem applies to a lot of non-relationship translations with substitutions.

The reason for the request is that one has to figure out who is the ____ of who by looking at the subrelationships and their arrows. And that's not clear either. The arrow next to “father” points to the father, but if you don’t already know that, you could think it means “is father to.”

But I’d rather not have it than have grammatically incorrect language.

--
Wes Groleau
UniGen.us/

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

More
14 years 5 months ago #8 by fisharebest
Replied by fisharebest on topic Re:Names in header of relationship chart
Wes - I think the problem with Polish is the declensions of the *names*, not the "is the X or Y" string

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

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

More
14 years 5 months ago #9 by fisharebest
Replied by fisharebest on topic Re:Names in header of relationship chart
To summarise, it would be

a) a lot of effort
b) for little reward
c) guaranteed to be wrong for at least one language.....

I won't stop anyone else from trying to implement this, but I won't be doing it ;-)

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

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

More
14 years 5 months ago - 14 years 5 months ago #10 by wooc
Replied by wooc on topic Re:Names in header of relationship chart
WGroleau wrote:

The Polish is not a problem because it already covers mother and son and they are already independent translation strings.


There is a problem.
In the first sentence: Maria jest matka Alaina, to the name Alain is added 'a' on the end.
In the second sentence: Alain jest synem Marii, in the name Maria the last 'a' is changed to 'i'.


Some time ago I wrote a function which helps with declension of Polish names. It is located in extras/functions.pl.php file and works OK with the most common names, but there is a lot of exceptions which are not included in this function.
Last edit: 14 years 5 months ago by wooc.

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

  • WGroleau
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
14 years 5 months ago #11 by WGroleau
Replied by WGroleau on topic Re:Names in header of relationship chart
Of course, declension of names. Excuse my tunnel vision. :-)

Yes, that’s rationale for not putting names in. On the other hand, Lukasz's function is needed anyway for other places, …

I withdraw the request but may come up with a simpler idea in the future.

--
Wes Groleau
UniGen.us/

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

More
14 years 5 months ago #12 by wooc
Replied by wooc on topic Re:Names in header of relationship chart
WGroleau wrote:

On the other hand, Lukasz's function is needed anyway for other places, …

I tested it on PGV. Currently it is not used.

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

Powered by Kunena Forum