remove debugging & use $NUMBER in default

This commit is contained in:
welpo 2024-02-16 15:23:06 +01:00
parent 2d83a081a7
commit 6b68c483e3
No known key found for this signature in database
GPG key ID: A2F978CF4EC1F5A6

View file

@ -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) %}
@ -99,7 +69,7 @@
{# 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 -%}