Commits

Andriy Kornatskyy committed 8898f1c

Updated public demo with date of birth formatting per locale

Comments (0)

Files changed (5)

demos/public/Makefile

 
 po:
 	xgettext --join-existing --sort-by-file --omit-header \
-		-o i18n/membership.po src/membership/**/*.py
+		--language=Python \
+		-o i18n/membership.po src/membership/**/*.py \
+		content/templates/membership/*.html
 	cp i18n/membership.po i18n/en/LC_MESSAGES
 	cp i18n/validation.po i18n/en/LC_MESSAGES
 	for l in `ls --hide *.po i18n`; do \

demos/public/content/templates/membership/signup.html

                 ${account.account_type.error()}
                 </p>
                 <p>
-                ${registration.date_of_birth.label('Date of birth (YYYY/MM/DD):')}
-                ${registration.date_of_birth.textbox(autocomplete='off')}
+                ${registration.date_of_birth.label(_('Date of birth (YYYY/MM/DD):'))}
+                ${registration.date_of_birth.format(_('YYYY/MM/DD')).textbox(autocomplete='off')}
                 ${registration.date_of_birth.error()}
                 </p>
                 <p>

demos/public/i18n/en/LC_MESSAGES/membership.po

 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#: content/templates/membership/signup.html:40
+msgid "Date of birth (YYYY/MM/DD):"
+msgstr "Date of birth (YYYY/MM/DD):"
+
+#: content/templates/membership/signup.html:41
+msgid "YYYY/MM/DD"
+msgstr "%Y/%m/%d"
+
 #: src/membership/service/bridge.py:29 src/membership/service/bridge.py:30
 msgid "Favorite number"
 msgstr "Favorite number"

demos/public/i18n/membership.po

 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#: content/templates/membership/signup.html:40
+msgid "Date of birth (YYYY/MM/DD):"
+msgstr "Date of birth (YYYY/MM/DD):"
+
+#: content/templates/membership/signup.html:41
+msgid "YYYY/MM/DD"
+msgstr "%Y/%m/%d"
+
 #: src/membership/service/bridge.py:29 src/membership/service/bridge.py:30
 msgid "Favorite number"
 msgstr "Favorite number"

demos/public/i18n/ru/LC_MESSAGES/membership.po

 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#: content/templates/membership/signup.html:40
+msgid "Date of birth (YYYY/MM/DD):"
+msgstr "День рождения (ДД.ММ.ГГГГ):"
+
+#: content/templates/membership/signup.html:41
+msgid "YYYY/MM/DD"
+msgstr "%d.%m.%Y"
+
 #: src/membership/service/bridge.py:28
 msgid "Favorite number"
 msgstr "Любимое число"