--- a/.installed.cfg Fri Oct 05 15:11:29 2018 +0200
+++ b/.installed.cfg Tue Oct 09 16:21:02 2018 +0200
@@ -90,3 +90,27 @@
location = /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/parts/test
recipe = zc.recipe.testrunner
script = /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/bin/test
+
+[buildout]
+installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-file.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/lingua.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-template.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-skin.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-pagelet.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-viewlet.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-i18n.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-catalog.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-form.egg-link
+ /home/tflorac/Dropbox/src/PyAMS/pyams_i18n/develop-eggs/pyams-utils.egg-link
+
+[buildout]
+parts = i18n pyflakes test package
+
+[buildout]
+parts = pyflakes test package i18n
+
+[buildout]
+parts = test package i18n pyflakes
+
+[buildout]
+parts = package i18n pyflakes test
--- a/buildout.cfg Fri Oct 05 15:11:29 2018 +0200
+++ b/buildout.cfg Tue Oct 09 16:21:02 2018 +0200
@@ -72,4 +72,4 @@
eggs = pyams_i18n [test]
[versions]
-pyams_i18n = 0.1.16
+pyams_i18n = 0.1.17
--- a/docs/HISTORY.txt Fri Oct 05 15:11:29 2018 +0200
+++ b/docs/HISTORY.txt Tue Oct 09 16:21:02 2018 +0200
@@ -1,6 +1,10 @@
History
=======
+0.1.17
+------
+ - automatically use request's 'lang' parameter, if given, to extract I18n values
+
0.1.16
------
- keep basename attribute for widgets (initial widget name without lang)
--- a/setup.py Fri Oct 05 15:11:29 2018 +0200
+++ b/setup.py Tue Oct 09 16:21:02 2018 +0200
@@ -27,7 +27,7 @@
README = os.path.join(DOCS, 'README.txt')
HISTORY = os.path.join(DOCS, 'HISTORY.txt')
-version = '0.1.16'
+version = '0.1.17'
long_description = open(README).read() + '\n\n' + open(HISTORY).read()
tests_require = []
--- a/src/pyams_i18n.egg-info/PKG-INFO Fri Oct 05 15:11:29 2018 +0200
+++ b/src/pyams_i18n.egg-info/PKG-INFO Tue Oct 09 16:21:02 2018 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pyams-i18n
-Version: 0.1.16
+Version: 0.1.17
Summary: PyAMS internationalization interfaces and classes
Home-page: http://hg.ztfy.org/pyams/pyams_i18n
Author: Thierry Florac
@@ -11,6 +11,10 @@
History
=======
+ 0.1.17
+ ------
+ - automatically use request's 'lang' parameter, if given, to extract I18n values
+
0.1.16
------
- keep basename attribute for widgets (initial widget name without lang)
--- a/src/pyams_i18n/attr.py Fri Oct 05 15:11:29 2018 +0200
+++ b/src/pyams_i18n/attr.py Tue Oct 09 16:21:02 2018 +0200
@@ -50,7 +50,7 @@
if lang is None:
if request is None:
request = check_request()
- lang = request.locale_name
+ lang = request.params.get('lang') or request.locale_name
return result.get(lang, default)
def query_attribute(self, attribute, lang=None, request=None):
@@ -60,7 +60,7 @@
if lang is None:
if request is None:
request = check_request()
- lang = request.locale_name
+ lang = request.params.get('lang') or request.locale_name
value = result.get(lang)
if not value:
negotiator = query_utility(INegotiator)