Shopify / Shopify/liquid

Accept `| t` within parameter

Open
#2,014 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
Ruby
Stars
11.9k
Forks
1.5k
Avg merge
17h 55m
Merged PRs (30d)
3

Description

Hi there,

We use quite a lot of snippets to normalise development. We'd like to be able to pass the | t filter to a parameter.

Example

{% liquid
  # Preferred
  render 'button', label: 'product.add_to_cart' | t, type: 'submit'

  # Currently
  assign label = 'product.add_to_cart' | t
  render 'button', label: label, type: 'submit'
%}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how parameters in the {% liquid %} render tag are parsed and how the | t filter is handled in the existing assign form. Add coverage for the shown direct filtered parameter syntax and verify that the rendered button receives the translated label; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.