~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/templates/pofile-translate.pt

[r=sinzui][bug=855670] Add additional checks to the private team
        launchpad.LimitedView security adaptor so more users in defined
        roles can see the team.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html
 
2
  xmlns="http://www.w3.org/1999/xhtml"
 
3
  xmlns:tal="http://xml.zope.org/namespaces/tal"
 
4
  xmlns:metal="http://xml.zope.org/namespaces/metal"
 
5
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
 
6
  metal:use-macro="view/macro:page/searchless"
 
7
  i18n:domain="launchpad"
 
8
>
 
9
  <body>
 
10
    <div metal:fill-slot="head_epilogue">
 
11
    <style>
 
12
    .dismissed, .dismissed a {
 
13
        color: lightgray;
 
14
    }
 
15
    </style>
 
16
 
 
17
    <script type="text/javascript">
 
18
      registerLaunchpadFunction(insertAllExpansionButtons);
 
19
 
 
20
      LPS.use('lp.translations.pofile', function(Y) {
 
21
        Y.on('domready', Y.lp.translations.pofile.initializePOFile);
 
22
      });
 
23
 
 
24
    </script>
 
25
    </div>
 
26
    <div metal:fill-slot="main">
 
27
      <script type="text/javascript"
 
28
            tal:condition="view/translation_group"
 
29
            tal:content="string:var documentation_cookie =
 
30
                            '${view/translation_group/name}' + '_'  +
 
31
                            '${context/language/code}';">
 
32
      </script>
 
33
      <script type="text/javascript"
 
34
            tal:condition="not:view/translation_group"
 
35
            tal:content="string:var documentation_cookie = 'others';">
 
36
      </script>
 
37
 
 
38
        <!-- Documentation links -->
 
39
        <tal:documentation replace="structure view/documentation_link_bubble" />
 
40
 
 
41
      <tal:havepluralforms condition="view/has_plural_form_information">
 
42
 
 
43
        <!-- Search box -->
 
44
        <div style="float: right;">
 
45
        <form id="search_form" method="get" action="+translate">
 
46
          <tal:comment condition="nothing">
 
47
            the hidden elements
 
48
          </tal:comment>
 
49
          <input type="hidden" name="batch" value=""
 
50
                 tal:attributes="value view/size" />
 
51
          <input type="hidden" name="show" value="all" />
 
52
          <label for="search_box">Search:</label>
 
53
          <input id="search_box" type="text" name="search"
 
54
                 title="Enter text to search for"
 
55
                 tal:attributes="value view/search_text" />
 
56
        </form>
 
57
        </div>
 
58
 
 
59
      <!--  Navigation -->
 
60
      <metal:nav-pofile-subpages
 
61
        use-macro="context/@@+translations-macros/nav-pofile-subpages" />
 
62
 
 
63
      <!-- Sharing information -->
 
64
      <div tal:condition="features/translations.sharing_information.enabled">
 
65
        <div id="sharing-information"
 
66
             tal:condition="view/is_sharing">
 
67
          <p tal:define="sharing_pofile view/sharing_pofile;
 
68
                         template sharing_pofile/potemplate">
 
69
            These translations are shared with
 
70
              <a class="sprite package-source"
 
71
                tal:condition="view/is_upstream_pofile"
 
72
                tal:content="template/sourcepackage/displayname"
 
73
                tal:attributes="href template/sourcepackage/fmt:url">
 
74
                apache in Ubuntu Hoary
 
75
              </a><a class="sprite product"
 
76
                tal:condition="not:view/is_upstream_pofile"
 
77
                tal:content="template/productseries/title"
 
78
                tal:attributes="href template/productseries/fmt:url">
 
79
                Evolution trunk
 
80
              </a> template
 
81
              <a tal:attributes="href sharing_pofile/fmt:url"
 
82
                 tal:content="template/name"
 
83
               >evolution-2.2</a>.
 
84
          </p>
 
85
        </div>
 
86
      </div>
 
87
 
 
88
        <!-- View filter and suggestions from alternative language. -->
 
89
        <form method="get" style="text-align: left;" action="+translate">
 
90
          <!-- the hidden elements -->
 
91
          <input type="hidden" name="start" value=""
 
92
                 tal:attributes="value view/start" />
 
93
          <input type="hidden" name="batch" value=""
 
94
                 tal:attributes="value view/size" />
 
95
 
 
96
          <tal:comment tal:replace="nothing">
 
97
            The 'selected' attribute value in next select means basically
 
98
            the following:
 
99
 
 
100
            if request.form['show'] == literalvalue:
 
101
                return 'selected'
 
102
            else:
 
103
                return None
 
104
 
 
105
            Where 'literalvalue' is 'all', 'untranslated' 'fuzzy' or
 
106
            'translated'.
 
107
          </tal:comment>
 
108
 
 
109
            <label>
 
