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.

Multi line strings in translations file?

See original GitHub issue

Environment

  • Ember Version: 9ba382d0e2cd2a2356deecbf61db303a16b53a44 (2018-06-12)
  • Ember CLI Version: 7bc63039a1f89e03d9c1246cc5d3e8245290f302 (2018-05-29)
  • Ember Intl Version: 3.0.0-beta.8
  • Browser(s): Chrome
  • Node Version: 8.11.1

Steps to Reproduce

have a long translation entry that is broken up on multiple lines.

example:

      "whatIsQ": "What is {appname}",
      "whatIsA": "
        {appname} is the open source p2p encrypted chat
        client that operates over open source
        mesh nodes on free-tier cloud services.",

previously with ember-i18n, I could use a js file, which allowed me to use backticks / multi-line strings. Is there a way to do that with ember-intl?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
danieledraganticommented, Nov 29, 2019

@jasonmit Woops, serves me well for not trying to understand the actual error message. Works fine, thank you!

0reactions
jasonmitcommented, Nov 28, 2019

@danieledraganti

The yaml parser seems to be suggesting it wants a linebreak after the |-

i.e.:

key: |-
  foo
  bar
  baz
Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-line strings are not replaced by translated strings
It sounds strange but it's real: the multi-line strings inside sprintf(__( <string> )) (see Upsell.php), even translated in an other language (weither the ......
Read more >
Handling long blocks of text to be translated in i18N
There is a solution to your issue though. Just use yml files instead for translations. It supports multiline strings like this: // standard...
Read more >
SOLVED: Unable to localise multiline strings - Hacking with Swift
It's not translated at all, it just stays in English. I can use \n instead, but it looks awful in the editor.
Read more >
Translating multi-line strings in javascript with django
In this javascript code, there are some multi-line strings, which need to be translated. We have tried this structure:
Read more >
How to translate multi-line strings? - WordPress Stack Exchange
? I've heard that GetText doesn't support multi-line strings and indeed, when I try to scan such file in poEdit, it doesn' ...
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