Talk:Translation environment4

From Gramps
Jump to: navigation, search
  • shell
$ ./genpot.sh 
  • python for xgettext
$ python update_po.py -p 
  • perl and intltool
$ intltool-update -p 
genpot.sh ; XGETTEXT_ARGS='--keyword=_T_ --keyword=trans_text' update_po.py -p ; xgettext intltool ; intltool-update 0.50.2
Differences Added

msgid "window1" msgid "window2"

Missing

msgid "(Preferred) forename missing" msgid "(Preferred) surname missing" msgid "(Preferred) title missing" msgid "0 days" msgid "Adopted abbreviation|adop." msgid "Adult Christening abbreviation|a.chr." msgid "Age at death" msgid "Age at marriage" msgid "Age when first child born" msgid "Age when last child born" msgid "Already dead" msgid "Alternate Marriage abbreviation|alt.mar." msgid "Annulment abbreviation|annul." msgid "Baptism abbreviation|bap." msgid "Bar Mitzvah abbreviation|bar." msgid "Bat Mitzvah abbreviation|bat." msgid "Birth missing" msgid "Birth month" msgid "Birth year" msgid "Blessing abbreviation|bles." msgid "Burial abbreviation|bur." msgid "Cause Of Death abbreviation|d.cau." msgid "Census abbreviation|cens." msgid "Children missing" msgid "Christening abbreviation|chr." msgid "Confirmation abbreviation|conf." msgid "Couple with most children" msgid "Cremation abbreviation|crem." msgid "Custom abbreviation|cust." msgid "Date(s) missing" msgid "Death month" msgid "Death year" msgid "Degree abbreviation|deg." msgid "Divorce Filing abbreviation|div.f." msgid "Divorce abbreviation|div." msgid "Education abbreviation|edu." msgid "Elected abbreviation|elec." msgid "Emigration abbreviation|em." msgid "Endnotes" msgid "Engagement abbreviation|engd." msgid "Event type" msgid "Events missing" msgid "First Communion abbreviation|f.comm." msgid "Forename" msgid "Gender unknown" msgid "Graduation abbreviation|grad." msgid "Immigration abbreviation|im." msgid "Living couple married most long ago" msgid "Living couple married most recently" msgid "Longest past marriage" msgid "Marriage Banns abbreviation|m.ban." msgid "Marriage Contract abbreviation|m.con." msgid "Marriage License abbreviation|m.lic." msgid "Marriage Settlement abbreviation|m.set." msgid "Marriage place" msgid "Medical Information abbreviation|medinf." msgid "Military Service abbreviation|milser." msgid "My Birthday Report" msgid "My Calendar" msgid "Naturalization abbreviation|nat." msgid "Nobility Title abbreviation|nob." msgid "Number of Marriages abbreviation|n.o.mar." msgid "Number of children" msgid "Number of relationships" msgid "Occupation abbreviation|occ." msgid "Oldest father" msgid "Oldest living person" msgid "Oldest mother" msgid "Ordination abbreviation|ord." msgid "Person died at oldest age" msgid "Person died at youngest age" msgid "Person divorced at oldest age" msgid "Person divorced at youngest age" msgid "Person married at oldest age" msgid "Person married at youngest age" msgid "Personal information missing" msgid "Place missing" msgid "Probate abbreviation|prob." msgid "Produced with Gramps" msgid "Property abbreviation|prop." msgid "Religion abbreviation|rel." msgid "Residence abbreviation|res." msgid "Retirement abbreviation|ret." msgid "Shortest past marriage" msgid "Still alive" msgid "Unknown abbreviation|unkn." msgid "Will abbreviation|will." msgid "Youngest father" msgid "Youngest living person" msgid "Youngest mother" msgid "age|about" msgid "between" msgid "birth abbreviation|b." msgid "death abbreviation|d." msgid "ex-husband" msgid "ex-wife" msgid "female,civil union|former partner" msgid "female,civil union|partner" msgid "female,unknown relation|former partner" msgid "female,unknown relation|partner" msgid "gender unknown,civil union|former partner" msgid "gender unknown,civil union|partner" msgid "gender unknown,unknown relation|former partner" msgid "gender unknown,unknown relation|partner" msgid "gender unknown,unmarried|ex-spouse" msgid "gender unknown,unmarried|spouse" msgid "gender unknown|ex-spouse" msgid "gender unknown|spouse" msgid "less than" msgid "less than %s years" msgid "less than about" msgid "male,civil union|former partner" msgid "male,civil union|partner" msgid "male,unknown relation|former partner" msgid "male,unknown relation|partner" msgid "marriage abbreviation|m." msgid "more than" msgid "more than about" msgid "person|Title" msgid "unmarried|ex-husband" msgid "unmarried|ex-wife" msgid "unmarried|husband" msgid "unmarried|wife"

Where? gui/glade/tipofday.glade

gui/glade/grampletpane.glade

gramps/plugins/drawreport/statisticschart.py

gramps/gen/lib/date.py gramps/gen/lib/eventtype.py gramps/plugins/lib/librecords.py gramps/gen/relationship.py

Causes
  • _T_() on: gramps/plugins/drawreport/statisticschart.py, gramps/gen/lib/eventtype.py, gramps/plugins/lib/librecords.py
  • trans_text() on: gramps/gen/lib/date.py, gramps/gen/relationship.py

Output

python interface for xgettext displays the line number on glade files (source). shell interface is using C headers (.h).

Something around default values for XGETTEXT_ARGS, which I cannot understand yet.

To provide the line number on source is more useful for translators and devs, than temp C headers. Python interface still uses a workaround for some gettext versions, which generates the same problem but wit less effects. I suppose this can be removed soon.

  • python3 and brace-format

eg, on commit [40da518]

#: ../gramps/plugins/drawreport/fanchart.py:740
#, python-format
msgid "The style used for the text display of generation %d"
msgid "The style used for the text display of generation "
p.set_description(_('The style used for the text display of generation ' + "%d" % i))

See also 9328.