question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue when using full stop in translate service value

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

this.translocoService.translate('An email was sent to your email address. Please check your mail box.')

Extracted value in json file:

“'An email was sent to your email address”: { " Please check your mail box": { “'”: “” } }

When ever I try to translate a string with full stop in it, the service thinks it is an object.

Expected behavior

Extracted value in json value should be :

“'An email was sent to your email address. Please check your mail box.”: “”

The service should parse it as a full sentence instead of an object.

Environment


Angular version: 9.1.11


Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 14.3.0
- Platform:  Mac

Others:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
itayodcommented, Jun 25, 2020

@zzakir, of course, you can… you can translate a sentence like that:

{
  "someKey": "my long sentence. with points."
}

and then you can translate like this:

  this.translocoService.translate('someKey'). // will be: "my long sentence. with points."
0reactions
zzakircommented, Jun 25, 2020

Ah alright. Now I get it. Thank you very much for your help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

safely use translate.instant() · Issue #517 - GitHub
is theire a way to load translations when application starts so that we can safely use translate.instant()
Read more >
Using HTML's translate attribute - W3C
If a page has no translate attribute, a translation system or translator should assume that all the text is to be translated. The...
Read more >
What's Included in Marketing Translation Services Costs - ATL
What's included in marketing translation services costs is not just the rate for one service. Know what you should expect.
Read more >
Checks and fixups — Weblate 4.15.1 documentation
Checks that full stops are replicated between both source and translation. The presence of full stops is checked for various languages where they...
Read more >
How to translate your Angular app with ngx-translate
1. Add ngx-translate to your Angular application 2. Set up the TranslateService in your app.module.ts 3. Create your main language translation file (in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found