Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Hebrew prefixes #1496

Merged

Conversation

Nick-Hall
Copy link
Member

  • Double the Vav if not already double
  • Remove the leading He
  • Prefix a maqaf for non-Hebrew words and numbers

@romjerome
Copy link
Contributor

romjerome commented Aug 8, 2023

Does it cover some words/dates into others locales too?
I did not check on code, but in french we have at least two specific issues on detailed sentences (libnarrate.py).
e.g., when date object has no day (month and year), we cannot write "né(e) le janvier 2023", should be something like "né(e) en janvier 2023" ('on' or 'in' in English?). Also, when place object starts with a number or street, we cannot write "à 123 rue...", should be something like "au 123 rue" or only the street name ('in' in English). etc.

../gramps/plugins/lib/libnarrate.py:88 and later

@emyoulation
Copy link
Contributor

These items seem to be creating sentence fragments (or 'asides') rather than stilted narrative sentences that would be grammatically correct. So, in English, rules of grammar do not apply.

More properly in English, the event is 'on' a day and, when approximated, 'in' month or year.

And while English lacks a masculine/feminine difference for 'born'. We would have to insert a pronoun to be equivalent... which would raise arguments about the "preferred pronoun".

And it would require a modified verb. In this case, that would be: 'was', the (first and third person) singular past tense of 'be'.

So if we were writing for a grammatically correct narrative in English, the examples would generate either specifically:
"He was born on January 4th of 1923." (Even more formally, the abbreviated '4th' should be 'fourth')
or approximately:
"She was born in January of 1923."

But this example is narrative is generating an outline of facts (or 'asides') with informal sentence fragments instead.

Are sentence fragments allowable in French?

@romjerome
Copy link
Contributor

romjerome commented Aug 9, 2023

On report, the current gender handling sould be fine (grammar, wording) with most "latin" locales. But @emyoulation is maybe pointing out an other specific issue with date format, as the "french" date handler can also display date for users (and records) with "North American" culture (I think on the Canada country) . Where the "month day year" can be the prefered one (date format)...
So, I thought that the need was a simple improvement/inflection for detailed sentences related to the birth and death events. e.g., in french :

_#: ../gramps/plugins/lib/libnarrate.py:89
#, python-format
msgid "%(male_name)s was born on %(birth_date)s in %(birth_place)s."
msgstr "%(male_name)s est né le %(birth_date)s à %(birth_place)s."

#: ../gramps/plugins/lib/libnarrate.py:90
#, python-format
msgid "%(female_name)s was born on %(birth_date)s in %(birth_place)s."
msgstr "%(female_name)s est née le %(birth_date)s à %(birth_place)s."_
[..]
#: ../gramps/plugins/lib/libnarrate.py:199
#, python-format
msgid "%(female_name)s died on %(death_date)s in %(death_place)s."
msgstr "%(female_name)s est décédée le %(death_date)s à %(death_place)s."
..

#: ../gramps/plugins/lib/libnarrate.py:150
#, python-format
msgid "He was born in %(month_year)s in %(birth_place)s."
msgstr "Il est né en %(month_year)s à %(birth_place)s."
[..]
#: ../gramps/plugins/lib/libnarrate.py:159
#, python-format
msgid "%(male_name)s was born in %(month_year)s."
msgstr "%(male_name)s est né en %(month_year)s."
[..]
#: ../gramps/plugins/lib/libnarrate.py:331
#, python-format
msgid "%(female_name)s died in %(month_year)s in %(death_place)s."
msgstr "%(female_name)s est décédée en %(month_year)s à %(death_place)s."
etc.

But such above sentences with reported specific cases might also sound strange in English too, no?
I do not think on too complexe sentences like "the 4th day of january in 1923", and I suppose that place display may also be a problem on building, address or farm names as place object. Maybe a place levels checking on %(birth_place)s and %(death_place)s could be also an improvement for the above examples.

So, as this PR #1496 is for prefixes support, maybe the "in %()s", "on %()s", "at %()s" variables might be also "new clients" for a possible move to the prefixes support? RTL and LTR handling and maintenance could be also more "global" whatever locales (hardcoded or not - code, translation in memory or on the fly) ?

@romjerome
Copy link
Contributor

romjerome commented Aug 9, 2023

Are sentence fragments allowable in French?

Oh, with the "latin" flexibility, maybe everything is allowed! You can push/put two words on a paper, and the reader may (or not) understand the sense. So for detailed reports, "fragments" are maybe not allowed by the 'academie-francaise' or the 'office québécois de la langue française', but like with recents spelling reforms, the rules are only strict, in theory. So, if the common langage is understandable, one can blame you and someone else will be just keep the sense, the idea, behind sentence fragments!

@Nick-Hall
Copy link
Member Author

Does it cover some words/dates into others locales too?

It doesn't at the moment, but it could do. It looks like for French we may need to pass in a Date or Place object in addition to the substitution text.

@romjerome
Copy link
Contributor

romjerome commented Aug 13, 2023

@Nick-Hall , there is also a possible issue on a options sequence under textual detailed reports.

User choice like:

#: ../gramps/plugins/textreport/detancestralreport.py:881
#: ../gramps/plugins/textreport/detdescendantreport.py:1070
msgid "Use full dates instead of only the year"

can force to use a specific preposition...

In this case (year only), I suppose this will not always display something like "in %(year)s" (for english), whatever date format set or locale issue. So, this may already pass over into some strings!
e.g., "%(female_name)s died on %(death_date)s in %(death_place)s." could look like "%(female_name)s died on %(year)s in %(death_place)s." as 'year' will be the 'death_date' variable.

@romjerome
Copy link
Contributor

romjerome commented Aug 13, 2023

Looking on internet ("'In' vs. 'On' followed by a year", found such answer:

Any time you are being less specific than the day itself, use “in” to indicate that the event happened at a time within the boundaries of that century, decade, year, or month.

In the 20th century...

In the late '80s...

In 1989...

In June, 1989

When the day is known, you can say “On June 20, 1989...” or “On that day in June...”.

When the hour is known, you can say “At 3:05 pm on June 20, 1989...”.

For any of these levels, estimates or approximations would be preceded by “around” or some similar term. (“Around 1990...”, “At approximately 3 pm...”, “At 3 pm or so...”, etc.)

Another easier way to remember is: in a period, on a day, at a time.

while year is a long period, so it is always "in" a year; a time like 7 o'clock is very specific, thus we use "at" all the time.

hope this help.

@yarons
Copy link
Contributor

yarons commented Aug 16, 2023

It looks amazing so far, I'll test it in the UI after the approval to make sure it covers all cases, thank you so much!

* Double the Vav if not already double
* Remove the leading He
* Prefix a maqaf for non-Hebrew words and numbers
@Nick-Hall Nick-Hall merged commit 7703cb6 into gramps-project:maintenance/gramps52 Aug 20, 2023
2 checks passed
@Nick-Hall Nick-Hall deleted the placeholder branch August 20, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants