Commit Graph

20967 Commits

Author SHA1 Message Date
Jérôme Rapinat
4a23da9500 quick test and update on the french translation
svn: r21442
2013-02-25 14:02:33 +00:00
Jérôme Rapinat
73cdf3d86f update template
svn: r21441
2013-02-25 13:45:25 +00:00
Jérôme Rapinat
d24586eb34 update translation strings index
svn: r21440
2013-02-25 13:39:56 +00:00
Jérôme Rapinat
158a5f93fb 6283: Re-enable optimization flag (-O) for python
svn: r21439
2013-02-25 07:26:36 +00:00
John Ralls
7ff24aa9d1 [r21436]Work around lack of locale.LC_MESSAGES on some Windows pythons
svn: r21437
2013-02-24 17:41:31 +00:00
John Ralls
bb2bcc4185 Fix missed cuni() in save.
svn: r21434
2013-02-24 16:42:58 +00:00
Peter Landgren
c8254b1c68 Fixed a typo, two " was missing.
svn: r21432
2013-02-24 15:27:54 +00:00
Nick Hall
8d06298921 6408: python3 fix
svn: r21431
2013-02-24 13:53:15 +00:00
Paul Franklin
4621970783 revert to the old report name
svn: r21428
2013-02-24 08:39:51 +00:00
Paul Franklin
123a6e0ecf sync gramps40 to trunk (two places)
svn: r21426
2013-02-24 06:06:42 +00:00
John Ralls
3d0fa7a00a Fix Py2 file encoding errors
svn: r21424
2013-02-24 01:49:24 +00:00
John Ralls
400523c7f3 [r21326] GrampsLocale: Correct setting GrampsLocale.languages
Test only first 5 or first 2 characters of the language id against the
list of available translations.

Thanks to Tim Lyons for exposing the error.

svn: r21423
2013-02-24 01:49:15 +00:00
John Ralls
0bbbc76852 [r21287] GrampsLocale: Allow for importing older PyICU packages
svn: r21422
2013-02-24 01:49:07 +00:00
John Ralls
252d2932df [r21282]GrampsLocale: Fix creation of second GrampsLocale
svn: r21421
2013-02-24 01:49:01 +00:00
John Ralls
bffb6767aa [r21281] grampslocale: Pretty up the log messages.
svn: r21420
2013-02-24 01:48:42 +00:00
John Ralls
0c07855f37 [r21280]grampslocale.py: Protect against C.UTF-8 not being installed
svn: r21419
2013-02-24 01:48:29 +00:00
John Ralls
088c97106f [r21279]relationship.py: Fix not registering "en_GB" as english.
Also replace diagnostic print with proper logging.

svn: r21418
2013-02-24 01:48:24 +00:00
John Ralls
bfa28faf55 [r21276]Handle junk at the end of revision strings
svn: r21417
2013-02-24 01:48:16 +00:00
John Ralls
8222d4c04c [r21275]GrampsLocale: Replace locale functions
locale.strcoll, locale.strxfrm, and conv*_tosrtkey

With GrampsLocale.sort_key (for strxfrm and conv*_tosrtkey) and
GrampsLocale.strcoll.

If ICU is available will use the correct ICU::Collator for the locale,
otherwise falls back to locale.strxfrm -- for which it temporarily
changes the LC_COLLATE locale.

svn: r21416
2013-02-24 00:55:46 +00:00
John Ralls
879c48f57d [r21274]GrampsLocale: Introduce new GrampsLocale attributes
currency, calendar, and collate

svn: r21415
2013-02-24 00:55:32 +00:00
John Ralls
7127f8f2da [r21273] GrampsLocale: Directly set glocale attributes
... in maclocale.mac_setup_localization()

svn: r21414
2013-02-24 00:55:23 +00:00
John Ralls
db9daced3c [r21272]GrampsLocale: Extract function __init_from_environment
svn: r21413
2013-02-24 00:55:13 +00:00
John Ralls
c42cb6beee [r21271] Add modules for ICU
svn: r21412
2013-02-24 00:55:06 +00:00
John Ralls
efa53a0537 [r21236]GrampsLocale: Replace use of get_language_string
... with GrampsLocale.get_language_dict

Permits sorting by localized language name.
Also hides the language code, which the user doesn't really care about.
Removes get_language_string from libtranslate.py, no longer needed.

svn: r21411
2013-02-24 00:54:56 +00:00
John Ralls
bbf16cb40c [r21235]GrampsLocale: Use module-specific logger for grampslocale.py
Fixes double-logging problem reported by Tim Lyons.

svn: r21410
2013-02-24 00:54:40 +00:00
John Ralls
d62ff6059e [r21182]GrampsLocale: Restructure so for multiple GrampsLocale objects
Only the first dependent upon the environment. All may be created with
parameters which override environment variables or OS settings. See the
GrampsLocale docstring for details.

svn: r21409
2013-02-24 00:54:35 +00:00
John Ralls
f3361500c0 [r21181]relationship.py: Remove unused import
svn: r21408
2013-02-24 00:54:26 +00:00
John Ralls
df1157e9d4 [r21180]Fix platform detection on OSX
'darwin' is returned by sys.platform, not os.name.

