Skip to content

Commit

Permalink
Fixed last broken functional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
strichter committed Jan 13, 2005
1 parent 6f9b2a3 commit f2f400a
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 0 deletions.
128 changes: 128 additions & 0 deletions browser/synchronize.pt
@@ -0,0 +1,128 @@
<html metal:use-macro="context/@@standard_macros/view">
<head>
<title metal:fill-slot="title" i18n:translate="">
Translation Domain - Synchronize
</title>

<style metal:fill-slot="style_slot" type="text/css">
<!--
.state0 {color: green;}
.state1 {color: yellow;}
.state2 {color: yellow;}
.state3 {color: red;}
.state4 {color: red;}
-->
</style>

</head>

<body>
<div metal:fill-slot="body">

<table cols="3" width="100%" border="0" cellspacing="0">
<form action="./" method="post">
<tr>
<td width="40%">
<div class="form-label" i18n:translate="">Server URL</div>
<div>
<input type="text" size="40" name="sync_url" value=""
tal:attributes="value view/sync_url" />
</div>
<div i18n:translate="">Username</div>
<div>
<input type="text" size="40" name="sync_username" value=""
tal:attributes="value view/sync_username" />
</div>
<div i18n:translate="">Password</div>
<div>
<input type="password" size="40" name="sync_password" value=""
tal:attributes="value view/sync_password" />
</div>
</td>
<td width="30%">
<div i18n:translate="">Select Languages:</div>
<div>
<select name="sync_languages:list" size="6" style="width: 80%"
multiple="multiple">
<tal:block repeat="language view/getAllLanguages">
<option value=""
tal:attributes="value language"
tal:content="language"
tal:condition="python: language not in
view.sync_languages" ></option>
<option value="" selected="1"
tal:attributes="value language"
tal:content="language"
tal:condition="python: language in
view.sync_languages" ></option>
</tal:block>
</select>
</div>
</td>
<td width="30%">
<div align="center">
<div>
<input type="submit" name="saveSettings.html:method"
value="Save Settings"
i18n:attributes="value save-settings-button" />
</div><br />
<div>
<input type="submit" name="synchronize.html:method"
value="Synchronize"
i18n:attributes="value synchronize-button"/>
</div>
</div>
</td>
</tr>
</form>
</table>
<br />

<form action="./"
tal:condition="view/canConnect">
<table cols="5" width="95%" border="0" cellpadding="2" cellspacing="0"
class="listing">
<tr>
<th width="16">&nbsp;</th>
<th width="55%" i18n:translate="">Message Id</th>
<th width="15%" i18n:translate="">Language</th>
<th width="20%" i18n:translate="">Status</th>
</tr>
<tal:block repeat="message python: view.queryMessageItems()">
<tr tal:define="number repeat/message/number;
oddrow repeat/message/odd"
tal:attributes="class python: oddrow and 'odd' or 'even'">
<td width="16">
<input type="hidden"
tal:attributes="name python: 'update-msgid-%i' %number;
value python: message[0][0]" />
<input type="hidden"
tal:attributes="name python: 'update-language-%i' %number;
value python: message[0][1]" />
<input type="checkbox" name="message_ids:list"
tal:attributes="value python: number" />
</td>
<td tal:content="python: message[0][0]">Hello World!</td>
<td tal:content="python: message[0][1]">en</td>
<td>
<b tal:content="python: view.getStatus(*message[1])"
tal:attributes="class python:'state%i' %
view.getStatus(message[1][0], message[1][1], 0)"
>status</b>
</td>
</tr>
</tal:block>
</table>
<div>
<input type="submit" name="@@synchronizeMessages.html:method"
value="Update" i18n:attributes="value update-button"/>
</div>
</form>

<p tal:condition="python: not view.canConnect()" i18n:translate="">
No connection could be made to remote data source.
</p>

</div>
</body>
</html>
37 changes: 37 additions & 0 deletions browser/translatemessage.pt
@@ -0,0 +1,37 @@
<html metal:use-macro="context/@@standard_macros/page">
<head>
<title metal:fill-slot="title" i18n:translate="">
Translation Domain - Translate
</title>
</head>

<body>
<div metal:fill-slot="body">

<form action="./" method="post">
<input type="hidden" name="msg_id" value=""
tal:attributes="value request/msgid" />
<table>
<tr>
<th i18n:translate="">Message Id</th>
<td tal:content="request/msgid">Message Id of the message.</td>
</tr>
<tr tal:repeat="language view/getEditLanguages">
<th tal:content="language">Language</th>
<td>
<textarea cols="80" rows="10" name=""
tal:attributes="name string:msg_lang_${language}"
tal:content="python: view.getTranslation(
request['msgid'], language)"
>Translation of Message</textarea>
</td>
</tr>
</table>
<input class="form-element" type="submit"
name="@@editMessage.html:method" value="Edit Message"
i18n:attributes="value" />
</form>

</div>
</body>
</html>

0 comments on commit f2f400a

Please sign in to comment.