GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
Date Narrative


https://support.genopro.com/Topic17400.aspx
Print Topic | Close Window

By EDilena - Thursday, April 19, 2007
En el tag : "<FmtDateNarrative><FmtYM>" al querer traducirlo al español quiero poner lo siguiente:

<FmtYM>[en el mes de] MMMM [de] yyyy</FmtYM>
No funciona !

El tag <FmtYMD>el D [de] MMMM [del año] yyyy<FmtYMD>
Funciona Ok!

Como hago para insertar las palabras que contegan la letra "d" como parte de una oracion??

Lo curioso es que en el tag FmtYMD funciona bien.
Estoy poniendo algo mal??


Ejemplo :
Date : 17/04/1973 -> "el 17 de Abril del año 1973" -> OK!
Date : 04/1973 -> "en el mes e Abrilel año] 1973" -> Sad
Date : 17/04 -> "el dia 17 de Abril" -> OK!




By haep - Thursday, April 19, 2007
EDilena (4/19/2007)
En el tag : "<FmtDateNarrative><FmtYM>" al querer traducirlo al español quiero poner lo siguiente:

<FmtYM>[en el mes de] MMMM [de] yyyy</FmtYM>
No funciona !

El tag <FmtYMD>el D [de] MMMM [del año] yyyy<FmtYMD>
Funciona Ok!

Como hago para insertar las palabras que contegan la letra "d" como parte de una oracion??

Lo curioso es que en el tag FmtYMD funciona bien.
Estoy poniendo algo mal??


Ejemplo :
Date : 17/04/1973 -> "el 17 de Abril del año 1973" -> OK!
Date : 04/1973 -> "en el mes e Abrilel año] 1973" -> Sad
Date : 17/04 -> "el dia 17 de Abril" -> OK!

Hi,


You can use quotation marks: pe.
<FmtYM>[en el mes de] MMMM "de" yyyy</FmtYM>

Hugo

By EDilena - Thursday, April 19, 2007
No funciona. Da una frase vacia.

Para mi el problema es interno en el programa al usar este tag, ya que una fecha que contenga dia mes y año funciona correctamente.

By haep - Friday, April 20, 2007
Hi Edilena,

