• Page:
  • 1
  • 2

TOPIC:

Arabic translaton almost done. 8 years 8 months ago #1

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor
Hi,

I would like to thank webtrees team for their excellent work, efforts and involvement in this project, which I think it to be the most comprehensive yet simple to use of all other genealogy software available.

I did the Arabic translation, and what is left are the help messages (I need them for reference while translating and I was also informed that they will be rewritten in the future) and some relationship messages.

While doing the translation, I had to go over each page and most features of webtrees and while doing so, I found out some issues that need to be looked at. I will make separate posts for them.

Regards to all.

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

Re: Arabic translaton almost done. 8 years 8 months ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13364
<<and some relationship messages.>>

I have already rewritten the relationship code.

The existing code works by creating a translation for every relationship that has a name in any languages. For example, Spanish has a name for your "son's wife's mother", and so every translation must have a name for this - even if there is no obvious name.

The new system is based on rules/patterns, and avoids all the repetition. It only needs translations for the relationships that exist in each language.

However, I need to understand the relationship rules for each language, and I have not had the time for this. For example, the same relationship can be a "3rd cousin", a "5th cousin" or a "7th cousin", depending on the language.

As soon as I get the time, I will document my requirements, and ask each of the translators to help me with the rules for their own language.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

Last edit: by Jackie.

Re: Arabic translaton almost done. 8 years 8 months ago #3

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor
Great !

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

Re: Arabic translaton almost done. 8 years 8 months ago #4

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor

fisharebest wrote: However, I need to understand the relationship rules for each language, and I have not had the time for this. For example, the same relationship can be a "3rd cousin", a "5th cousin" or a "7th cousin", depending on the language.

As soon as I get the time, I will document my requirements, and ask each of the translators to help me with the rules for their own language.



In Arabic there is always a distinction between paternal, maternal, fraternal and sororal relationships.

So it is not enough to say:

grandfather could be:
father's father, we say paternal grandfather (p-grandfather).
or
mother's father, we say maternal grandfather (m-grandfather).

great-grandfather could be:
father's father's father, we say father's p-grandfather.
or
father's mother's father, we say father's m-grandfather.
or
mother's father's father, we say mother's p-grandfather.
or
mother's mother's father, we say mother's m-grandfather.
.
.

and so on for uncle/aunt, cousin, brother/sister in law, nephew/niece, grandson/granddaughter.
we always indicate which line the relationship came from otherwise it will be ambiguous.

If line is not mentioned, then it is always assumed paternal and/or fraternal line.

Once you are ready we can go over it in detail.

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

Re: Arabic translaton almost done. 8 years 8 months ago #5

I think that technically English would (or should) use the same paternal / maternal line distinctions.

But in "real life" most people don't bother. So that raises a debate over whether webtrees shoulld be technically correct, or stick to the colloquially acceptable common-use form.

Is this also true of Arabic?
Nigel

www.our-families.info

Hosted at:
Follow me at:

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

Re: Arabic translaton almost done. 8 years 8 months ago #6

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor
It matters in Arabic even in common-use because we use different words for each.

The exception is when mentioning grand-father/mother or grand-son/daughter (i.e direct vertical line) in plural form , and it is similar to the English use of grandparents and grandchildren.

But for singular (vertical line) and singular/plural uncle/aunt, cousin, brother/sister in law, nephew/niece (i.e. horizontal line) a distinction should always be made.

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

Re: Arabic translaton almost done. 8 years 8 months ago #7

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13364
Muadh - I'm glad to see that you understand regular expressions. This will make it much easier! If you understand MySQL expressions, I will be even happier!

The system is driven from a database of relationship names. Relationships are defined by the individual steps. So, "father -> brother" is the defintion for "uncle".

Each individual relationship is abbreviated to 3 letters, so "father -> brother" is represented as "fatbro". There are 4 basic relationship types: parent, child, spouse, sibling. Each can be male/female/unknown, so that makes 12 combinations. par/fat/mot chi/son/dau spo/hus/wif sib/bro/sis

As a simple example, an uncle is defined by these two rows in the database.

'en-GB', '^(fat|mot|par)bro$', '''uncle'''
'en-GB', '^(fat|mot|par)(bro|sis|sib)hus$', '''uncle'''

In simple terms, an uncle is either a "parent's brother" or a "parent's sibling's husband".

I could have combined these into one regexp, but I have kept them separate for clarity.

The 3rd column is actually a MySQL expression, rather than a literal string. Hence the extra quotes.

For more complex relationships, extra variables are available to the expression. For example, I use this expression for brother

'en-GB', '^bro$', 'CASE WHEN @dob1=@dob2 THEN 'twin brother' WHEN @dob1<@dob2 THEN 'younger brother' WHEN @dob1>@dob2 THEN 'elder brother' ELSE 'brother' END'

and this expression for 'husband'

'en-GB', '^hus$', 'IF(NOT @marr OR @sex<>'F', IF(@div, 'ex-partner', 'partner'), IF(@div, 'ex-husband', 'husband'))'

I won't paste the rule for cousins here (it is quite long) but it uses the same principle.

So, what I will need for each language is a list of these rules, and a list of any extra variables that might be needed.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

Re: Arabic translaton almost done. 8 years 8 months ago #8

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13364
Here is an example of the code in use:
mysql> CALL get_relationship('i1', 'i5');
+----------+--------+-------------+
| path     | rel    | name        |
+----------+--------+-------------+
| i1@i3@i5 | motdau | half-sister |
+----------+--------+-------------+
1 row in set (0.05 sec)

Query OK, 0 rows affected, 4 warnings (0.05 sec)

mysql> CALL get_relationship('i1', 'i10');
+-----------+--------+----------------------+
| path      | rel    | name                 |
+-----------+--------+----------------------+
| i1@i3@i10 | motmot | maternal grandmother |
+-----------+--------+----------------------+
1 row in set (0.04 sec)

Query OK, 0 rows affected, 4 warnings (0.04 sec)

mysql> CALL get_relationship('i1', 'i792');
+--------------------------------------------------+--------------------------------+-------------------------------------+
| path                                             | rel                            | name                                |
+--------------------------------------------------+--------------------------------+-------------------------------------+
| i1@i3@i10@i31@i33@i162@i283@i3267@i798@i793@i792 | motmotmotfatfatsisdaudausonson | fifth cousin once removed ascending |
+--------------------------------------------------+--------------------------------+-------------------------------------+
1 row in set (0.21 sec)

Query OK, 0 rows affected, 4 warnings (0.21 sec)
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Re: Arabic translaton almost done. 8 years 8 months ago #9

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor

fisharebest wrote: Muadh - I'm glad to see that you understand regular expressions. This will make it much easier! If you understand MySQL expressions, I will be even happier!

I can't claim that, but I'll try my best to make you happy!

As a simple example, an uncle is defined by these two rows in the database.
'en-GB', '^(fat|mot|par)bro$', '''uncle'''

'ar', '^(fat)bro$', '''p-uncle'''
'ar', '^(mot)bro$', '''m-uncle'''
'ar', '^(par)bro$', '''uncle'''

'en-GB', '^(fat|mot|par)(bro|sis|sib)hus$', '''uncle'''

I think placement of (bro) here is wrong if I understand the logic correctly, he can't have a hus but may be a wife!
Any how if I am correct then:

'ar', '^(fat)(sis|sib)hus$', '''p-aunt-h'''
'ar', '^(mot)(sis|sib)hus$', '''m-aunt-h'''
'ar', '^(par)(sis|sib)hus$', '''aunt-h'''

In simple terms, an uncle is either a "parent's brother" or a "parent's sibling's husband".

In Arabic we have six names: p-uncle, m-uncle, uncle, p-aunt-h, m-aunt-h, aunt-h to cover uncle.

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

Last edit: by muadh.

Re: Arabic translaton almost done. 8 years 8 months ago #10

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13364
<<I think placement of (bro) here is wrong if I understand the logic correctly, he can't have a hus but may be a wife!>>

This is for same-sex relationships, such as civil-partnerships.

Your father's brother's same-sex partner would generally be regarded as an uncle.

<<In Arabic we have six names: p-uncle, m-uncle, uncle, p-aunt-h, m-aunt-h, aunt-h to cover uncle. >>

And this system allows you to have separate definitions for each of them. You can have as much complexity as you need.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

Re: Arabic translaton almost done. 8 years 8 months ago #11

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor

fisharebest wrote: Here is an example of the code in use:

+--------------------------------+-------------------------------------+
| rel                            | name                                |
+--------------------------------+-------------------------------------+
| motdau                         | half-sister                         |
+--------------------------------+-------------------------------------+
| motmot                         | maternal grandmother                |
+--------------------------------+-------------------------------------+
| motmotmotfatfatsisdaudausonson | fifth cousin once removed ascending |
+--------------------------------+-------------------------------------+

Fair enough, as long as the (msgctxt="rel") is provided for (msgid="name") then (msgstr="translation") can be done as per each Language's common use, or any other variant for that matter.

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

Re: Arabic translaton almost done. 8 years 8 months ago #12

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor

