summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Fretin <vincent.fretin@gmail.com>2013-03-08 14:19:27 (GMT)
committerVincent Fretin <vincent.fretin@gmail.com>2013-03-08 14:19:27 (GMT)
commit8d12949be1d91a2b3f7fef5c95d7049ded41d149 (patch)
tree5e723b59400ebff0d6d9aa5886df0a2ca8966a93
parent1f04cef0b8afbc0ea7c959dc012070fce0ab45cb (diff)
downloadcollective.contact.widget-8d12949be1d91a2b3f7fef5c95d7049ded41d149.zip
collective.contact.widget-8d12949be1d91a2b3f7fef5c95d7049ded41d149.tar.gz
collective.contact.widget-8d12949be1d91a2b3f7fef5c95d7049ded41d149.tar.bz2
Internationalized two messages
-rw-r--r--CHANGES.rst4
-rw-r--r--src/collective/contact/widget/locales/collective.contact.widget.pot27
-rw-r--r--src/collective/contact/widget/locales/fr/LC_MESSAGES/collective.contact.widget.po24
-rw-r--r--src/collective/contact/widget/widgets.py5
4 files changed, 58 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index b0bba9e..c3ce36e 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -5,7 +5,11 @@ Changelog
1.0 (unreleased)
----------------
+- Internationalized two messages.
+ [vincentfretin]
+
- Don't show tooltip if the mouse left the link.
+ [vincentfretin]
- Don't call tokenToUrl if value is --NOVALUE--.
[vincentfretin]
diff --git a/src/collective/contact/widget/locales/collective.contact.widget.pot b/src/collective/contact/widget/locales/collective.contact.widget.pot
new file mode 100644
index 0000000..908e548
--- /dev/null
+++ b/src/collective/contact/widget/locales/collective.contact.widget.pot
@@ -0,0 +1,27 @@
+# --- PLEASE EDIT THE LINES BELOW CORRECTLY ---
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2013-03-08 14:07+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"Language-Code: en\n"
+"Language-Name: English\n"
+"Preferred-Encodings: utf-8 latin1\n"
+"Domain: collective.contact.widget\n"
+
+#: ../widgets.py:163
+msgid "(nothing)"
+msgstr ""
+
+#: ../widgets.py:113
+msgid "please wait"
+msgstr ""
+
diff --git a/src/collective/contact/widget/locales/fr/LC_MESSAGES/collective.contact.widget.po b/src/collective/contact/widget/locales/fr/LC_MESSAGES/collective.contact.widget.po
new file mode 100644
index 0000000..84dbd7d
--- /dev/null
+++ b/src/collective/contact/widget/locales/fr/LC_MESSAGES/collective.contact.widget.po
@@ -0,0 +1,24 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: collective.contact.widget\n"
+"POT-Creation-Date: 2013-03-08 14:07+0000\n"
+"PO-Revision-Date: 2013-03-08 15:10+0100\n"
+"Last-Translator: Vincent Fretin <vincent.fretin@gmail.com>\n"
+"Language-Team: French\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"Language-Code: en\n"
+"Language-Name: English\n"
+"Preferred-Encodings: utf-8 latin1\n"
+"Domain: collective.contact.widget\n"
+
+#: ../widgets.py:163
+msgid "(nothing)"
+msgstr "(aucune)"
+
+#: ../widgets.py:113
+msgid "please wait"
+msgstr "veuillez patienter"
+
diff --git a/src/collective/contact/widget/widgets.py b/src/collective/contact/widget/widgets.py
index 8e56116..4691d6f 100644
--- a/src/collective/contact/widget/widgets.py
+++ b/src/collective/contact/widget/widgets.py
@@ -1,6 +1,7 @@
from z3c.form.interfaces import IFieldWidget
from z3c.form.widget import FieldWidget
from zope.component import getUtility
+from zope.i18n import translate
from zope.interface import implementer, implements, Interface
from zope.browserpage.viewpagetemplatefile import ViewPageTemplateFile
from five import grok
@@ -78,7 +79,7 @@ $(document).ready(function() {
}
var timeStamp = new Date();
var tooltipCall = function() {
- var tip = $('<div class="tooltip pb-ajax" style="display:none">please wait</div>')
+ var tip = $('<div class="tooltip pb-ajax" style="display:none">%s</div>')
.insertAfter(trigger);
trigger.tooltip({relative: true, position: "center right"});
var tooltip = trigger.tooltip();
@@ -109,7 +110,7 @@ $(document).ready(function() {
z-index: 99999;
}
</style>
-"""
+""" % translate(_(u"please wait"), context=self.request)
class TermViewlet(grok.Viewlet):