Language string not detecting used within the function

You can’t use variables in translation functions. From the internationalisation documentation:

The following example tells you what not to do

// This is incorrect do not use.
_e( "Your city is $city.", 'my-theme' );

The strings for translation are extracted from the source without executing the PHP associated with it. For example: The variable $city may be Vancouver, so your string will read "Your city is Vancouver" when the template is run but gettext won’t know what is inside the PHP variable in advance.

You need to put the value in the translation function when initially defining it.