Changeset - 2d5f442e5abc
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 10 years ago 2015-10-08 20:03:36
thomas.de.schampheleire@gmail.com
files: treat messages about 'File too big' as sentences and add a dot.

Make it more easy to read:
File is too big to display Show full annotation anyway
by treating them as two sentences:
File is too big to display. Show full annotation anyway.

and likewise for regular file display.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/files/files_source.html
Show inline comments
 
@@ -50,51 +50,51 @@
 
        <div class="author">
 
            <div class="gravatar">
 
                ${h.gravatar(h.email_or_none(c.file_changeset.author), size=16)}
 
            </div>
 
            <div title="${c.file_changeset.author}" class="user">${h.person(c.file_changeset.author)}</div>
 
        </div>
 
        <div class="commit">${h.urlify_commit(c.file_changeset.message,c.repo_name)}</div>
 
    </div>
 
    <div class="code-body">
 
      %if c.file.is_browser_compatible_image():
 
        <img src="${h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path)}" class="img-preview"/>
 
      %elif c.file.is_binary:
 
        <div style="padding:5px">
 
          ${_('Binary file (%s)') % c.file.mimetype}
 
        </div>
 
      %else:
 
        %if c.file.size < c.cut_off_limit or c.fulldiff:
 
            %if c.annotate:
 
              ${h.pygmentize_annotation(c.repo_name,c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
 
            %else:
 
              ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
 
            %endif
 
        %else:
 
            <h4>
 
            ${_('File is too big to display')}
 
            ${_('File is too big to display.')}
 
            %if c.annotate:
 
              ${h.link_to(_('Show full annotation anyway'), h.url.current(fulldiff=1, **request.GET.mixed()))}
 
              ${h.link_to(_('Show full annotation anyway.'), h.url.current(fulldiff=1, **request.GET.mixed()))}
 
            %else:
 
              ${h.link_to(_('Show as raw'), h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path))}
 
              ${h.link_to(_('Show as raw.'), h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path))}
 
            %endif
 
            </h4>
 
        %endif
 
      %endif
 
    </div>
 
</div>
 

	
 
<script>
 
    $(document).ready(function(){
 
        // fake html5 history state
 
        var _State = {
 
           url: "${h.url.current()}",
 
           data: {
 
             node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
 
             url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"),
 
             rev:"${c.changeset.raw_id}",
 
             f_path: "${h.safe_unicode(c.file.path)}"
 
           }
 
        }
 
        callbacks(_State); // defined in files.html, main callbacks. Triggerd in pjax calls
 
    });
 
</script>
0 comments (0 inline, 0 general)