From 3e11a430adc4cc36557421d9704aad4d6443b3f7 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Mon, 19 Nov 2012 21:31:21 +0800 Subject: [PATCH] add welcome message --- .../bbb/locale/zh_CN/LC_MESSAGES/django.mo | Bin 2070 -> 2187 bytes .../bbb/locale/zh_CN/LC_MESSAGES/django.po | 57 +++++++++++------- bbb_django/bbb/models.py | 14 ++++- bbb_django/bbb/views/core.py | 1 + 4 files changed, 47 insertions(+), 25 deletions(-) diff --git a/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo b/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo index 3b41aadbfb99dcdcde182cd3b9cb711135c584bd..ba9d796f8d183b70d5051e8b746e48af14e29799 100644 GIT binary patch delta 872 zcmYk)J7`l;9LMpK^tMT@eI#ma>!Y`&AQ%c^7b*RJZhdqE#Mq#;t}h=Y))GL4RcyDzq@4# zbLJz|KuhLx+)i9JKVXu$V(~gEzk^+9;vUq(`Yk?S9eRlPntLr4I;vgG_ZkzS#Xm(O{cR1#3?ecUJ=<+p6I}I&N=dF9F z-EX0?QP)fLseM#kMD0|?3umLJqvNB?AEPfL@!??d%GG=@5YBt4ZkG>&YvWU6{!}g> zG=f6-&fDL4y`JaigF+!U7KCfwa6Em&Kb+2_)63_Zn<5(VVoNU4T6yxgx-$2tJQKc% n4feU!^22JW^lg6j`{J`kaQi`ZVJZ9>OSRXNS63D)Gf&+=yx?$D delta 754 zcmYk)PbdUY9KiA4*cld!wf?PtStW(kw%H43rM+$(l%#Ch11AS3dzKUp4jdIOq&TP* zMan^Oz)2)T+1!-k;QJd-`897o^Zvhi@6DDk2Qzmedr62!QUl4hMA|Ti8uNJ~gSdbj zn8Q+B^oay<4S8gbmxKFgeWZyRf{ilh^0=+;$xU%xNL@Q$Sxb+G@Ti`OV2 zRgm-^aEjh>v8hr|`U|}~T%o@Rc`Mb6r+=;&s?I&l>$N9F##6fiU)FLj?e<_KJu2g= z)MR>METT1T&}nxQ&VWDK6^X^Vqp{sh$7lU^+R7iX+_1m7j6P2XE3ezz&+~IH8#`{& G-|+)yV^3!Q diff --git a/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po b/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po index 8979de7..82a3a90 100644 --- a/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po +++ b/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-04 22:02+0800\n" +"POT-Creation-Date: 2012-11-19 21:11+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,27 +16,39 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: models.py:26 models.py:154 +#: models.py:26 models.py:164 msgid "meeting name" msgstr "会议名称" -#: models.py:27 -msgid "meeting id" -msgstr "会议id" - -#: models.py:28 models.py:155 +#: models.py:27 models.py:165 msgid "attendee password" msgstr "会议密码" -#: models.py:29 models.py:157 +#: models.py:28 models.py:167 msgid "moderator password" msgstr "管理员密码" -#: models.py:171 +#: models.py:29 models.py:169 +msgid "welcome message" +msgstr "欢迎信息" + +#: models.py:35 +msgid "meeting" +msgstr "会议" + +#: models.py:36 +msgid "meetings" +msgstr "会议列表" + +#: models.py:169 +msgid "Welcome!" +msgstr "欢迎!" + +#: models.py:182 msgid "Your name" msgstr "姓名" -#: models.py:172 +#: models.py:183 msgid "password" msgstr "密码" @@ -87,13 +99,12 @@ msgstr "加入会议" #: templates/join.html:11 #, python-format msgid "" -" \"Invite others to this meeting with this URL" +" \"Invite others to this meeting with this URL" msgstr "" -"通过这里的链接邀请其他人参加会" -"议" +"通过这里的链接邀请其他人参加会议" -#: templates/join.html:17 templates/meetings.html:21 +#: templates/join.html:17 templates/meetings.html:20 msgid "Join" msgstr "加入会议" @@ -105,37 +116,37 @@ msgstr "登陆" msgid "view details" msgstr "查看详细信息" -#: templates/meetings.html:17 +#: templates/meetings.html:16 msgid "Running" msgstr "运行中" -#: templates/meetings.html:19 +#: templates/meetings.html:18 msgid "Not running" msgstr "未开始" -#: templates/meetings.html:21 +#: templates/meetings.html:20 msgid "End" msgstr "结束会议" -#: templates/meetings.html:23 +#: templates/meetings.html:22 msgid "Ended" msgstr "已结束" -#: templates/meetings.html:38 +#: templates/meetings.html:37 msgid "There are no meetings at the moment." msgstr "当前没有会议" -#: views/core.py:75 +#: views/core.py:77 #, python-format msgid "Successfully ended meeting %s" msgstr "成功结束会议%s" -#: views/core.py:79 +#: views/core.py:81 #, python-format msgid "Unable to end meeting %s" msgstr "未能结束会议%s" -#: views/core.py:100 +#: views/core.py:103 #, python-format msgid "Successfully created meeting %s" msgstr "成功创建会议%s" diff --git a/bbb_django/bbb/models.py b/bbb_django/bbb/models.py index c28cb76..40210e3 100755 --- a/bbb_django/bbb/models.py +++ b/bbb_django/bbb/models.py @@ -26,6 +26,14 @@ class Meeting(models.Model): name = models.CharField(max_length=100, verbose_name=_('meeting name')) attendee_password = models.CharField(max_length=50, verbose_name=_('attendee password')) moderator_password = models.CharField(max_length=50, verbose_name=_('moderator password')) + welcome = models.CharField(max_length=100, verbose_name=_('welcome message')) + + #def __unicode__(self): + # return self.name + + class Meta: + verbose_name = _('meeting') + verbose_name_plural = _('meetings') @classmethod def api_call(self, query, call): @@ -128,7 +136,8 @@ def start(self): ('attendeePW', self.attendee_password), ('moderatorPW', self.moderator_password), ('voiceBridge', voicebridge), - ('welcome', "Welcome!"), + #('welcome', _("Welcome!").encode('utf8')), + ('welcome', self.welcome.encode('utf8')), )) hashed = self.api_call(query, call) url = settings.BBB_API_URL + call + '?' + hashed @@ -155,8 +164,9 @@ class CreateForm(forms.Form): name = forms.CharField(label=_('meeting name')) attendee_password = forms.CharField(label=_('attendee password'), widget=forms.PasswordInput(render_value=False)) - moderator_password= forms.CharField(label=_('moderator password'), + moderator_password = forms.CharField(label=_('moderator password'), widget=forms.PasswordInput(render_value=False)) + welcome = forms.CharField(label=_('welcome message'), initial=_('Welcome!')) def clean(self): data = self.cleaned_data diff --git a/bbb_django/bbb/views/core.py b/bbb_django/bbb/views/core.py index 95de15b..f83dd6a 100644 --- a/bbb_django/bbb/views/core.py +++ b/bbb_django/bbb/views/core.py @@ -97,6 +97,7 @@ def create_meeting(request): meeting.attendee_password = data.get('attendee_password') meeting.moderator_password = data.get('moderator_password') #meeting.meeting_id = data.get('meeting_id') + meeting.welcome = data.get('welcome') meeting.save() url = meeting.start() msg = _('Successfully created meeting %s') % meeting.name