<commit_before><%inherit file="../${context.get('request').registry.settings.get('clld.app_template', 'app.mako')}"/>
<%namespace name="util" file="../util.mako"/>
<%! active_menu_item = "sentences" %>

<%block name="head">
    <script src="${request.static_url('clld:web/static/audiojs/audio.min.js')}"></script>
    <script>
        audiojs.events.ready(function() {
            var as = audiojs.createAll();
        });
    </script>
</%block>

<%def name="sidebar()">
    <%util:well title="Dictionary">
        <% dictionary = ctx.meaning_assocs[0].meaning.word.dictionary %>
        ${h.link(request, dictionary)} by ${h.linked_contributors(request, dictionary)}
        ${h.button('cite', onclick=h.JSModal.show(dictionary.name, request.resource_url(dictionary, ext='md.html')))}
    </%util:well>
</%def>

<h2>${_('Sentence')} ${ctx.id}</h2>
<dl>
    <dt>Language:</dt>
    <dd>${h.link(request, ctx.language)}</dd>
    <dt>Meanings:</dt>
    <dd>
        <ul>
            % for wa in ctx.meaning_assocs:
                <li>${h.link(request, wa.meaning.word, label=wa.meaning.name)}</li>
            % endfor
        </ul>
    </dd>
</dl>

${h.rendered_sentence(ctx)|n}

% if getattr(ctx, 'audio'):
<div>
    <audio controls="controls">
        <source src="${request.file_url(ctx.audio)}"/>
    </audio>
</div>
% endif

<dl>
% if ctx.comment:
<dt>Comment:</dt>
<dd>${ctx.markup_comment or ctx.comment|n}</dd>
% endif
% if ctx.type:
<dt>${_('Type')}:</dt>
<dd>${ctx.type}</dd>
% endif
% if ctx.references or ctx.source:
<dt>${_('Source')}:</dt>
% if ctx.source:
<dd>${ctx.source}</dd>
% endif
% if ctx.references:
<dd>${h.linked_references(request, ctx)|n}</dd>
% endif
% endif
</dl><commit_msg>display word forms on sentence page<commit_after><%inherit file="../${context.get('request').registry.settings.get('clld.app_template', 'app.mako')}"/>
<%namespace name="util" file="../util.mako"/>
<%! active_menu_item = "sentences" %>

<%block name="head">
    <script src="${request.static_url('clld:web/static/audiojs/audio.min.js')}"></script>
    <script>
        audiojs.events.ready(function() {
            var as = audiojs.createAll();
        });
    </script>
</%block>

<%def name="sidebar()">
    <%util:well title="Dictionary">
        <% dictionary = ctx.meaning_assocs[0].meaning.word.dictionary %>
        ${h.link(request, dictionary)} by ${h.linked_contributors(request, dictionary)}
        ${h.button('cite', onclick=h.JSModal.show(dictionary.name, request.resource_url(dictionary, ext='md.html')))}
    </%util:well>
</%def>

<h2>${_('Sentence')} ${ctx.id}</h2>
<dl>
    <dt>Language:</dt>
    <dd>${h.link(request, ctx.language)}</dd>
    <dt>Meanings:</dt>
    <dd>
        <ul>
            % for wa in ctx.meaning_assocs:
                <li>
                    ${h.link(request, wa.meaning.word, label=wa.meaning.name)}
                    [${wa.meaning.word.name}]
                </li>
            % endfor
        </ul>
    </dd>
</dl>

${h.rendered_sentence(ctx)|n}

% if getattr(ctx, 'audio'):
<div>
    <audio controls="controls">
        <source src="${request.file_url(ctx.audio)}"/>
    </audio>
</div>
% endif

<dl>
% if ctx.comment:
<dt>Comment:</dt>
<dd>${ctx.markup_comment or ctx.comment|n}</dd>
% endif
% if ctx.type:
<dt>${_('Type')}:</dt>
<dd>${ctx.type}</dd>
% endif
% if ctx.references or ctx.source:
<dt>${_('Source')}:</dt>
% if ctx.source:
<dd>${ctx.source}</dd>
% endif
% if ctx.references:
<dd>${h.linked_references(request, ctx)|n}</dd>
% endif
% endif
</dl>
{'fraction_non_alphanumeric': 0.22879908935685828, 'fraction_numerical': 0.001707455890722823, 'mean_word_length': 3.3288177339901477, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '246091', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1264, 'n_words': 201}