Question - Difference using `t` helper and `intl.t` from the Service
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate
Environment
- Ember Version: 3.16.10
- Ember CLI Version: 3.16.2
- Ember Intl Version: 4.4.1
Question
Hello there, I have a small question.
I am wondering, is there a difference between using t
macro helper and intl.t
from the Service?
https://ember-intl.github.io/ember-intl/docs/guide/translating-text#t
import { t } from 'ember-intl';
export default class ... {
title = t('my.key');
});
export default class ... {
@service intl;
constructor() {
title = this.intl.t('my.key');
}
});
For some cases I need @computed('intl.locale')
so obviously the Service will be injected and I will use this.intl.t()
.
Thanks for your explanation.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Voice Over Internet Protocol (VoIP)
IP-Enabled Services Voice over Internet Protocol (VoIP), is a technology that allows you to make voice calls using a broadband Internet connection instead ......
Read more >FAQs on the 2020 Form W-4 | Internal Revenue Service
Frequently asked questions on the 2020 Form W-4. ... Are all employees required to furnish a new Form W-4? No. Employees who have...
Read more >Job Application FAQ - CalCareers - CA.gov
Typically, State departments hire Student Assistants using two different options. Option #1: The department advertises their own vacancies and hires their ...
Read more >Frequently asked questions - UNRWA
Palestine refugees registered with the Agency are eligible to access its services within the UNRWA areas of operations (Lebanon, Jordan, Syria, ...
Read more >Questions and Answers: The IMF's response to COVID-19
What is the Fund doing to help countries during the coronavirus crisis? ... Shouldn't the IMF ask a country's external creditors to forgive...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah yes, right. It seems I easily forget it is a computed property macro so indeed it won’t return the value.
Again many thanks, great explanations. It also helped other JS dev of my team.
I believe there was an attempt to resolve this: https://github.com/ember-intl/ember-intl/pull/1340
Landed in v5.2.0, is that not working?