Skip to content

Commit

Permalink
remove debugging & use $NUMBER in default
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Feb 16, 2024
1 parent 2d83a08 commit 6b68c48
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,6 @@
{%- endif -%}

{# Debugging #}
{%- set count = 0 -%} {# Replace this to test #}
{%- set base_key = "min_read" -%}

{%- set processed_key = macros_translate::translate(key=base_key, number=count, language_strings=language_strings, default="couldn't find the string") -%}
<table>
<thead>
<tr>
<th>Variable</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>count</code></td>
<td>{{ count }}</td>
<td>The number of items.</td>
</tr>
<tr>
<td><code>key</code></td>
<td>{{ base_key }}</td>
<td>The base translation key used for fetching the translation.</td>
</tr>
<tr>
<td><code>processed_key</code></td>
<td>{{ processed_key }}</td>
<td>The final translation with appropriate pluralization and dynamic content replaced (if applicable).</td>
</tr>
</tbody>
</table>
{# {% set last_ancestor = page.ancestors | slice(start=-1) %}
{% set current_section = get_section(path=last_ancestor.0) %}

Expand Down Expand Up @@ -99,7 +69,7 @@ <h1 class="article-title">

{# page settings override config settings #}
{% if macros_settings::evaluate_setting_priority(setting="show_reading_time", page=page, default_global_value=true) == "true" %}
{{ separator }} <li title="{{ macros_translate::translate(key="words", number=page.word_count, default=page.word_count ~ " words", language_strings=language_strings) }}">{{ macros_translate::translate(key="min_read", number=page.reading_time, default=page.reading_time ~ " min read", language_strings=language_strings) }}</li>
{{ separator }} <li title="{{ macros_translate::translate(key="words", number=page.word_count, default="$NUMBER words", language_strings=language_strings) }}">{{ macros_translate::translate(key="min_read", number=page.reading_time, default="$NUMBER min read", language_strings=language_strings) }}</li>
{% endif %}

{%- if page.taxonomies and page.taxonomies.tags -%}
Expand Down

0 comments on commit 6b68c48

Please sign in to comment.