fisharebest wrote: <<I think placement of (bro) here is wrong if I understand the logic correctly, he can't have a hus but may be a wife!>>

This is for same-sex relationships, such as civil-partnerships.

Your father's brother's same-sex partner would generally be regarded as an uncle.

I am aware of same-sex relationships, but never knew that you use the terms husband/wife to define its participants. I thought you use spouse as the term.

Each can be male/female/unknown, so that makes 12 combinations. par/fat/mot chi/son/dau spo/hus/wif sib/bro/sis

If so, then [en-GB', '^(fat|mot|par)(bro|sis|sib)hus$', '''uncle'''] will never find fatbrohus, because the relationship in concern is fatbrospo. So you need to check for it separately or rewrite the regexp to include it.

Mind you, I am not a programmer, so please bare with me while I am still learning. My admiration for WT led me for the first time to GEDCOM, PHP, MySQL, gettext and recently to regexp, and I don't know what else is coming up!

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

Re: Arabic translaton almost done. 8 years 8 months ago #13

... and I don't know what else is coming up!

HTML, CSS and javascript - but you seem to be a quick learner :-) Welcome again to webtrees.
Nigel

www.our-families.info

Hosted at:
Follow me at:

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

Re: Arabic translaton almost done. 8 years 8 months ago #14

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor
One more thing, in Arabic we have another relationship called wet-nursing or milk-sibling.
en.wikipedia.org/wiki/Wetnursing

In a way it is similar to foster/adopt relationships but has different implications.
en.wikipedia.org/wiki/Sibling#Milk_sibling

I hope you can add it to the other relationships.

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

Last edit: by muadh.

Re: Arabic translaton almost done. 8 years 8 months ago #15

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor

kiwi wrote:

... and I don't know what else is coming up!

HTML, CSS and javascript - but you seem to be a quick learner :-) Welcome again to webtrees.


whew, thanks!

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

Re: Arabic translaton almost done. 8 years 8 months ago #16

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13364
<<I am aware of same-sex relationships, but never knew that you use the terms husband/wife to define its participants. I thought you use spouse as the term.>>

For display, yes. But internally, husband/wife/spouse just indicates whether the person is male/female/unknown.

The rule for these relationships is actually:

'en_GB', '^hus$', 'IF(NOT @marr OR @sex<>'F', IF(@div, 'ex-partner', 'partner'), IF(@div, 'ex-husband', 'husband'))'
'en_GB', '^wif$', 'IF(NOT @marr OR @sex<>'M', IF(@div, 'ex-partner', 'partner'), IF(@div, 'ex-wife', 'wife'))'
'en_GB', '^spo$', 'IF(@div, 'ex-partner', 'partner')'

So, this says that English uses "partner" for both same-sex and unknown-sex relationships. Other languages may have different rules.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

Re: Arabic translaton almost done. 8 years 8 months ago #17

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor

fisharebest wrote: So, this says that English uses "partner" for both same-sex and unknown-sex relationships. Other languages may have different rules.


So what is the difference, or how to distinguish, between spouse and partner in family relationships, both internally and culturally?

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

Re: Arabic translaton almost done. 8 years 8 months ago #18

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13364
Internally, hus/wif/spo simply indicates the sex of the second person in the relationship.

In English, we normally use

"partner" for all unmarried couples
"partner" for same-sex couples
"husband/wife" for different-sex, married couples
"spouse" is used for unknown sex, but only when it is assumed that they are a different-sex, married couple.

We would most likely need "spouse" when we create an unknown couple to link a grand-child to a grand-parent.

Note that my rules above are only a first draft. Some may need expanding.
I just needed some rules so that I could test the code.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

Re: Arabic translaton almost done. 8 years 8 months ago #19

  • muadh
  • muadh's Avatar Topic Author
  • Visitor
  • Visitor

fisharebest wrote: 1- "partner" for all unmarried couples
2- "partner" for same-sex couples

2 is either redundant or contradictory to 1, because if unmarried it is redundant to 1, and if married then it becomes contradictory to 1.

So I guess it should be:

1- "partner" for unmarried same-sex couples
2- "partner" for all same-sex couples

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

Re: Arabic translaton almost done. 8 years 8 months ago #20

  • ToyGuy
  • ToyGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
  • Posts: 4925
Sorry, but why not:
1- "partner" for all unmarried couples

There are many relationships that fit this category.
Just a few:
One night stand = very temporary partner
shack-up relationship = perhaps a bit longer temporary partner
committed relationship without marriage, common law marriage or contract = partner
contractual relationship without marriage or blessing by state or church = partner
etc

None of these need be same-sex partners.
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.

  • Page:
  • 1
  • 2
Powered by Kunena Forum