John Ralls
1f38fd43f5
[r21694]GrampsLocale: Use glocale.lang or glocale.language[0]
...
To get the default localization instead of locale.getlocale() or
glocale.get_translation().language().
svn: r21698
2013-03-19 18:34:11 +00:00
John Ralls
38cc711bde
[r21693]GrampsLocale: Prevent some AttributeErrors
...
and 'referenced before assignment' errors.
svn: r21697
2013-03-19 18:33:31 +00:00
Nick Hall
738c95dedc
Revert change to const.py
...
svn: r21672
2013-03-17 12:29:04 +00:00
Tim G L Lyons
820816f409
Standardise messages about missing modules to include problem, consequence and what to do about it (currently including references to GEPS 029 where necessary).
...
svn: r21670
2013-03-17 11:40:08 +00:00
John Ralls
0e195c04c8
[r21646]GrampsLocale: Code cleanup
...
And make sure that setting lang on the GrampsLocale constructor
overrides the languages from the first instance.
svn: r21650
2013-03-14 23:08:06 +00:00
John Ralls
6e525893bd
[r21645]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: r21649
2013-03-14 23:07:59 +00:00
John Ralls
e4202098b7
[r21644]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: r21648
2013-03-14 23:07:47 +00:00
John Ralls
2629bf3dee
[r21640]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: r21647
2013-03-14 23:07:40 +00:00
John Ralls
0fda971b4c
[r21636]GrampsLocale: Better handle invalid/missing locale
...
svn: r21639
2013-03-12 22:33:28 +00:00
John Ralls
651b3776f0
[r21635]MacLocale: Extract function _mac_get_gramps_defaults
...
And correct line handling on the languages list.
svn: r21638
2013-03-12 22:33:22 +00:00
John Ralls
cfea1e98dc
GrampsLocale: Correct some differences with trunk
...
Thanks to Paul Franklin for pointing these out.
svn: r21637
2013-03-12 22:33:16 +00:00
Nick Hall
901ec7dc5c
Fix VERSION_DIR path
...
svn: r21633
2013-03-12 17:01:13 +00:00
Nick Hall
13bb98be10
Remove redundant code
...
svn: r21627
2013-03-12 14:40:18 +00:00
John Ralls
553d82ba34
[r21616]GrampsLocale: Ensure that encoding gets set to something
...
In the C locale, locale.getlocale() returns [None, None]
svn: r21621
2013-03-11 22:54:43 +00:00
John Ralls
13a49a63ff
[r21614]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: r21619
2013-03-11 22:54:31 +00:00
John Ralls
3a73837dc9
[r21613]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: r21618
2013-03-11 22:54:20 +00:00
John Ralls
3490ebc684
[r21612]GrampsLocale: Protect another setlocale instance
...
svn: r21617
2013-03-11 22:54:11 +00:00
Paul Franklin
af3e34fef5
sync a few files in gramps40 and trunk
...
svn: r21604
2013-03-10 21:52:07 +00:00
John Ralls
1a5ad3b6f7
[r21597]Grampslocale: Protect from crashes due to passing bad strings to
...
setlocale
svn: r21600
2013-03-09 22:38:05 +00:00
John Ralls
a323c33c30
[r21596]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: r21599
2013-03-09 22:38:00 +00:00
John Ralls
5ecdde56f4
[r21595]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: r21598
2013-03-09 22:37:54 +00:00
Jérôme Rapinat
61046f3b75
"os" is not defined
...
svn: r21587
2013-03-09 10:25:10 +00:00
Nick Hall
c861968fd3
6128: Reverse bug fix keeping code refactor
...
svn: r21576
2013-03-07 22:54:58 +00:00
John Ralls
992b161798
[r21561]get_unicode_path_from_env_var(): make no-op if it's already unicode
...
svn: r21563
2013-03-06 01:12:07 +00:00
John Ralls
7e749a9e25
[r21554]GrampsLocale:Move setlocale from _set_from_environment to
...
__init_first_instance
So that encoding is set for Mac as well.
svn: r21555
2013-03-05 17:26:00 +00:00
Paul Franklin
2828211c6a
6494: svn_revision module ignores translated SVN stdout value for "exported"
...
svn: r21547
2013-03-04 05:12:53 +00:00
Paul Franklin
bf67b3e114
skip error msg if no file exists
...
svn: r21545
2013-03-04 00:42:39 +00:00
John Ralls
d01f7bf7df
[r21540]GrampsLocale: Add _win_bindtextdomain
...
Adapted from init_windows_gettext in Gramps3.
Libintl-8.dll must be on the path, just like all of the other C-library
dependencies.
svn: r21543
2013-03-03 23:59:44 +00:00
John Ralls
1d2b143be9
[r21539]GrampsLocale: Restore setlocale, add GrampsLocale.encoding
...
encoding to replace translation().info()['encoding'] which isn't
the encoding we're looking for.
svn: r21542
2013-03-03 23:59:39 +00:00
Josip Pisoj
8ea29ede81
win32 fix
...
svn: r21529
2013-03-03 00:08:15 +00:00
John Ralls
4ca0c9f8c9
[r21526]GrampsLocale: Create GrampsTranslation attribute for language
...
Rather than relying on translators to correctly fill out po files
svn: r21528
2013-03-02 20:28:57 +00:00
John Ralls
5a8a7479dd
[r21525]GrampsLocale: Fix glocale without import
...
svn: r21527
2013-03-02 20:28:49 +00:00
Tim G L Lyons
c3f39e7d40
0005058: Note reference on Attribute for individual is not filtered on Export. Fixed many other note references that are not filtered out.
...
svn: r21523
2013-03-02 19:30:02 +00:00
Jérôme Rapinat
62475bbc87
6500: relative import
...
svn: r21520
2013-03-02 14:56:13 +00:00
Jérôme Rapinat
a33eb1d799
6500: missing glocale
...
svn: r21519
2013-03-02 14:54:29 +00:00
Tim G L Lyons
98fa69b717
0003428: When running with pythonw.exe, Windows may crash if you write to stdout. Some more print statements changed to log.warning.
...
svn: r21511
2013-03-01 13:12:29 +00:00
John Ralls
e1fb1c5b14
[r21501]RelationshipCalculator: Promote no translation message to warning
...
And make it more specific.
Thanks to Tim Lyons.
svn: r21505
2013-02-28 20:09:18 +00:00
Serge Noiraud
7541dd5b2e
Bug #06459 : change the lock strategy and split transactions in Merge citation.
...
svn: r21504
2013-02-28 19:57:35 +00:00
John Ralls
d704d9ac4b
[r21491]MacLocale: Handle AppleCollationOrder returning "root"
...
svn: r21499
2013-02-28 19:23:04 +00:00
John Ralls
d334e0043f
[r21490]MacLocale: Allow $LANG to override defaults settings
...
For currency, calendar, and collation
svn: r21498
2013-02-28 19:22:55 +00:00
John Ralls
dede164e69
[r21489]GrampsLocale: Handle errors in getting collation key from locale module
...
svn: r21497
2013-02-28 19:22:43 +00:00
John Ralls
f309f210d1
[r21488]GrampsLocale: Restore call to locale.bindtextdomain() for GtkBuilder
...
Apparently some Linuxes require it for GtkBuilder to find the localization files. It's not supported on Win32, though, so don't try in that case.
svn: r21496
2013-02-28 19:22:35 +00:00
John Ralls
ebe1d0139c
[r21487]GrampsLocale: Set collation, currency, and calendar to lang
...
only on secondary locale objects.
svn: r21495
2013-02-28 19:22:27 +00:00
John Ralls
ebcd0bb119
[r21486]GrampsLocale: Use absolute address for importing grampslocale
...
so that it works from outside of Gramps itself, in particular gramps-addons/contrib/make.py
svn: r21494
2013-02-28 19:22:21 +00:00
John Ralls
fc8eb4f445
[r21485]GrampsLocale: Fix get_addon_translator path
...
Add the locale subdirectory.
Also clean out some cruft left over from the old implementation.
svn: r21493
2013-02-28 19:22:14 +00:00
Helge Herz
357eb8af19
Python less 3.x uses GdkPixbuf.new_subpixbuf instead dkPixbuf.subpixbuf issue 6487
...
svn: r21476
2013-02-27 22:21:10 +00:00
John Ralls
114a71c13c
[r21451]GrampsLocale: Remove all calls to locale.setlocale and locale.bindtextdomain
...
svn: r21456
2013-02-26 00:24:13 +00:00
John Ralls
b126aa1fc3
[r21447]ConfigManager: Ensure key files are loaded and saved as utf-8
...
svn: r21452
2013-02-26 00:23:10 +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
Peter Landgren
c8254b1c68
Fixed a typo, two " was missing.
...
svn: r21432
2013-02-24 15:27:54 +00:00