Commit Graph

20996 Commits

Author SHA1 Message Date
John Ralls
548507008b GrampsLocale: Ensure correct stdout encoding
Replace stdout with one that uses a transcoding Streamwriter. This
better handles differences between Py2 and Py3 than does trying to
encode strings prior to output. In particular Py3's default stdout
demands unencoded strings and prints byte-strings when one tries to
pre-encode them.

svn: r21695
2013-03-19 18:22:19 +00:00
John Ralls
796b2da855 GrampsLocale: Use glocale.lang or glocale.language[0]
To get the default localization instead of locale.getlocale() or 
glocale.get_translation().language().

svn: r21694
2013-03-19 18:21:58 +00:00
John Ralls
ec787da3fa GrampsLocale: Prevent some AttributeErrors and 'referenced before assignment' errors.
svn: r21693
2013-03-19 18:21:41 +00:00
Paul Franklin
9e8f6aaab6 6542: book report: graphic ancestor or descendant tree reports fail
svn: r21679
2013-03-18 18:54:59 +00:00
Tim G L Lyons
d3a389750f README file. Add PyICU as strongly recommended.
svn: r21675
2013-03-17 14:46:46 +00:00
Nick Hall
71c2655976 Revert change to const.py
svn: r21673
2013-03-17 12:29:17 +00:00
Tim G L Lyons
d643dde344 Standardise messages about missing modules to include problem, consequence and what to do about it (currently including references to GEPS 029 where necessary).
svn: r21671
2013-03-17 11:40:33 +00:00
Paul Franklin
8882527e56 ignore any CLI book report "item" which crashes
svn: r21669
2013-03-16 22:50:41 +00:00
Nick Hall
084b816d5b Add methods used for modal ProgressMeter to CLIDialog
svn: r21666
2013-03-16 21:47:37 +00:00
Nick Hall
c3a58693e3 Add modal option to ProgressMeter
svn: r21663
2013-03-16 19:48:29 +00:00
Jérôme Rapinat
aa609f7587 6195: Import citation for pro-gen file format (patch by keestux)
svn: r21659
2013-03-16 10:26:21 +00:00
Nick Hall
12396e858b 6336: Convert to use DbGUIElement
svn: r21656
2013-03-15 21:02:52 +00:00
Nick Hall
68158b3859 6526: Check for invalid handle
svn: r21653
2013-03-15 16:17:58 +00:00
John Ralls
29292a404a GrampsLocale: Code cleanup
And make sure that setting lang on the GrampsLocale constructor
overrides the languages from the first instance.

svn: r21646
2013-03-14 23:01:09 +00:00
John Ralls
76ef85b43f Plugins: Limit addon translators
Only get an addon translator if the plugin has a locale directory
Prevents pointless warnings, esp. when the translations are in the
main Gramps message file.

svn: r21645
2013-03-14 23:01:03 +00:00
John Ralls
66ded552dd GrampsLocale: Suppress double printing of log messages
Grampsapp.py sets a global handler, so install one only during the first init and remove it when done.

svn: r21644
2013-03-14 23:00:57 +00:00
John Ralls
80ac126dfa GrampsLocale: Fix 2 mistakes from previous commit.
svn: r21641
2013-03-13 00:26:22 +00:00
John Ralls
c25d94b3a7 GrampsLocale: Reduce circular imports
Lets one import grampslocale directly in a test script:
>>> from gramps.gen.utils.grampslocale import GrampsLocale
>>> import os
>>> gl = GrampsLocale(lang='fr_FR.UTF-8', localedir=os.path.join('build', 'mo'))
>>> tr = gl.get_translation().gettext
>>> tr("List of known family trees in your database path\n")
u'Liste des arbres familiaux connus dans votre chemin de base de donn\xe9es\n'

svn: r21640
2013-03-13 00:05:46 +00:00
John Ralls
f270f08be8 GrampsLocale: Better handle invalid/missing locale
svn: r21636
2013-03-12 22:22:58 +00:00
John Ralls
9e844f0d64 MacLocale: Extract function _mac_get_gramps_defaults
And correct line handling on the languages list.

svn: r21635
2013-03-12 22:22:53 +00:00
Nick Hall
7a70853eb5 Fix VERSION_DIR path
svn: r21634
2013-03-12 17:01:21 +00:00
Nick Hall
2299b7fe5d Remove post-install script for linux
svn: r21630
2013-03-12 14:53:14 +00:00
Nick Hall
33e45f9b40 Remove redundant code
svn: r21628
2013-03-12 14:40:27 +00:00
Nick Hall
a6c09ef304 Fix some properties
svn: r21626
2013-03-12 14:24:22 +00:00
John Ralls
33d9b19ac7 GrampsLocale: Ensure that encoding gets set to something
In the C locale, locale.getlocale() returns [None, None]

svn: r21616
2013-03-11 22:44:29 +00:00
John Ralls
29cf6674b5 Install image files to $(prefix)/share/gramps/images
Instead of $(prefix)/share/gramps/icons/hicolor, which was an old (early Gtk2) theming requirement.