Yes, there is a problem with the translation of the tag (I didn't notice it before becuse in the translation I did, the whole prhase simply disappear), there is currently noway to add the letter "d" for translation in  <FmtDateNarrative>
        <FmtYM>&#32;[in|about|before|after] MMMM yyyy</FmtYM> <!-- He was born in January 2006 -->

maybe Ron can help us with this issue. 

PS. EDilena, May I suggest you to use English on the elaboration of your questions. By this way, the users who do not speak Spanish (and also the the support team) could understand the question.

Hugo.

By haep - Friday, April 20, 2007
Hi Ron,

Is there any way to use the letter "d" in the tag <FmtYM>  of the <FmtDateNarrative> secction?, as EDilena noticed, in the other tags of the same secction its possible by adding quotation marks, but in <FmtYM>  tag it doesn't work.

Here is a sample of the translation:

<FmtDateNarrative>
        <!-- Templates to format narrative dates -->
        <FmtYMD>&#32;[el|aproximadamente el|antes del|después del] D "de" MMMM "de" yyyy</FmtYMD> <!-- He was born on January 31st, 2006 --> OK
        <FmtYM>&#32;[en|más o menos por el mes de|antes del mes de|después del mes de] MMMM "de" yyyy</FmtYM> <!-- He was born in January 2006 --> ERROR
        <FmtY>&#32;[en|más o menos por el año de|antes del año de|después del año de] yyyy</FmtY> <!-- He was born in 2006 --> OK
        <FmtMD>&#32;[el|aprox. el|antes del|después del] D "de" MMMM</FmtMD> <!-- He was born on January 31st --> OK
</FmtDateNarrative>

I also tried with Decimal Character Codes in HTML Unicode, but it doesn't work too,

 Any suggestion??

 

Thanks,

Hugo.

By EDilena - Saturday, April 21, 2007
I want to thank for your interest in translating my problem.
thank you very much

Eduardo Dilena
By genome - Saturday, April 21, 2007
This appears to be a bug in the GenoPro Report Generator itself, rather than the skin, and so it is somelthing Dan will need to look at.

As you say, you should be able to put any extra text, including the letter d, in quotation marks or apostrophes and indeed this works for FmtYMD and FmtY. The Dictionary contains the comment, from Dan: GenoPro uses the standard date formatting options from the .NET framework. and so I presume the format allowed is as per http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx.

By genome - Saturday, May 19, 2007
Dan, do you have any idea as to when you might be able to fix this bug in the Report Generator date formatting reported by EDilena?

It would appear that in any Date Format Pharase that involves just Year & Month the GenoPro code removes any occurrence of the letter 'd' from it!

So if I have 

<FmtDateRange>
  <FmtYM>[|about |before |after ]MMM yyyy</FmtYM>

I get the report fragment  Bill attended a school full time from about Mar 1895

But if instead I have: 

<FmtDateRange>
  <FmtYM>[|around |before |after ]MMM yyyy</FmtYM>

I get the report fragment  Bill attended a school full time from arounMar 1895 i.e. the 'd' in 'around' and the following space has been removed by GenoPro Report Generator.

This effect seems to occur with any 'd' anywhere in the format string.

This bug will obviously effect language translation to French as well as Spanish and perhaps others too.

As well as the letter 'd' in the approximation strings it should also allow 'd' in quoted strings e.g. MMMM "de" yyyy

By GenoProSupport - Sunday, May 20, 2007
You can always insert quotes inside the square brackets [] or within the template.  I did a few tests and here are the results.  I wonder why your 'd' inside the square brackets inserts the day in the date.

[|around |before |after ]MMM yyyy produces around Dec 2006
[|around |before |after ]'MMM' yyyy produces around MMM 2006
[|around |before |after ]"MMM" yyyy produces around MMM 2006
[|around |before |after ]'"'yyyy produces around "2006
[|around |before |after ]"'"yyyy produces around '2006
[|'around' |before |after ]yyyy produces 'around' 2006
[|"around" |before |after ]yyyy produces "around" 2006
[|around |before |after ]yyyy'D' produces around 2006D
[|around |before |after ]yyyy'd' produces around 2006d
[|around |before |after ]yyyy"D" produces around 2006D
[|around |before |after ]yyyy"d" produces around 2006d

Using the following template

[ondD|aboutdD|beforedD|afterdD] MMMM D, yyyy

I got the following

Harry was born ondD July 31st, 1980.
By EDilena - Monday, May 21, 2007
Sorry, but not work for me.

I have an individual with this date of birthday : 8/1875 (Aug 1875)

With this tag :
<FmtYM>[abcdefghijklmnopqrstuwxyz|around |before |after ]MMM yyyy</FmtYM>

I obtain :
Name was born abcefghijklmnopqrstuwxy Aug 1875.

What happen with the "d" ?
By GenoProSupport - Monday, May 21, 2007
EDilena (5/21/2007)

I obtain :
was born abcefghijklmnopqrstuwxy Aug 1875.

What happen with the "d" ?

I have no idea.  What version of GenoPro are using?  I know it should not change mutch, as the date formatting code was written prior v2.0.0.0, however this could give some hints.  On my machine, the date formatting appear to work fine.

By EDilena - Monday, May 21, 2007
My version is 2.0.0.4
The tag is FmtYM from the FmtDateNarrative Group.


The report is customized.
Maybe i change any relevant data?



By EDilena - Monday, May 21, 2007
Work fine when the date is complete. Ej: 15/8/1875
I obtain :
abcdefghijklmnopqrstuvwxyz Aug 15th, 1875. Ok !

In this case the tag used is FmtYMD


The problem is with the tag : FmtYM when the date is incomplete
Ej: 8/1875
abcefghijklmnopqrstuvwxyz Aug 1875
By fbukolyi - Monday, May 21, 2007
d=day? And if there is no day specified, no d remains :w00t
By genome - Monday, May 21, 2007
Some more evidence for this suspected bug.

Attached is a very simple skin (Config.xml, Dictionary.xml, TestIt.vbs) and a test .gno (TestIt.gno) that demonstrate the problem.

The relevant Dictionary entries are

 <FmtDateNarrative>
  <!-- Templates to format narrative dates -->
  <FmtYMD>&#32;[on|around|before|after] MMMM D, yyyy</FmtYMD>   <!-- He was born on January 31st, 2006 -->
  <FmtYM>&#32;[!dddd"dd"!|around|before|after] MMMM yyyy</FmtYM> <!-- He was born in January 2006 -->
  <FmtY>&#32;[in|around|before|after] yyyy</FmtY>  <!-- He was born in 2006 -->
  <FmtMD>&#32;[on|around|before|after] MMMM D</FmtMD>  <!-- He was born on January 31st -->
 </FmtDateNarrative>

 <!-- Short and long date formats are only taken if day month and year are known, otherwise the default date format is used -->
 <!-- date.ToString("d") -->
 <FmtDateShort>[|~|&lt;|&gt;]yyyy-MM-dd</FmtDateShort>    <!-- 2006-01-31 -->
 <!-- date.ToString("D") -->
 <FmtDateLong>[|around |before |after ]dddd, MMMM D, yyyy</FmtDateLong>   <!-- Monday, January 31st, 2006 -->

 <FmtDateRange>
  <FmtYMD>[|around |before |after ]MMMM D, yyyy</FmtYMD>
  <FmtYM>[|around |before |after ]MMMM yyyy</FmtYM>
  <FmtY>[|around |before |after ]yyyy</FmtY>
  <FmtMD>[|around |before |after ]MMMM D</FmtMD>
  <FmtSince>&#32;from {0}</FmtSince> <!-- eg: "Daniel has been working on GenoPro from 1998" -->
  <FmtUntil>&#32;until {1}</FmtUntil> <!-- eg: "Daniel was a student until 1999" -->
  <FmtFromTo>&#32;from {0} to {1}</FmtFromTo> <!-- eg: "Daniel worked at Microsoft from 1994 to 1998" -->
 </FmtDateRange>

with this script

<%[
For Each i in Individuals
Report.LogWarning i & " born" & i.Birth.Date.ToStringNarrative & "/" & i.Birth.Date.ToString("") & ": died " & i.Death.Date.ToStringNarrative & "/" & i.Death.Date.ToString("") & ". Life Span" & i.Birth.Date.FormatDateSpan(i.Death.Date)
Next
Report.AbortReport
]%>

with the supplied .gno produces

"Month & Year Test" born !""! August 1951/Aug 1951: died !""! April 2002/Apr 2002. Life Span from August 1951 to April 2002

"Approx month & year Test" born aroun August 1951/~~Aug 1951: died aroun April 2002/~~Apr 2002. Life Span from arounAugust 1951 to arounApril 2002

All the 'd's have gone. The double ~ in "~~Aug 1951" and "~~Apr 2002" is also incorrect.

By GenoProSupport - Tuesday, May 22, 2007
Thank you for your patience and for submitting examples.  I have finally found the problem and working on a fix...
By GenoProSupport - Wednesday, May 23, 2007
I created a build at http://www.genopro.com/download/InstallGenoPro.2.0.0.5.DateFix.exe.  I have tested to my best and consider it works, however I would like someone to confirm with me.
By EDilena - Wednesday, May 23, 2007
OK!! Is Fixed!!

Thank you!
By genome - Wednesday, May 23, 2007
Yep, seems fine to me too. Great!
By El Matao - Friday, June 8, 2007
I'm sorry, but the fix is not working well.

I'm using the skin 2.0.0.6, with the fix for the date, and having the following in the Dictionary.xml

 <FmtDateNarrative>
  <!-- Templates to format narrative dates -->
  <FmtYMD>&#32;[el|'alrededor del'|'antes del'|'después del'] d 'de' MMMM 'de' yyyy</FmtYMD>   <!-- Nació el 31 de Enero de 2006 -->
  <FmtYM>&#32;[en|'alrededor de'|'antes de'|'después de'] MMMM  'de' yyyy</FmtYM>  <!-- Nació en Enero de 2006 -->
  <FmtY>&#32;[en|'alrededor de'|'antes de'|'después de'] yyyy</FmtY>   <!-- Nació en 2006 -->
  <FmtMD>&#32;[el|'alrededor del'|'antes del'|'después del'] d 'de' MMMM</FmtMD>  <!-- Nació el 31 de Enero -->
 </FmtDateNarrative>

if we have birth date as: --- We get : ---

7/11/1960     nació el 7 de Noviembre de 1960. (ok)

11/1960        nació en Nov. (? short month and no year)

1960            nació en 1960 (ok)

7/11            nació el .  (? no day, no month, but the incomplete phrase appears)

I get this formatting error in personal an familiar pages (at least I haven't seen it in other places)

Another problem is: If I put a text within single quotes in the format that not contains "d" the text doesn't appear anymore

  <FmtYMD>&#32;['el'|'alrededor del'|'antes del'|'después del'] d 'de' MMMM 'de' yyyy</FmtYMD>   <!-- Nació el 31 de Enero de 2006 -->

with 7/11/1960 --> nació 7 de Noviembre de 1960

Another tip.

in header.htm, perhaps it's worth to change

<img src="images/genopro.logo.gif" title="Create Your Family Tree in Minutes!" alt="Create Your Family Tree in Minutes!" width="36" height="36" border="0"/></a>

to

<img src="images/genopro.logo.gif" title="@[Report.Write Dic("AltGenoProLogo")]@" alt="@[Report.Write Dic("AltGenoProLogo")]@" width="36" height="36" border="0"/></a>

Sorry by my poor English :-)


 

By genome - Tuesday, June 12, 2007
I agree El Matao, there is still a problem with date formatting, but it would appear to be a different issue to the missing 'd' problem.  It seems to be related to the total length of the format string. If I change the standard English string from <FmtYM>&#32;[in|about|before|after] MMMM yyyy</FmtYM> to <FmtYM>&#32;[in|about|before|after a longer phrase here] MMMM yyyy</FmtYM> I get a similar problem to you with just a numeric month appearing instead of month name and year. Wiuth other length strings the year can disappear or I get no date returned at all.

As a further illustration, change your example from <FmtYM>&#32;[en|'alrededor de'|'antes de'|'después de'] MMMM  'de' yyyy</FmtYM> to <FmtYM>&#32;[en|alrededorde|antesde|después de] MMMM 'de' yyyy</FmtYM> produces the required date. I know have also removed a couple of required spaces but it demonstrates the issue with the length of the format string.

I think Dan needs to investigate this further.

By the way, your apostrophes within the [ | | | ] section seem to be superfluous and can be removed.

Thanks for the tip on header.htm, I'll change the skin to include your suggestion.

By GenoProSupport - Tuesday, June 12, 2007
Ron (6/12/2007)
I think Dan needs to investigate this further.

I guess I am missing something. Does having 'd' works?  Can you please elaborate on the problem?  Thanks.

By El Matao - Wednesday, June 13, 2007
Ron

Thank you for your tips, it's true, in the [|||] section does not translate the "d" as day number.

Also you're right, size matters :Wink: (of the formatting string, o course BigGrinSmile, but yes, outside this section we must enclose the d's between apostrophes

Gerardo