Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim added to fix the error related to variable cast #354

Merged
merged 5 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
* @see template_preprocess_views_view_fields()
*/
#}
{% set patches_count = fields.field_code_contrib_patches_count.content|trim %}
{% set files_count = fields.field_code_contrib_files_count.content|trim %}
<div class="contrib__card">
<div class="contrib__card_date">
<div class="contrib__card_date__day">
Expand All @@ -51,20 +53,18 @@
</div>
<div class="contrib__card_patch_file_count—wrapper">
<div class="contrib__card_patchCount">
{{ fields.field_code_contrib_patches_count.content }}
{% if fields.field_code_contrib_patches_count.content == 1 %}
Patch
{% else %}
Patches
{% endif %}
{% trans %}
{{ patches_count }} Patch
{% plural patches_count %}
{{ patches_count }} Patches
{% endtrans %}
</div>
<div class="contrib__card_fileCount">
{{ fields.field_code_contrib_files_count.content }}
{% if fields.field_code_contrib_files_count.content == 1 %}
File
{% else %}
Files
{% endif %}
{% trans %}
{{ files_count }} File
{% plural files_count %}
{{ files_count }} Files
{% endtrans %}
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @see template_preprocess_views_view_fields()
*/
#}
{% set patches_count = fields.field_code_contrib_patches_count.content|trim %}
<div class="contrib__card">
<div class="contrib__card_date">
<div class="contrib__card_date__day">
Expand All @@ -51,12 +52,11 @@
</div>
<div class="contrib__card_patch_file_count—wrapper">
<div class="contrib__card_patchCount">
{{ fields.field_code_contrib_patches_count.content }}
{% if fields.field_code_contrib_patches_count.content == 1 %}
Patch
{% else %}
Patches
{% endif %}
{% trans %}
{{ patches_count }} Patch
{% plural patches_count %}
{{ patches_count }} Patches
{% endtrans %}
</div>
</div>
</div>
Loading