svn: r21615
2013-03-11 22:44:23 +00:00
John Ralls
ee639ec7da Move VERSION, VERSION_TUPLE, major_version from const.py to version.py
As noted in the previous change, importing const into setup.py tried to initialize GrampsLocale and ResourcePath, which won't work. Since all we want is the VERSION string, move that to a new file, gramps/version.py

svn: r21614
2013-03-11 22:44:15 +00:00
John Ralls
fa0eb6cebe Determine Paths at Runtime
Uses GRAMPS_RESOURCES to override the root location of the Gramps data files (which would normally be $(prefix)/share).
In setup.py install, writes $(prefix)/share to gen/utils/resource-path, installs that file, then deletes it again from the source tree. The presence or absence determines whether Gramps is running from the source directory or from an installation.

Const.py is now a static file; const.py.in is no longer used. Note that because importing const into setup tried to initialize things that we don't want initialized, VERSION is removed, and imported from gramps.version -- a file which will be added in the next change. Consequently, this commit will not run.

svn: r21613
2013-03-11 22:43:58 +00:00
John Ralls
56e29c162b GrampsLocale: Protect another setlocale instance
svn: r21612
2013-03-11 22:43:52 +00:00
Tim G L Lyons
7055827260 Exportgedcom and importgedcom. 0006382: ADDR tag in GEDCOM export does not contain a full address. On export, all the elements of the structured address are output as ADDR/CONT. On import the structured address takes precedence (as at present), but a warning is only given if an element in the free-form address is missing from the structured address.
svn: r21610
2013-03-11 18:45:09 +00:00
Nick Hall
709eb0ebcd 6237: Suppress Gramps ID in Narrative Web report
svn: r21607
2013-03-10 23:55:08 +00:00
Paul Franklin
55e2863a0b sync a few files in gramps40 and trunk
svn: r21603
2013-03-10 21:51:52 +00:00
John Ralls
b60dbf2782 Grampslocale: Protect from crashes due to passing bad strings to setlocale
svn: r21597
2013-03-09 22:31:13 +00:00
John Ralls
40ff796d93 Mac: Improve language list handling
Make sure that lang overrides the language list only if $LANG is set. Don't add encodings to the language list (e.g., en_US, not en_US.UTF-8). Start collation with None, because `if collation:` is True for collation = "". defaults may have whitespace at the end of "root", so use "startswith".

svn: r21596
2013-03-09 22:31:06 +00:00
John Ralls
068d50cc26 GrampsLocale: Improve handling the language list
Replace "en" with "C" when setting $LANGUAGE ("en" confuses GtkBuilder), and explicitly iterate over languages when finding
the translator, because left to itself gettext will ignore English.

svn: r21595
2013-03-09 22:31:00 +00:00
Paul Franklin
f984692474 slight tweaks to text, add text property
svn: r21594
2013-03-09 17:48:22 +00:00
Jérôme Rapinat
c9698f51e0 typo for handling translated strings
svn: r21589
2013-03-09 12:17:40 +00:00
Jérôme Rapinat
9856e108e6 "os" is not defined
svn: r21588
2013-03-09 12:15:39 +00:00
Paul Franklin
7823280d22 handle CLI pathological case
svn: r21584
2013-03-07 23:30:21 +00:00
Helge Herz
47b8dc8131 Revert of 215589 because of changes in the GTK package for Win
svn: r21581
2013-03-07 23:26:43 +00:00
Nick Hall
a5b4759f40 6128: Reverse bug fix keeping code refactor
svn: r21577
2013-03-07 22:55:23 +00:00
Erik De Richter
5a64a968ff updated nl translation
svn: r21574
2013-03-07 20:15:51 +00:00
Tim G L Lyons
b5dc0630a6 0006507: GEDCOM import: Repositories not imported correctly from FTM for Windows and Heredis
svn: r21571
2013-03-06 17:42:14 +00:00
John Ralls
b262eeaab7 get_unicode_path_from_env_var(): make no-op if it's already unicode
svn: r21561
2013-03-06 01:07:05 +00:00
John Ralls
2dcc870dbc Adapt HTMLRenderer NavigationView init args to new signature
svn: r21560
2013-03-06 01:06:58 +00:00
Helge Herz
dd3bb6122c GEexiv2 vor Python 2.7.3 and Win (see 6464)
svn: r21559
2013-03-05 21:56:09 +00:00
John Ralls
b57e7b7508 GrampsLocale:Move setlocale from _set_from_environment to __init_first_instance
So that encoding is set for Mac as well.

svn: r21554
2013-03-05 17:23:21 +00:00
Paul Franklin
cf4a3aefbd shorten the report name for easier CLI use
svn: r21552
2013-03-05 04:45:57 +00:00
Paul Franklin
78624360cd tweak the default format for the report
svn: r21551
2013-03-05 01:03:25 +00:00
Mirko Leonhäuser
09f276990f updated german translation
svn: r21548
2013-03-04 18:36:19 +00:00