Show More
@@ -38,7 +38,7 b' from pylons.controllers import WSGIContr' | |||||
38 | from pylons.controllers.util import redirect |
|
38 | from pylons.controllers.util import redirect | |
39 | from pylons.i18n import translation |
|
39 | from pylons.i18n import translation | |
40 | # marcink: don't remove this import |
|
40 | # marcink: don't remove this import | |
41 |
from pylons.templating import render_mako as |
|
41 | from pylons.templating import render_mako, pylons_globals, literal, cached_template | |
42 | from pylons.i18n.translation import _ |
|
42 | from pylons.i18n.translation import _ | |
43 | from webob.exc import HTTPFound |
|
43 | from webob.exc import HTTPFound | |
44 |
|
44 | |||
@@ -65,6 +65,32 b' from rhodecode.model.settings import Vcs' | |||||
65 | log = logging.getLogger(__name__) |
|
65 | log = logging.getLogger(__name__) | |
66 |
|
66 | |||
67 |
|
67 | |||
|
68 | # hack to make the migration to pyramid easier | |||
|
69 | def render(template_name, extra_vars=None, cache_key=None, | |||
|
70 | cache_type=None, cache_expire=None): | |||
|
71 | """Render a template with Mako | |||
|
72 | ||||
|
73 | Accepts the cache options ``cache_key``, ``cache_type``, and | |||
|
74 | ``cache_expire``. | |||
|
75 | ||||
|
76 | """ | |||
|
77 | # Create a render callable for the cache function | |||
|
78 | def render_template(): | |||
|
79 | # Pull in extra vars if needed | |||
|
80 | globs = extra_vars or {} | |||
|
81 | ||||
|
82 | # Second, get the globals | |||
|
83 | globs.update(pylons_globals()) | |||
|
84 | ||||
|
85 | globs['_ungettext'] = globs['ungettext'] | |||
|
86 | # Grab a template reference | |||
|
87 | template = globs['app_globals'].mako_lookup.get_template(template_name) | |||
|
88 | ||||
|
89 | return literal(template.render_unicode(**globs)) | |||
|
90 | ||||
|
91 | return cached_template(template_name, render_template, cache_key=cache_key, | |||
|
92 | cache_type=cache_type, cache_expire=cache_expire) | |||
|
93 | ||||
68 | def _filter_proxy(ip): |
|
94 | def _filter_proxy(ip): | |
69 | """ |
|
95 | """ | |
70 | Passed in IP addresses in HEADERS can be in a special format of multiple |
|
96 | Passed in IP addresses in HEADERS can be in a special format of multiple |
@@ -64,7 +64,7 b' class PyramidPartialRenderer(object):' | |||||
64 |
|
64 | |||
65 | _kwargs = { |
|
65 | _kwargs = { | |
66 | '_': self.request.translate, |
|
66 | '_': self.request.translate, | |
67 | 'ungettext': self.request.plularize, |
|
67 | '_ungettext': self.request.plularize, | |
68 | 'h': self.get_helpers(), |
|
68 | 'h': self.get_helpers(), | |
69 | 'c': self.get_call_context(), |
|
69 | 'c': self.get_call_context(), | |
70 |
|
70 |
@@ -904,7 +904,7 b' class PartialRenderer(object):' | |||||
904 | 'h': self.h, |
|
904 | 'h': self.h, | |
905 | 'c': self.c, |
|
905 | 'c': self.c, | |
906 | 'request': self.request, |
|
906 | 'request': self.request, | |
907 | 'ungettext': self.ungettext, |
|
907 | '_ungettext': self.ungettext, | |
908 | } |
|
908 | } | |
909 | _kwargs.update(kwargs) |
|
909 | _kwargs.update(kwargs) | |
910 | return _kwargs |
|
910 | return _kwargs |
@@ -33,7 +33,7 b'' | |||||
33 |
|
33 | |||
34 | <tr> |
|
34 | <tr> | |
35 | <td> |
|
35 | <td> | |
36 | ${ungettext('This repository group includes %s children repository group.', 'This repository group includes %s children repository groups.', c.repo_group.children.count()) % c.repo_group.children.count()} |
|
36 | ${_ungettext('This repository group includes %s children repository group.', 'This repository group includes %s children repository groups.', c.repo_group.children.count()) % c.repo_group.children.count()} | |
37 | </td> |
|
37 | </td> | |
38 | <td> |
|
38 | <td> | |
39 | </td> |
|
39 | </td> | |
@@ -42,7 +42,7 b'' | |||||
42 | </tr> |
|
42 | </tr> | |
43 | <tr> |
|
43 | <tr> | |
44 | <td> |
|
44 | <td> | |
45 | ${ungettext('This repository group includes %s repository.', 'This repository group includes %s repositories.', c.repo_group.repositories_recursive_count) % c.repo_group.repositories_recursive_count} |
|
45 | ${_ungettext('This repository group includes %s repository.', 'This repository group includes %s repositories.', c.repo_group.repositories_recursive_count) % c.repo_group.repositories_recursive_count} | |
46 | </td> |
|
46 | </td> | |
47 | <td> |
|
47 | <td> | |
48 | </td> |
|
48 | </td> |
@@ -87,7 +87,7 b'' | |||||
87 | <table class="display"> |
|
87 | <table class="display"> | |
88 | <tr> |
|
88 | <tr> | |
89 | <td> |
|
89 | <td> | |
90 | ${ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)} |
|
90 | ${_ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)} | |
91 | </td> |
|
91 | </td> | |
92 | <td> |
|
92 | <td> | |
93 | %if len(c.user.repositories) > 0: |
|
93 | %if len(c.user.repositories) > 0: | |
@@ -103,7 +103,7 b'' | |||||
103 |
|
103 | |||
104 | <tr> |
|
104 | <tr> | |
105 | <td> |
|
105 | <td> | |
106 | ${ungettext('This user owns %s repository group.', 'This user owns %s repository groups.', len(c.user.repository_groups)) % len(c.user.repository_groups)} |
|
106 | ${_ungettext('This user owns %s repository group.', 'This user owns %s repository groups.', len(c.user.repository_groups)) % len(c.user.repository_groups)} | |
107 | </td> |
|
107 | </td> | |
108 | <td> |
|
108 | <td> | |
109 | %if len(c.user.repository_groups) > 0: |
|
109 | %if len(c.user.repository_groups) > 0: | |
@@ -119,7 +119,7 b'' | |||||
119 |
|
119 | |||
120 | <tr> |
|
120 | <tr> | |
121 | <td> |
|
121 | <td> | |
122 | ${ungettext('This user owns %s user group.', 'This user owns %s user groups.', len(c.user.user_groups)) % len(c.user.user_groups)} |
|
122 | ${_ungettext('This user owns %s user group.', 'This user owns %s user groups.', len(c.user.user_groups)) % len(c.user.user_groups)} | |
123 | </td> |
|
123 | </td> | |
124 | <td> |
|
124 | <td> | |
125 | %if len(c.user.user_groups) > 0: |
|
125 | %if len(c.user.user_groups) > 0: |
@@ -146,7 +146,7 b'' | |||||
146 | %if actions: |
|
146 | %if actions: | |
147 | <td class="td-action"> |
|
147 | <td class="td-action"> | |
148 | %if section == 'repositories': |
|
148 | %if section == 'repositories': | |
149 | <a href="${h.route_path('edit_repo_perms',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
149 | <a href="${h.route_path('edit_repo_perms',repo_name=k,_anchor='permissions_manage')}">${_('edit')}</a> | |
150 | %elif section == 'repositories_groups': |
|
150 | %elif section == 'repositories_groups': | |
151 | <a href="${h.url('edit_repo_group_perms',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
|
151 | <a href="${h.url('edit_repo_group_perms',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
152 | %elif section == 'user_groups': |
|
152 | %elif section == 'user_groups': |
@@ -163,14 +163,14 b'' | |||||
163 | <div class="right-content"> |
|
163 | <div class="right-content"> | |
164 | <div class="comments-number"> |
|
164 | <div class="comments-number"> | |
165 | %if c.comments: |
|
165 | %if c.comments: | |
166 | <a href="#comments">${ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}</a>, |
|
166 | <a href="#comments">${_ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}</a>, | |
167 | %else: |
|
167 | %else: | |
168 | ${ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)} |
|
168 | ${_ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)} | |
169 | %endif |
|
169 | %endif | |
170 | %if c.inline_cnt: |
|
170 | %if c.inline_cnt: | |
171 | <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}</a> |
|
171 | <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}</a> | |
172 | %else: |
|
172 | %else: | |
173 | ${ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt} |
|
173 | ${_ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt} | |
174 | %endif |
|
174 | %endif | |
175 | </div> |
|
175 | </div> | |
176 | </div> |
|
176 | </div> |
@@ -6,7 +6,7 b'' | |||||
6 | r${c.commit_ranges[0].revision}:${h.short_id(c.commit_ranges[0].raw_id)} |
|
6 | r${c.commit_ranges[0].revision}:${h.short_id(c.commit_ranges[0].raw_id)} | |
7 | ... |
|
7 | ... | |
8 | r${c.commit_ranges[-1].revision}:${h.short_id(c.commit_ranges[-1].raw_id)} |
|
8 | r${c.commit_ranges[-1].revision}:${h.short_id(c.commit_ranges[-1].raw_id)} | |
9 | ${ungettext('(%s commit)','(%s commits)', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
9 | ${_ungettext('(%s commit)','(%s commits)', len(c.commit_ranges)) % len(c.commit_ranges)} | |
10 | %if c.rhodecode_name: |
|
10 | %if c.rhodecode_name: | |
11 | · ${h.branding(c.rhodecode_name)} |
|
11 | · ${h.branding(c.rhodecode_name)} | |
12 | %endif |
|
12 | %endif | |
@@ -17,7 +17,7 b'' | |||||
17 | r${c.commit_ranges[0].revision}:${h.short_id(c.commit_ranges[0].raw_id)} |
|
17 | r${c.commit_ranges[0].revision}:${h.short_id(c.commit_ranges[0].raw_id)} | |
18 | ... |
|
18 | ... | |
19 | r${c.commit_ranges[-1].revision}:${h.short_id(c.commit_ranges[-1].raw_id)} |
|
19 | r${c.commit_ranges[-1].revision}:${h.short_id(c.commit_ranges[-1].raw_id)} | |
20 | ${ungettext('(%s commit)','(%s commits)', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
20 | ${_ungettext('(%s commit)','(%s commits)', len(c.commit_ranges)) % len(c.commit_ranges)} | |
21 | </%def> |
|
21 | </%def> | |
22 |
|
22 | |||
23 | <%def name="menu_bar_nav()"> |
|
23 | <%def name="menu_bar_nav()"> | |
@@ -96,13 +96,13 b'' | |||||
96 | class="btn" |
|
96 | class="btn" | |
97 | href="#" |
|
97 | href="#" | |
98 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> |
|
98 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> | |
99 | ${ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
99 | ${_ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
100 | </a> |
|
100 | </a> | |
101 | <a |
|
101 | <a | |
102 | class="btn" |
|
102 | class="btn" | |
103 | href="#" |
|
103 | href="#" | |
104 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> |
|
104 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> | |
105 | ${ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
105 | ${_ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
106 | </a> |
|
106 | </a> | |
107 | </div> |
|
107 | </div> | |
108 | </div> |
|
108 | </div> |
@@ -55,9 +55,9 b'' | |||||
55 |
|
55 | |||
56 | <%def name="diff_summary_text(changed_files, lines_added, lines_deleted, limited_diff=False)"> |
|
56 | <%def name="diff_summary_text(changed_files, lines_added, lines_deleted, limited_diff=False)"> | |
57 | % if limited_diff: |
|
57 | % if limited_diff: | |
58 | ${ungettext('%(num)s file changed', '%(num)s files changed', changed_files) % {'num': changed_files}} |
|
58 | ${_ungettext('%(num)s file changed', '%(num)s files changed', changed_files) % {'num': changed_files}} | |
59 | % else: |
|
59 | % else: | |
60 | ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', |
|
60 | ${_ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', | |
61 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', changed_files) % {'num': changed_files, 'linesadd': lines_added, 'linesdel': lines_deleted}} |
|
61 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', changed_files) % {'num': changed_files, 'linesadd': lines_added, 'linesdel': lines_deleted}} | |
62 | %endif |
|
62 | %endif | |
63 | </%def> |
|
63 | </%def> |
@@ -127,10 +127,10 b' collapse_all = len(diffset.files) > coll' | |||||
127 | %if diffset.limited_diff: |
|
127 | %if diffset.limited_diff: | |
128 | ${_('The requested commit is too big and content was truncated.')} |
|
128 | ${_('The requested commit is too big and content was truncated.')} | |
129 |
|
129 | |||
130 | ${ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} |
|
130 | ${_ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}} | |
131 | <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> |
|
131 | <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a> | |
132 | %else: |
|
132 | %else: | |
133 | ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', |
|
133 | ${_ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', | |
134 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} |
|
134 | '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}} | |
135 | %endif |
|
135 | %endif | |
136 |
|
136 |
@@ -65,8 +65,8 b'' | |||||
65 | %endfor |
|
65 | %endfor | |
66 | <tr class="compare_select_hidden" style="${'' if c.collapse_all_commits else 'display: none'}"> |
|
66 | <tr class="compare_select_hidden" style="${'' if c.collapse_all_commits else 'display: none'}"> | |
67 | <td colspan="5"> |
|
67 | <td colspan="5"> | |
68 | ${ungettext('%s commit hidden','%s commits hidden', len(c.commit_ranges)) % len(c.commit_ranges)}, |
|
68 | ${_ungettext('%s commit hidden','%s commits hidden', len(c.commit_ranges)) % len(c.commit_ranges)}, | |
69 | <a href="#" onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false">${ungettext('show it','show them', len(c.commit_ranges))}</a> |
|
69 | <a href="#" onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false">${_ungettext('show it','show them', len(c.commit_ranges))}</a> | |
70 | </td> |
|
70 | </td> | |
71 | </tr> |
|
71 | </tr> | |
72 | % if not c.commit_ranges: |
|
72 | % if not c.commit_ranges: |
@@ -14,7 +14,7 b'' | |||||
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="breadcrumbs_links()"> |
|
16 | <%def name="breadcrumbs_links()"> | |
17 | ${ungettext('%s commit','%s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
17 | ${_ungettext('%s commit','%s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="menu_bar_nav()"> |
|
20 | <%def name="menu_bar_nav()"> | |
@@ -309,13 +309,13 b'' | |||||
309 | class="btn" |
|
309 | class="btn" | |
310 | href="#" |
|
310 | href="#" | |
311 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> |
|
311 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> | |
312 | ${ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
312 | ${_ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
313 | </a> |
|
313 | </a> | |
314 | <a |
|
314 | <a | |
315 | class="btn" |
|
315 | class="btn" | |
316 | href="#" |
|
316 | href="#" | |
317 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> |
|
317 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> | |
318 | ${ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
318 | ${_ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
319 | </a> |
|
319 | </a> | |
320 | </div> |
|
320 | </div> | |
321 | </div> |
|
321 | </div> |
@@ -182,7 +182,7 b'' | |||||
182 | <div class="grid_delete"> |
|
182 | <div class="grid_delete"> | |
183 | ${h.secure_form(h.url('delete_repo_group', group_name=repo_group_name),method='delete')} |
|
183 | ${h.secure_form(h.url('delete_repo_group', group_name=repo_group_name),method='delete')} | |
184 | ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger", |
|
184 | ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger", | |
185 | onclick="return confirm('"+ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")} |
|
185 | onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")} | |
186 | ${h.end_form()} |
|
186 | ${h.end_form()} | |
187 | </div> |
|
187 | </div> | |
188 | </%def> |
|
188 | </%def> |
@@ -116,7 +116,7 b'' | |||||
116 | <input name="_method" type="hidden" value="delete"> |
|
116 | <input name="_method" type="hidden" value="delete"> | |
117 | </div> |
|
117 | </div> | |
118 | <div style="display: none;"><input id="csrf_token" name="csrf_token" type="hidden" value="03d6cc48726b885039b2f7675e85596b7dae6ecf"></div> |
|
118 | <div style="display: none;"><input id="csrf_token" name="csrf_token" type="hidden" value="03d6cc48726b885039b2f7675e85596b7dae6ecf"></div> | |
119 | <button class="btn btn-link btn-danger" type="submit" onclick="return confirm('" +ungettext('confirm="" to="" delete="" this="" group:="" %s="" with="" repository','confirm="" repositories',gr_count)="" %="" (repo_group_name,="" gr_count)+"');"=""> |
|
119 | <button class="btn btn-link btn-danger" type="submit" onclick="return confirm('" +_ungettext('confirm="" to="" delete="" this="" group:="" %s="" with="" repository','confirm="" repositories',gr_count)="" %="" (repo_group_name,="" gr_count)+"');"=""> | |
120 | Delete |
|
120 | Delete | |
121 | </button> |
|
121 | </button> | |
122 | </form> |
|
122 | </form> |
@@ -43,7 +43,7 b' data = {' | |||||
43 | ${pull_request.description} |
|
43 | ${pull_request.description} | |
44 |
|
44 | |||
45 |
|
45 | |||
46 | * ${ungettext('Commit (%(num)s)', 'Commits (%(num)s)', len(pull_request_commits) ) % {'num': len(pull_request_commits)}}: |
|
46 | * ${_ungettext('Commit (%(num)s)', 'Commits (%(num)s)', len(pull_request_commits) ) % {'num': len(pull_request_commits)}}: | |
47 |
|
47 | |||
48 | % for commit_id, message in pull_request_commits: |
|
48 | % for commit_id, message in pull_request_commits: | |
49 | - ${h.short_id(commit_id)} |
|
49 | - ${h.short_id(commit_id)} | |
@@ -73,7 +73,7 b' data = {' | |||||
73 | <tr><td style="padding-right:20px;">${_('Source')}</td><td>${base.tag_button(pull_request.source_ref_parts.name)} ${h.literal(_('%(source_ref_type)s of %(source_repo_url)s') % data)}</td></tr> |
|
73 | <tr><td style="padding-right:20px;">${_('Source')}</td><td>${base.tag_button(pull_request.source_ref_parts.name)} ${h.literal(_('%(source_ref_type)s of %(source_repo_url)s') % data)}</td></tr> | |
74 | <tr><td style="padding-right:20px;">${_('Target')}</td><td>${base.tag_button(pull_request.target_ref_parts.name)} ${h.literal(_('%(target_ref_type)s of %(target_repo_url)s') % data)}</td></tr> |
|
74 | <tr><td style="padding-right:20px;">${_('Target')}</td><td>${base.tag_button(pull_request.target_ref_parts.name)} ${h.literal(_('%(target_ref_type)s of %(target_repo_url)s') % data)}</td></tr> | |
75 | <tr><td style="padding-right:20px;">${_('Description')}</td><td style="white-space:pre-wrap">${pull_request.description}</td></tr> |
|
75 | <tr><td style="padding-right:20px;">${_('Description')}</td><td style="white-space:pre-wrap">${pull_request.description}</td></tr> | |
76 | <tr><td style="padding-right:20px;">${ungettext('%(num)s Commit', '%(num)s Commits', len(pull_request_commits)) % {'num': len(pull_request_commits)}}</td> |
|
76 | <tr><td style="padding-right:20px;">${_ungettext('%(num)s Commit', '%(num)s Commits', len(pull_request_commits)) % {'num': len(pull_request_commits)}}</td> | |
77 | <td><ol style="margin:0 0 0 1em;padding:0;text-align:left;"> |
|
77 | <td><ol style="margin:0 0 0 1em;padding:0;text-align:left;"> | |
78 | % for commit_id, message in pull_request_commits: |
|
78 | % for commit_id, message in pull_request_commits: | |
79 | <li style="margin:0 0 1em;"><pre style="margin:0 0 .5em">${h.short_id(commit_id)}</pre> |
|
79 | <li style="margin:0 0 1em;"><pre style="margin:0 0 .5em">${h.short_id(commit_id)}</pre> |
@@ -353,9 +353,9 b'' | |||||
353 |
|
353 | |||
354 | var msg = ''; |
|
354 | var msg = ''; | |
355 | if (commitElements.length === 1) { |
|
355 | if (commitElements.length === 1) { | |
356 | msg = "${ungettext('This pull request will consist of __COMMITS__ commit.', 'This pull request will consist of __COMMITS__ commits.', 1)}"; |
|
356 | msg = "${_ungettext('This pull request will consist of __COMMITS__ commit.', 'This pull request will consist of __COMMITS__ commits.', 1)}"; | |
357 | } else { |
|
357 | } else { | |
358 | msg = "${ungettext('This pull request will consist of __COMMITS__ commit.', 'This pull request will consist of __COMMITS__ commits.', 2)}"; |
|
358 | msg = "${_ungettext('This pull request will consist of __COMMITS__ commit.', 'This pull request will consist of __COMMITS__ commits.', 2)}"; | |
359 | } |
|
359 | } | |
360 |
|
360 | |||
361 | msg += ' <a id="pull_request_overview_url" href="{0}" target="_blank">${_('Show detailed compare.')}</a>'.format(url); |
|
361 | msg += ' <a id="pull_request_overview_url" href="{0}" target="_blank">${_('Show detailed compare.')}</a>'.format(url); |
@@ -154,7 +154,7 b'' | |||||
154 | %endif |
|
154 | %endif | |
155 | ${h.commit_status_lbl(c.pull_request_review_status)} |
|
155 | ${h.commit_status_lbl(c.pull_request_review_status)} | |
156 | </span> |
|
156 | </span> | |
157 | - ${ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} |
|
157 | - ${_ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} | |
158 | %endif |
|
158 | %endif | |
159 | </div> |
|
159 | </div> | |
160 | </div> |
|
160 | </div> | |
@@ -183,9 +183,9 b'' | |||||
183 | <% outdated_comm_count_ver = len(c.inline_versions[c.at_version_num]['outdated']) %> |
|
183 | <% outdated_comm_count_ver = len(c.inline_versions[c.at_version_num]['outdated']) %> | |
184 | <% general_outdated_comm_count_ver = len(c.comment_versions[c.at_version_num]['outdated']) %> |
|
184 | <% general_outdated_comm_count_ver = len(c.comment_versions[c.at_version_num]['outdated']) %> | |
185 | <a id="show-pr-versions" class="input" onclick="return versionController.toggleVersionView(this)" href="#show-pr-versions" |
|
185 | <a id="show-pr-versions" class="input" onclick="return versionController.toggleVersionView(this)" href="#show-pr-versions" | |
186 | data-toggle-on="${ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))}" |
|
186 | data-toggle-on="${_ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))}" | |
187 | data-toggle-off="${_('Hide all versions of this pull request')}"> |
|
187 | data-toggle-off="${_('Hide all versions of this pull request')}"> | |
188 | ${ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))} |
|
188 | ${_ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))} | |
189 | </a> |
|
189 | </a> | |
190 | <table> |
|
190 | <table> | |
191 | ## SHOW ALL VERSIONS OF PR |
|
191 | ## SHOW ALL VERSIONS OF PR | |
@@ -443,13 +443,13 b'' | |||||
443 | class="btn" |
|
443 | class="btn" | |
444 | href="#" |
|
444 | href="#" | |
445 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> |
|
445 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> | |
446 | ${ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
446 | ${_ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
447 | </a> |
|
447 | </a> | |
448 | <a |
|
448 | <a | |
449 | class="btn" |
|
449 | class="btn" | |
450 | href="#" |
|
450 | href="#" | |
451 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> |
|
451 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> | |
452 | ${ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
452 | ${_ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
453 | </a> |
|
453 | </a> | |
454 | </div> |
|
454 | </div> | |
455 | </div> |
|
455 | </div> |
@@ -154,7 +154,7 b'' | |||||
154 | ${_('Statistics are disabled for this repository')} |
|
154 | ${_('Statistics are disabled for this repository')} | |
155 | </span> |
|
155 | </span> | |
156 | % if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
156 | % if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
157 | , ${h.link_to(_('enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'))} |
|
157 | , ${h.link_to(_('enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} | |
158 | % endif |
|
158 | % endif | |
159 | % endif |
|
159 | % endif | |
160 | </div> |
|
160 | </div> | |
@@ -178,7 +178,7 b'' | |||||
178 | ${_('Downloads are disabled for this repository')} |
|
178 | ${_('Downloads are disabled for this repository')} | |
179 | </span> |
|
179 | </span> | |
180 | % if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
180 | % if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): | |
181 | , ${h.link_to(_('enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'))} |
|
181 | , ${h.link_to(_('enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))} | |
182 | % endif |
|
182 | % endif | |
183 | % else: |
|
183 | % else: | |
184 | <span class="enabled"> |
|
184 | <span class="enabled"> |
General Comments 0
You need to be logged in to leave comments.
Login now