svn: r21407
2013-02-24 00:54:18 +00:00
John Ralls
11ad512f2d [r21179]Fix undefined variable reference, make separate not-loaded
warning

Thanks to Pat Lefebre for reporting the error.

svn: r21406
2013-02-24 00:54:04 +00:00
John Ralls
fd559d0d80 [r21170]GrampsLocale: Convert some late-added translations to
GRAMPS_LOCALE

svn: r21405
2013-02-24 00:53:58 +00:00
John Ralls
7a894d9a41 [r21168]GrampsLocale: get_relationship_calculator: Fix missed variable
name change.

svn: r21404
2013-02-24 00:53:47 +00:00
John Ralls
b6b3fb8680 [r21156]Descendant Report: Fix changed Sort function name
svn: r21403
2013-02-24 00:53:37 +00:00
John Ralls
755b653925 [r21154]Import get_svn_revision into const.py
via const.py.in, of course

svn: r21402
2013-02-24 00:53:29 +00:00
John Ralls
592f68ab6e [r21153]PdfDocGen: Report cause of failure on all exceptions
not just file open ones. Expat can raise exceptions too!

svn: r21401
2013-02-24 00:53:20 +00:00
John Ralls
0986d69429 [r21152]GrampsLocale: Fix file encoding error in recentfiles
Expat wants a binary file, not a string file.

svn: r21400
2013-02-24 00:53:11 +00:00
John Ralls
98898ddb71 [r21151]GrampsLocale: Get the language code from the global translation
Instead of probing locale.getlocale() and environment variables

svn: r21399
2013-02-24 00:52:59 +00:00
John Ralls
8cbba85cf1 [r21150]GrampsLocale: Use the codeset from the singleton translation
Instead of locale.getlocale() or locale.nl_langinfo

svn: r21398
2013-02-24 00:52:48 +00:00
John Ralls
c01846fb84 [r21149]Fix some file resource leaks
I.e., files left open when the opening function exits. This is
a PyDebug warning.

svn: r21397
2013-02-24 00:52:35 +00:00
John Ralls
fccfdecd03 [r21148]GrampsLocale: Simplify the file-finding functions
Making use of the fact that GrampsLocale now knows what
encoding to use, and noting that filesystems don't use
more than one encoding to write filenames in directories.

Also specify the encoding on some more files

svn: r21396
2013-02-24 00:52:26 +00:00
John Ralls
3f408af0fa [r21147][Bug 6364] Fix file-opening failures due to unicode content.
svn: r21395
2013-02-24 00:52:07 +00:00
John Ralls
8cea2e239a [r21146]GrampsLocale: Replace calls to sys.getfilesystemencoding
On MSWin and OSX, this call always returns the correct
value (utf-8 on OSX, 'mbcs' on MSWin), but on Linux the
return value is bizarrely dependent upon the environment.

Replace it with a GrampsLocale function which returns 'utf-8'
(the correct value for most Linux file systems) regardless of
the environment.

Also replace its use in print and write functions: It's the
encoding of paths in the filesystem, not of the files's content,
nor of the terminal's capabilities. The former is almost
always utf-8 as long as we write the file, the latter is
given by sys.stdout.encoding. Use the 'backslashreplace' error
handler to avoid exceptions when we need to output unicode
text to an ASCII terminal.

svn: r21394
2013-02-24 00:51:57 +00:00
John Ralls
221c30976f [r21145][Bug 6222]: Get the addons language list from the primary
GrampsLocale instance.

svn: r21393
2013-02-24 00:51:38 +00:00
John Ralls
e28e114c95 [r21144]GrampsLocale: Remove ggettext
svn: r21392
2013-02-24 00:51:17 +00:00
John Ralls
3788d52107 [r21143]Localization: Re-implement localization as a class, GrampsLocale
GrampsLocale is effectively a singleton: An instance is created in
const.py and retrieved everywhere.

Translations are provided via Translations classes, which are derived
from GNUTranslations and NullTranslations to provide extra functions
like sgettext.

svn: r21391
2013-02-24 00:46:03 +00:00
John Ralls
740c7036d7 [r21142]Rename trans.py and mactrans.py to grampslocale.py and
maclocale.py

Reflecting discussion on gramps-devel about their affecting more than
just translations.

Provide for a master GrampsLocale instance to be retrieved from
const.py, set by grampsapp.

svn: r21390
2013-02-24 00:45:50 +00:00
Nick Hall
eeaf8697f0 6408: Display GExiv2 version rather than pyexiv2 version
svn: r21389
2013-02-23 23:36:23 +00:00
Nick Hall
3fabbe1ecb 6408: Convert Metadata Viewer from pyexiv2 to GExiv2. Move Edit Exif Metadata gramplet into gramps-addons.
svn: r21387
2013-02-23 21:11:29 +00:00
Helge Herz
d10d572002 see issue 0006464
svn: r21384
2013-02-23 12:42:24 +00:00
John Ralls
3d0fa69bd0 ImportGedcom: Fix Python3 "dictionary changed size during iteration" errors
svn: r21380
2013-02-19 22:11:35 +00:00
John Ralls
a84d51d6b7 Import ProGen: Use python3 print syntax
svn: r21379
2013-02-19 22:11:29 +00:00