Symfony 3.4 debug:translation call returning missing translations which are defined

142 views Asked by At

When I run debug:translation in a Symfony 3.4 project I get a bunch of these:

bin/console debug:translation en CRMPiccoBundle --only-missing
 ----------- --------------- ------------------------------ -------------------------------------- 
  State       Domain          Id                            Message Preview (en)                  
 ----------- --------------- ------------------------------ -------------------------------------- 
   missing    homepage        login.signin.header.desktop   login.signin.header.desktop  
   missing    homepage        login.signin.header.mobile    login.signin.header.mobile   

What confuses me is that the only template which is using these translations is correctly configured to access these translations:

{% extends "CRMPiccoBundle:Default:base.html.twig" %}
{% trans_default_domain "homepage" %}
{% set seodescription = 'page.description'|trans %}
{% set bodyclass = 'homepage login' %}
{% block title %}{{ 'page.title'|trans }}{% endblock %}

{% block flashes %}
{% endblock %}

{% block body %}

<h1 class="d-none d-md-block">{{ 'login.signin.header.desktop'|trans }}</h1>
<h1 class="d-block d-md-none">{{ 'login.signin.header.mobile'|trans|raw }}</h1>

Why is debug:translation reporting these as "missing"?

homepage.en.yml looks like this:

login:
    signin:
        header:
            desktop: Sign-In
            mobile: Sign-In below
0

There are 0 answers