110
              Translating
 
111
              <tal:XXX tal:replace="nothing">
 
112
                # XXX: JeroenVermeulen 2008-06-18 bug=240897: Try doing this
 
113
                # the Zope way, with an interface.
 
114
              </tal:XXX>
 
115
              <select id="show_selector" name="show"
 
116
                      title="Choose which items to show">
 
117
                <option value="all"
 
118
                  tal:attributes="selected
 
119
                  request/htmlform:show/selected/all"
 
120
                  >
 
121
                  all items
 
122
                </option>
 
123
                <option value="untranslated"
 
124
                  tal:attributes="selected
 
125
                  request/htmlform:show/selected/untranslated"
 
126
                  >
 
127
                  untranslated items
 
128
                </option>
 
129
                <option value="translated"
 
130
                  tal:attributes="selected
 
131
                  request/htmlform:show/selected/translated"
 
132
                  >
 
133
                  translated items
 
134
                </option>
 
135
                <option value="new_suggestions"
 
136
                  tal:attributes="selected
 
137
                  request/htmlform:show/selected/new_suggestions"
 
138
                  >
 
139
                  items with new suggestions
 
140
                </option>
 
141
                <option value="changed_in_ubuntu"
 
142
                  tal:attributes="selected
 
143
                  request/htmlform:show/selected/changed_in_ubuntu"
 
144
                  >
 
145
                  items changed in Ubuntu
 
146
                </option>
 
147
              </select>
 
148
            </label>
 
149
            <label> using
 
150
              <tal:comment replace="nothing">
 
151
                Suggestions from this alternative language will be displayed
 
152
                as well as suggestions from the translation language. In the
 
153
                case where two languages are very similar it will often be
 
154
                useful to show the second language as a source of suggestions
 
155
                when translating into the first.
 
156
              </tal:comment>
 
157
              <tal:language-widget
 
158
                content="structure view/alternative_language_widget" />
 
159
                as a guide.</label>
 
160
          <input type="hidden" name="old_show" value=""
 
161
            tal:attributes="value view/show" />
 
162
          <input type="submit" value="Change" />
 
163
        </form>
 
164
 
 
165
        <!-- The translation form. -->
 
166
        <tal:block condition="not:view/batchnav/currentBatch">
 
167
          <div class="documentDescription">
 
168
            There are no messages that match this filtering.
 
169
          </div>
 
170
        </tal:block>
 
171
 
 
172
        <tal:block condition="view/batchnav/currentBatch">
 
173
          <form method="POST" action="">
 
174
            <!-- the hidden elements -->
 
175
            <input type="hidden" name="show" value=""
 
176
                   tal:attributes="value view/show" />
 
177
            <input type="hidden" name="start" value=""
 
178
                   tal:attributes="value view/start" />
 
179
            <input type="hidden" name="batch" value=""
 
180
                   tal:attributes="value view/size" />
 
181
            <input type="hidden" name="lock_timestamp" value=""
 
182
                   tal:condition="view/form_is_writeable"
 
183
                   tal:attributes="value view/lock_timestamp/isoformat" />
 
184
            <table class="listing" style="margin-top: 0.5em;">
 
185
              <thead>
 
186
                <tr class="results">
 
187
                  <td colspan="5">
 
188
                    <!-- Paging doodads. -->
 
189
                    <tal:navigation replace="structure view/batchnav/@@+navigation-links-upper" />
 
190
                  </td>
 
191
                </tr>
 
192
              </thead>
 
193
              <tbody class="greater" id="messages_to_translate">
 
194
                <tal:loop repeat="translationmessage_view view/translationmessage_views">
 
195
                  <div tal:replace="structure translationmessage_view" />
 
196
                </tal:loop>
 
197
                <tr tal:condition="view/form_is_writeable">
 
198
                  <td colspan="4">
 
199
                    Translated so far:
 
200
                    <tal:completeness replace="view/completeness" />
 
201
                  </td>
 
202
                  <td style="text-align: right;">
 
203
                    <input type="submit"
 
204
                           name="submit_translations"
 
205
                           id="save_and_continue_button"
 
206
                           value="Save &amp; Continue"
 
207
                    />
 
208
                  </td>
 
209
                </tr>
 
210
              </tbody>
 
211
            </table>
 
212
          </form>
 
213
 
 
214
          <!-- Paging doodads. -->
 
215
          <tal:navigation
 
216
            replace="structure view/batchnav/@@+navigation-links-lower" />
 
217
        </tal:block>
 
218
        <tal:status replace="structure context/@@+access" />
 
219
        <tal:contributors replace="structure context/@@+contributors" />
 
220
      </tal:havepluralforms>
 
221
      <metal:pofile-js-footer
 
222
        use-macro="context/@@+translations-macros/pofile-js-footer" />
 
223
    </div>
 
224
  </body>
 
225
</html>